|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICanvas
Simple drawing surface, wraps an AWT Graphics
.
Method Summary | |
---|---|
void |
drawFilledCircle(int centerX,
int centerY,
int radius,
java.awt.Color color)
Draw a filled circle. |
void |
drawFilledRect(int upperLeftX,
int upperLeftY,
int width,
int height,
java.awt.Color color)
Draw a filled rectangle. |
void |
drawLine(int x0,
int y0,
int x1,
int y1,
java.awt.Color color)
Draw a line. |
void |
drawText(int x,
int y,
java.lang.String msg,
java.awt.Color color)
Draw text in the standard font. |
java.awt.Graphics |
getAwtGraphics()
Return the inner Graphics ; you can use it to draw complicated
shapes beyond what this interface offers. |
Method Detail |
---|
void drawFilledCircle(int centerX, int centerY, int radius, java.awt.Color color)
centerX
- X of center (in pixels)centerY
- Y of center (in pixels)radius
- radius in pixelscolor
- color for the circle.void drawText(int x, int y, java.lang.String msg, java.awt.Color color)
x
- x coordinate of baseline of first charactery
- y coordinate of baseline of first charactermsg
- a textcolor
- text colorvoid drawFilledRect(int upperLeftX, int upperLeftY, int width, int height, java.awt.Color color)
upperLeftX
- X of upper left cornerupperLeftY
- Y of upper left cornerwidth
- width of rectangleheight
- height of rectanglecolor
- fill colorvoid drawLine(int x0, int y0, int x1, int y1, java.awt.Color color)
x0
- first pointy0
- first pointx1
- second pointy1
- second pointcolor
- colorjava.awt.Graphics getAwtGraphics()
Graphics
; you can use it to draw complicated
shapes beyond what this interface offers.
Graphics
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |