Pier
Pier

Reputation: 10827

AS3: anti alias animation by code

So what parameters in the Advanced anti alias are close to the "animation" preset in the Flash IDE?

I need to animate a bunch of texts (translation and rotation) and setting sharpness and thickness doesn't seem to help with the sub pixel rendering...

Upvotes: 0

Views: 1497

Answers (2)

Marty
Marty

Reputation: 39456

I think you're after the .gridFitType property.

The type of grid fitting used for this text field. This property applies only if the flash.text.AntiAliasType property of the text field is set to flash.text.AntiAliasType.ADVANCED.

Upvotes: 3

okayGraphics
okayGraphics

Reputation: 375

When I use the sharpness, I almost always put it at the maximum 255.

I would recommend you draw your TextField to a BitmapData object, then rotate the BitmapData.

    var myTextHolder:BitmapData = new BitmapData(myText.width,myText.height,true,0x00000000);

myTextHolder.draw(myText);

If you want to make the text really crisp, I would suggest:

  1. creating the text twice as large as you need
  2. put it in a bitmapdata
  3. on each frame, rotate the bitmapdata
  4. then shrink the bitmapdata back down to normal size
  5. draw the result on the screen

I beleive you can use the Matrix class to perform all the operations you need here - translation, rotation, and scaling.

Upvotes: 1

Related Questions