scaleX scaleY increasing left, top margin, and line spacing

Posted by Mark on Stack Overflow See other posts from Stack Overflow or by Mark
Published on 2010-06-06T04:06:58Z Indexed on 2010/06/06 4:22 UTC
Read the original article Hit count: 200

Filed under:
|

If you have Text with a font that is 72 point for example (and scaleX scaleY = 1) you can achieve the same size with a font size of 12 and scaleX,scaleY = 6. For reasons that would take too long to explain I am applying a large scale factor as in the latter example. The problem is, even though the text is the same size, the line spacing and left and top margins have all been increased but I want them to be the same size as well. As far as the line spacing, I discovered that TextFormat.leading was being automatically increased when scaleX, scaleY was greater than 1, so I just had to reset TextFormat.leading back to 0. That leaves the left and top margins, and I have no idea how those are being increased. I tried TextFormat.blockIndent=0 and TextFormat.leftMargin=0 (and also ignorePadding=true) and it had no effect. And have no clue how to reset the top margin either to its orginal size, in case anyone has an idea for all these.

© Stack Overflow or respective owner

Related posts about flex

Related posts about actionscript-3