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.

inside custom component

Java Development

Reply
Highlighted
New Developer
Posts: 44
Registered: ‎06-28-2012
My Device: All
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 

Developer
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

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.

New Developer
Posts: 44
Registered: ‎06-28-2012
My Device: All
My Carrier: Vodafone

Re: Drawing text Diagnal to screen

Its working fine.Thanks dude