View Single Post
Old 06-17-2008, 10:59 AM   #4
ashut_it
New Member
 
Join Date: Mar 2006
Location: India
Model: 8800
Carrier: airtel
Posts: 7
Default Problem on drawing the Characters 'r', 'L' in 8130 & 8120.

Hi,

In my Application, I m using
drawText(char character,
int x,
int y,
int flags,
int width)
to draw all the characters.
Now the problem is all the characters are drawn perfectly except the letter 'r', 'L', '/', & '\', & this problem occurs only in BB 8120 & BB 8130 of 4.3.0JDE Version.

Earlier I was finding-out the width by
width = graphics.getFont().getAdvance(character);
which was returning the correct value for all letters but 'r', 'L', '/', & '\' are not rendered.

After applying your suggestion by giving the width as Display.getWidth(), in the below method
drawText(character, xPos, yPos, DrawStyle.LEFT | DrawStyle.TOP, Display.getWidth());

Now 'r' & 'L' are also displayed, each character is displayed perfectly, its working fine.

My concern is can i use Display.getWidth() in drawText to draw the characters ? will it be the correct way ? As we know the Display.getWidth() will return total drawing width of the display's drawable area which is not very much required for a single character to display on the screen.
But as your suggestion works fine & is a solution for me, i just wanted to be sure of passing the Display.getWidth() just to draw a single character.

Please provide your input on this.

Many Thanks for your suggestion.

-A

Last edited by ashut_it; 06-17-2008 at 06:35 PM..
Offline   Reply With Quote