Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Contributor
ramachandra9345
Posts: 8
Registered: ‎06-28-2012
My Carrier: Vodafone
Accepted Solution

Drawing text Diagnal to screen

I am new to Blackberry. Could your please help me out Drawing text  center of Diagnal to screen 

Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011

Re: Drawing text Diagnal to screen

[ Edited ]

Hi @ramachandra9345

 

Welcome to the forum.

 

I think that you would have to create a bitmap and write the text on it and then rotate the bitmap.

 

You can create a new Bitmap using the Bitmap class and then create a Graphics instance with your bitmap:

Bitmap bitmap = new Bitmap(...);

Graphics g = Graphics.create(bitmap);

g.drawText(...);

 

For rotating the bitmap, take a look here:

http://supportforums.blackberry.com/t5/Java-Development/Rotate-and-scale-bitmaps/ta-p/492524

 

Hope that helps,

 

E.

Please use plain text.
New Contributor
ramachandra9345
Posts: 8
Registered: ‎06-28-2012
My Carrier: Vodafone

Re: Drawing text Diagnal to screen

Its working fine.Thanks dude

Please use plain text.