Package org.jzy3d.plot2d.rendering
Class CanvasSWT
- java.lang.Object
-
- org.jzy3d.plot2d.rendering.CanvasSWT
-
-
Constructor Summary
Constructors Constructor Description CanvasSWT(org.eclipse.swt.graphics.GC graphic)
Creates a new instance of Pencil2dAWT.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
void
drawBackground(Color color, int width, int heigth)
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 height)
Draws a rectangle.void
drawRect(Color color, int x, int y, int width, int height, boolean border)
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
.
-
-
-
Method Detail
-
dispose
public void dispose()
-
drawString
public void drawString(int x, int y, String text)
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
public void drawRect(Color color, int x, int y, int width, int height, boolean border)
Description copied from interface:Canvas
Draws a rectangle.
-
drawRect
public void drawRect(Color color, int x, int y, int width, int height)
Description copied from interface:Canvas
Draws a rectangle.
-
drawDot
public void drawDot(Color color, int x, int y)
Description copied from interface:Canvas
Draws a dot, represented by a small rectangle.
-
drawOval
public void drawOval(Color color, int x, int y, int width, int height)
Description copied from interface:Canvas
Draws an oval.
-
drawBackground
public void drawBackground(Color color, int width, int heigth)
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
public org.eclipse.swt.graphics.Color toSWTColor(Color color)
Converts aImaging Color
into aSWT Color
. Note that SWT colors do not have an alpha channel.
-
-