开发者

How to draw bordered text?

开发者 https://www.devze.com 2023-01-30 01:01 出处:网络
I am trying to draw bordered Text on Graphics, as shown below.The text color is bl开发者_如何学运维ack, and the border is white.

I am trying to draw bordered Text on Graphics, as shown below. The text color is bl开发者_如何学运维ack, and the border is white.

How to draw something like this example?

How to draw bordered text?


You can't write bordered text directly, by modifying the font style of a TextField for example. Though as Jonathan suggested you can display the raw image using BitmapField. Have a look at this: http://docs.blackberry.com/en/developers/deliverables/18125/Bitmap_field_1303007_11.jsp


Despite this will most likely not look as good as your sample picture, you can try to draw your text with white color for several times using slightly shifted starting coordinates (by 1 or 2 pixels). Then set graphics color to black and draw your text using your true starting coordinates.

0

精彩评论

暂无评论...
验证码 换一张
取 消