Determing the scale of a component
the context bug i'm trying fix (#sdk-19578) if a component/application has scalex/scaley applied it, tool tip appears @ default scale , looks big/small.
our specific case using application.scalex / scaley in air application make easier read vision impaired users.
my first attempt addressed specific case, do
currenttooltip.scalex = (currenttarget uicomponent).parentdocument.scalex
though commented on issue maybe .parentapplication better.
corey lucier makes point can't assume scale of 'this' component (a page in viewstack) same overall scale of whole application - of intermediate components have a scale applied.
so... correct approach more like:
scale=1
item=parent
while (item.parent)
scale=scale*item.scale
item=item.parent
wend
currenttooltip.scale=scale
?
tom,
you can concatenated transforms accessing displayobject.transform.concatenatedmatrix property. , d properties of matrix should give scale. however, if displayobject rotated, you'll have factor out. mx.geom.compoundtransform class has decomposematrix function implements logic.
jason
More discussions in Developers
adobe
Comments
Post a Comment