public class SwtCanvasDrawer extends java.lang.Object implements GralCanvas_ifc
Modifier and Type | Field and Description |
---|---|
private GC |
graphicContext |
private SwtMng |
widgMng |
version
Constructor and Description |
---|
SwtCanvasDrawer(SwtMng widgMng,
GC graphicContext) |
Modifier and Type | Method and Description |
---|---|
void |
drawImage(GralImageBase image,
int x,
int y,
int dx,
int dy,
GralRectangle imagePixelSize) |
void |
drawLine(GralColor color,
int x1,
int y1,
int x2,
int y2)
Accepts a order to draw a line.
|
void |
drawText(java.lang.String text) |
void |
setTextStyle(GralColor color,
GralFont font,
int origin) |
private final GC graphicContext
private final SwtMng widgMng
SwtCanvasDrawer(SwtMng widgMng, GC graphicContext)
public void drawImage(GralImageBase image, int x, int y, int dx, int dy, GralRectangle imagePixelSize)
drawImage
in interface GralCanvas_ifc
public void drawLine(GralColor color, int x1, int y1, int x2, int y2)
GralCanvas_ifc
drawLine
in interface GralCanvas_ifc
x1
- TODO yet it is pixel coordinates, use GralGrid coordinates.public void drawText(java.lang.String text)
drawText
in interface GralCanvas_ifc
public void setTextStyle(GralColor color, GralFont font, int origin)
setTextStyle
in interface GralCanvas_ifc