|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jzy3d.plot2d.rendering.CanvasSWT
public class CanvasSWT
Constructor Summary | |
---|---|
CanvasSWT(org.eclipse.swt.graphics.GC graphic)
Creates a new instance of Pencil2dAWT. |
Method Summary | |
---|---|
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,
java.lang.String text)
Draws a text. |
static org.eclipse.swt.graphics.Color |
swt(Color color)
Converts a Imaging Color
into a SWT Color . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CanvasSWT(org.eclipse.swt.graphics.GC graphic)
Method Detail |
---|
public void dispose()
public void drawString(int x, int y, java.lang.String text)
Canvas
drawString
in interface Canvas
x
- x value of the text.y
- y value of the text.text
- text to be displayed.public void drawRect(Color color, int x, int y, int width, int height, boolean border)
Canvas
drawRect
in interface Canvas
x
- x value of the square.y
- y value of the square.width
- width of the square.height
- heigth of the square.public void drawRect(Color color, int x, int y, int width, int height)
Canvas
drawRect
in interface Canvas
public void drawDot(Color color, int x, int y)
Canvas
drawDot
in interface Canvas
color
- the pixel.x
- x value of the dot.y
- y value of the dot.public void drawOval(Color color, int x, int y, int width, int height)
Canvas
drawOval
in interface Canvas
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.public void drawBackground(Color color, int width, int heigth)
Canvas
drawBackground
in interface Canvas
color
- the background color.width
- width of the picture.heigth
- height of the picture.public static org.eclipse.swt.graphics.Color swt(Color color)
Imaging Color
into a SWT Color
.
Note that SWT colors do not have an alpha channel.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |