Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Drawing non-standard shapes in MIDP 2.0

 
Mark Greene
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone guide me (resources, classes, methods etc..) as to how I would go about drawing shapes on a canvas in midp2.0?

for example I would like to draw the outlines of a vase, a bowl, a bottle etc.. that sort of thing.

Is this possible, or would I have to start using sprites/images..?

The reason I don't want to use images is that I would like the user (thru UI interaction) to influence the shapes by pressing buttons/tapping the shape with a stylus etc..

Any help appreciated,
cheers,
Mark
 
Mark Greene
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No one..?
 
Yuri Magrisso
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Check out javax.microedition.lcdui.Graphics class. In this class are all the drawing methods provided in MIDP. It is not going to be very easy to draw arbitrary shapes, because there aren't drawing methods for curves, only arcs.

There is a third party library: TinyLine 2D that allows drawing arbirtrary curves.
It is free currently, but it is not open source (it may not stay free).

Yuri
[ February 11, 2005: Message edited by: Yuri Magrisso ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic