public class AwtCanvasDrawer extends java.lang.Object implements GralCanvas_ifc
Modifier and Type | Field and Description |
---|---|
private java.awt.Graphics |
graphicContext |
private AwtMng |
widgMng |
version
Constructor and Description |
---|
AwtCanvasDrawer(AwtMng widgMng,
java.awt.Graphics 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 java.awt.Graphics graphicContext
private final AwtMng widgMng
AwtCanvasDrawer(AwtMng widgMng, java.awt.Graphics 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