|
||||||||||
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 |
drawImage(java.awt.Image img,
int x,
int y)
Draws as much of the specified area of the specified image as is currently available. |
void |
drawImage(java.awt.Image img,
int x,
int y,
int sx1,
int sy1,
int sx2,
int sy2)
Draws as much of the specified area of the specified image as is currently available. |
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
- colorvoid drawImage(java.awt.Image img, int x, int y)
img
- the specified image to be drawn. This method does nothing if
img
is null.x
- the x coordinate.y
- the y coordinate.Image
void drawImage(java.awt.Image img, int x, int y, int sx1, int sy1, int sx2, int sy2)
x
- the x coordinate.y
- the y coordinate.sx1
- the x coordinate of the first corner of the source
rectangle.sy1
- the y coordinate of the first corner of the source
rectangle.sx2
- the x coordinate of the second corner of the source
rectangle.sy2
- the y coordinate of the second corner of the source
rectangle.Image
java.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 |