kingyiren / efflex

Automatically exported from code.google.com/p/efflex
0 stars 0 forks source link

Can't work when application is scaled #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
If the application scaleX or scaleY are greater than 0 (to scale the whole
application), then animated components (i.e. viewstack slide) appear
pixelated, rather than smooth.

This appears to be because internally Efflex uses BitmapData.draw() which
grabs the unscaled bitmap of a native vector control.

Original issue reported on code.google.com by tom.chiv...@gmail.com on 10 Mar 2009 at 12:23

GoogleCodeExporter commented 8 years ago
Oops:
are greater than 0 
should be
are greater than 1
:-) 

Original comment by tom.chiv...@gmail.com on 10 Mar 2009 at 12:50

GoogleCodeExporter commented 8 years ago
i had same problem with a viewstack that i scale in my code
try the code below it solved my problem and took 2hrs of my time..

in ViewStackInstance.as file

change following functions:
                final protected function get contentWidth():Number
        {
            if(_viewStack.scaleX != 1)
                return _helper.contentWidth*_viewStack.scaleX;
            else
                return _helper.contentWidth;
        }

        final protected function get contentHeight():Number
        {
            if(_viewStack.scaleY != 1)
                return _helper.contentHeight*_viewStack.scaleY;
            else
                return _helper.contentHeight;
        }

Original comment by amho...@gmail.com on 10 Apr 2009 at 5:42

GoogleCodeExporter commented 8 years ago
That won't work if it's not the view stack that is scaled, but it's container 
(or
that objects container, etc. etc. all the way up to application.scaleX / 
.scaleY).

Original comment by tom.chiv...@gmail.com on 16 Apr 2009 at 3:34