I want to do something relatively simple: I want to create a Bitmap object entirely in code, draw on it (lines, text, ellipses, rectangles, points etc.), and display it in a BitmapField on the BlackBerry screen.
Can anyone give me a simple code sample that shows how to do this, or a link to a good sample project?
Update: I have this code sample, but it uses a deprecated constructor for Graphics:
Bitmap bmp = new Bitmap(100, 100);
Graphics g = new Graphics(bmp);
g.drawLine(0, 0, 100, 100);
BitmapField bmpField = new BitmapField(bmp);
add(bmpField);
How do I do the same thing, only without using the Graphics constructor that takes a Bitmap?
You can use the static factory method on the Graphics class:
Graphics.create(Bitmap)