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
Regular Contributor
vaidyanet
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.

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
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.
Please use plain text.