posted 13 years ago
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
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
posted 13 years ago
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 ]
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 ]

It is sorta covered in the JavaRanch Style Guide. |