|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--moka.lang.Object | +--moka.event.EventListener | +--moka.x.Component | +--moka.x.Image | +--moka.x.Canvas
Canvas class is a drawing component.
Field Summary | |
short |
color
The color of the pen use to draw in this Canvas. |
Fields inherited from class moka.x.Image |
bmp |
Fields inherited from class moka.x.Component |
enabled, height, listen, mnemonic, next, parent, prev, visible, width, x, y |
Constructor Summary | |
Canvas()
|
|
Canvas(moka.x.BITMAP_p bmp)
|
|
Canvas(java.lang.String file)
|
Method Summary | |
void |
drawPix(short dx,
short dy)
Draws a pixel in the canvas. |
void |
erase()
Erases the the canvas. |
boolean |
getPix(short dx,
short dy)
Gets the status of a pixel on the canvas. |
void |
save()
Saves the area of the canvas. |
void |
saveToFile(java.lang.String file)
Saves the bitmap displayed in the canvas to a PIC file. |
void |
use()
This method is invoked by the GEM when the user interacts with the Canvas. |
Methods inherited from class moka.x.Image |
finalize, paint, setBmp, setBmp |
Methods inherited from class moka.x.Component |
bottom, center, checkMnemonic, clean, eventTriggered, isCursorOver, left, move, onPaint, right, setBounds, setEnabled, setHeight, setMnemonic, setVisible, setWidth, setX, setY, toFront, top |
Methods inherited from class moka.event.EventListener |
eventTriggered |
Methods inherited from class moka.lang.Object |
equals, getClassName, toString |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public short color
Constructor Detail |
public Canvas()
public Canvas(moka.x.BITMAP_p bmp)
public Canvas(java.lang.String file)
Method Detail |
public void drawPix(short dx, short dy)
public boolean getPix(short dx, short dy)
public void save()
public void erase()
public void saveToFile(java.lang.String file)
file
- The PIC file namepublic void use()
use
in class Component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |