public interface DrawSurface
Modifier and Type | Method and Description |
---|---|
void |
drawCircle(int x,
int y,
int radius)
Draw a circle (The edge only).
|
void |
drawImage(int x,
int y,
java.awt.Image image)
Draw an image.
|
void |
drawLine(int x1,
int y1,
int x2,
int y2)
Draw a line between two points.
|
void |
drawOval(int x,
int y,
int width,
int height)
Draw an oval (the edge only).
|
void |
drawRectangle(int x,
int y,
int width,
int height)
Draw a rectangle (The edge only).
|
void |
drawText(int x,
int y,
java.lang.String text,
int fontSize)
Draw text.
|
void |
fillCircle(int x,
int y,
int radius)
Draw a circle (The edge and fill).
|
void |
fillOval(int x,
int y,
int width,
int height)
Draw an oval (The edge and fill).
|
void |
fillRectangle(int x,
int y,
int width,
int height)
Draw a rectangle (The edge and fill).
|
int |
getHeight()
The height in pixels of the drawing surface.
|
int |
getWidth()
The width in pixels of the drawing surface.
|
void |
setColor(java.awt.Color color)
Set the color that will be used to draw from now on.
|
int getWidth()
int getHeight()
void setColor(java.awt.Color color)
color
- the color value,void drawLine(int x1, int y1, int x2, int y2)
x1
- x value of fist point.y1
- y value of fist point.x2
- x value of second point.y2
- y value of second point.void drawOval(int x, int y, int width, int height)
x
- x value for the center of the oval.y
- y value for the center of the oval.width
- width of the oval.height
- height of the oval.void fillOval(int x, int y, int width, int height)
x
- x value for the center of the oval.y
- y value for the center of the oval.width
- width of the oval.height
- height of the oval.void drawRectangle(int x, int y, int width, int height)
x
- x value for the top left corner.y
- y value for the top left corner.width
- width of the rectangle.height
- height of the rectangle.void fillRectangle(int x, int y, int width, int height)
x
- x value for the top left corner.y
- y value for the top left corner.width
- width of the rectangle.height
- height of the rectangle.void drawImage(int x, int y, java.awt.Image image)
x
- x value for the top left corner.y
- y value for the top left corner.image
- image the draw.void drawCircle(int x, int y, int radius)
x
- x value for the center of the circle.y
- y value for the center of the circle.radius
- radius of the circle.void fillCircle(int x, int y, int radius)
x
- x value for the center of the circle.y
- y value for the center of the circle.radius
- radius of the circle.void drawText(int x, int y, java.lang.String text, int fontSize)
x
- x value for the top left corner.y
- y value for the top left corner.text
- the text the draw.fontSize
- the size of the text.