January 2002
Intermediate to advanced
264 pages
8h 3m
English
javax.microedition.lcdui.Graphics
This class provides a simple two-dimensional geometric rendering capability. It provides drawing primitives for text, images, lines, rectangles, and arcs. Pixel replacement is the only drawing operation provided.
public classGraphics{ // public class fields public static final intBASELINE= 64; public static final intBOTTOM= 32; public static final intDOTTED= 1; public static final intHCENTER= 1; public static final intLEFT= 4; public static final intRIGHT= 8; public static final intSOLID= 0; public static final intTOP= 16; public static final intVCENTER= 2; // public instance methods public voidclipRect(int x, int y, int width, int height); public voiddrawArc(int x, int y, int width, int height, int startAngle, int arcAngle); public voiddrawChar(char character, int x, int y, int anchor); public voiddrawChars(char[] data, int offset, int length, int x, int y, int anchor); public voiddrawImage(Image img, int x, int y, int anchor); public voiddrawLine(int x1, int y1, int x2, int y2); public voiddrawRect(int x, int y, int width, int height); public voiddrawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight); public voiddrawString(String str, int x, int y, int anchor); public voiddrawSubString(String str, int offset, int len, int x, int y, int anchor); public voidfillArc(int x, int y, int width, int height, int startAngle, int arcAngle); public voidfillRect(int x, int y, int width, int ...
Read now
Unlock full access