Package org.jzy3d.plot2d.rendering
Class CanvasSWT
java.lang.Object
org.jzy3d.plot2d.rendering.CanvasSWT
- All Implemented Interfaces:
Canvas
-
Constructor Summary
ConstructorDescriptionCanvasSWT
(org.eclipse.swt.graphics.GC graphic) Creates a new instance of Pencil2dAWT. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
void
drawBackground
(Color color, int width, int heigth) Draws the picture background in the given color.void
Draws a dot, represented by a small rectangle.void
Draws an oval.void
Draws a rectangle.void
Draws a rectangle.void
drawString
(int x, int y, String text) Draws a text.org.eclipse.swt.graphics.Color
toSWTColor
(Color color) Converts aImaging Color
into aSWT Color
.
-
Constructor Details
-
CanvasSWT
public CanvasSWT(org.eclipse.swt.graphics.GC graphic) Creates a new instance of Pencil2dAWT. A Pencil2dAWT provides an implementation for drawing wafer sites on an SWT GC (Graphic Context).
-
-
Method Details
-
dispose
public void dispose() -
drawString
Description copied from interface:Canvas
Draws a text.- Specified by:
drawString
in interfaceCanvas
- Parameters:
x
- x value of the text.y
- y value of the text.text
- text to be displayed.
-
drawRect
Description copied from interface:Canvas
Draws a rectangle. -
drawRect
Description copied from interface:Canvas
Draws a rectangle. -
drawDot
Description copied from interface:Canvas
Draws a dot, represented by a small rectangle. -
drawOval
Description copied from interface:Canvas
Draws an oval. -
drawBackground
Description copied from interface:Canvas
Draws the picture background in the given color.- Specified by:
drawBackground
in interfaceCanvas
- Parameters:
color
- the background color.width
- width of the picture.heigth
- height of the picture.
-
toSWTColor
Converts aImaging Color
into aSWT Color
. Note that SWT colors do not have an alpha channel.
-