how can I draw strings onto BitmapData, is there something like Java´s Graphics.drawString()?
how can I draw strings onto BitmapData, is there something like Java´s Graphics.drawString()?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In Actionscript, the most natural way of handling this, I think, would be using a container such as
Spriteand drawing using it’sgraphicsobject and / or adding other display objects as children. Then you could take your “snapshot” when / if necessary, to get the pixel data.For adding text, creating a
TextFieldis the simplest option.Anyway, you could write a little function that does this on an existing BitmapData, if you wanted. Here’s a sketch of how such a function could be written: