public interface Canvas
This interface defines the set of methods that any concrete canvas should define. Concrete canvases should be defined in order to provide a way to draw a wafer representation on various window toolkig (AWT, SWT, etc).
Modifier and Type | Method and Description |
---|---|
void |
drawBackground(Color color,
int width,
int height)
Draws the picture background in the given color.
|
void |
drawDot(Color color,
int x,
int y)
Draws a dot, represented by a small rectangle.
|
void |
drawOval(Color color,
int x,
int y,
int width,
int height)
Draws an oval.
|
void |
drawRect(Color color,
int x,
int y,
int width,
int heigth)
Draws a rectangle.
|
void |
drawRect(Color color,
int x,
int y,
int width,
int heigth,
boolean border)
Draws a rectangle.
|
void |
drawString(int x,
int y,
String text)
Draws a text.
|
void drawRect(Color color, int x, int y, int width, int heigth, boolean border)
Color
- color of the squarex
- x value of the square.y
- y value of the square.width
- width of the square.heigth
- heigth of the square.void drawRect(Color color, int x, int y, int width, int heigth)
void drawDot(Color color, int x, int y)
color
- the pixel.x
- x value of the dot.y
- y value of the dot.void drawOval(Color color, int x, int y, int width, int height)
Color
- color of the ovalx
- x value of the oval center.y
- y value of the oval center.width
- width of the wafer circle.height
- height of the wafer circle.void drawString(int x, int y, String text)
x
- x value of the text.y
- y value of the text.text
- text to be displayed.void drawBackground(Color color, int width, int height)
color
- the background color.width
- width of the picture.height
- height of the picture.Copyright © 2016. All rights reserved.