File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes Strings - drawing ideas Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Strings - drawing ideas" Watch "Strings - drawing ideas" New topic

Strings - drawing ideas

Kris Sobczak

Joined: Jun 04, 2005
Posts: 4
I wonder how would you bite an issue of writing, or rather drawing, scalable words at any angle (don't mean italic, but e.g. from left-upper corner of the screen to right-bottom) in MIDP 1.0?

The easy way - is to draw each char at appropriate position along the line connecting those corners, but such "stairs" happen to be not very readable and their scalability is limited (just default font sizes)

The logical way - is to prepare separate routine for each letter - drawing it as vector shape. Coordinates of all those shapes' nodes are modified by 2 factors: position along the line and rotation to the desired angle - the effect would be satisfying, but I guess this method seem to be very slow if there are many words at different angles displayed at the same moment.

Any other ideas or optimizations?
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Is this a functionality you can get from J2ME Polish?


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Strings - drawing ideas
jQuery in Action, 3rd edition