I am working on j2me project for nokia N97.I want to write the test vertically i.e rotate my text vertically.I am using Graphics.DrawString(); method to draw text on canvas.
Can any one help me how to draw and rotate text on canvas.
Thanks in advance
You can create a mutable
Imageof the size of the text you require (useFont.stringWidth()andFont.getHeight()for the dimensions), draw the text on to theImage‘sGraphicsobject, use the image to instantiate aSprite, rotate it usingSprite.setTransform(Sprite.TRANS_ROT90), and finally draw it usingSprite.paint().More info on all of these in the MIDP2 spec.
HTH