Interface Canvas
- All Known Implementing Classes:
CanvasAWT
public interface Canvas
Canvas interface.
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).
- Author:
- Martin Pernollet
-
Method Summary
Modifier and TypeMethodDescriptionvoiddrawBackground(Color color, int width, int height) Draws the picture background in the given color.voidDraws a dot, represented by a small rectangle.voidDraws an oval.voidDraws a rectangle.voidDraws a rectangle.voiddrawString(int x, int y, String text) Draws a text.
-
Method Details
-
drawRect
Draws a rectangle.- Parameters:
x- x value of the square.y- y value of the square.width- width of the square.heigth- heigth of the square.Color- color of the square
-
drawRect
Draws a rectangle. -
drawDot
Draws a dot, represented by a small rectangle.- Parameters:
color- the pixel.x- x value of the dot.y- y value of the dot.
-
drawOval
Draws an oval.- Parameters:
x- 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.Color- color of the oval
-
drawString
Draws a text.- Parameters:
x- x value of the text.y- y value of the text.text- text to be displayed.
-
drawBackground
Draws the picture background in the given color.- Parameters:
color- the background color.width- width of the picture.height- height of the picture.
-