Is there a way to get the actual bounding box of a glyph in ActionScript?

前端 未结 3 806
一生所求
一生所求 2021-01-15 04:44

I\'m learning ActionScript/Flash. I love to play with text, and have done a lot of that kind of thing with the superb Java2D API.

One of the things I like to know i

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-15 05:18

    Richard is on the right track, but BitmapData.getColorBounds() is much faster and accurate... I've used it a couple of times, and optimized for your specific needs its not as slow as one might think.

    Cory's suggestion of using flash.text.engine is probably the "correct" way to go, but I warn you that flash.text.engine is VERY (very!) hard to use compared to TextField.

提交回复
热议问题