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

Regular Contributor
Posts: 69
Registered: ‎04-05-2010
My Device: Storm
My Carrier: BSNL

Re: Drawing Polygons....drawFilledPath

Paths has smallcurves. I was actually trying to draw the text by getting the path from the font. I am getting good text, but its edges & curves are not nice. When I draw the filled path, i feel because of the missing decimals, some of the path filles are not upto the extent.


Consider a font with 10 font size where I am drawing "a". Curves are very small.


I tried converting the points to Fixed Int as mentiuoned above, but some how drawFilledPath() does not resepect the Fixed32 values.


I tried converting the each double point e.g 10.5342 to Fixed int using Fixed32.tenThouToFP((int) 10.5342 * 10000);


I suspect, it is considering the resulting point is just multiplied by 10,000 (105342) instead of taking it as 10.5342 while drawing with this point.

Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-, Z10 (STL100-3)-, Z30 (STA100-5)-, Passport (SQW100-1)-, PlayBook (16GB)-
My Carrier: Verizon

Re: Drawing Polygons....drawFilledPath

Yes, all the functions in Graphics expect pixel-aligned values. If you passed in a Fixed32 value it will just see that as a big number.


May I ask how you got the path from the font?

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.