|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--superwaba.ext.xplat.io.print.Graphics
This class is used to send graphic command to the printer. You can get an
instance of it with the PrintManager.getGraphics
method.
Very important! Some printers will not support drawing in an alleatory way. Try always to draw things from top to bottom.
Constructor Summary | |
protected |
Graphics()
Package accessed constructor. |
Method Summary | |
abstract void |
drawImage(Image img,
int x,
int y)
Draws an image as in the given position. |
abstract void |
drawImage(Image img,
int x,
int y,
float scale)
Draws an image scaled with the given scale. |
abstract void |
drawLine(int ax,
int ay,
int bx,
int by)
Draws a line from ax,ay to bx,by using the current foreground color. |
abstract void |
drawRect(int x,
int y,
int width,
int height)
Draws a rectangle with the given parameters using the current foreground color. |
abstract void |
drawRoundRect(int x,
int y,
int width,
int height,
int r)
Draws a round rectangle with the given parameters using the current foreground color. |
abstract void |
drawText(String text,
int x,
int y)
Draws the given text in the given position, using the currently selected font and using the current foreground color. |
abstract void |
fillRect(int x,
int y,
int width,
int height)
Fills a rectangle with the given parameters using the current background color. |
abstract void |
fillRoundRect(int x,
int y,
int width,
int height,
int r)
Fills a round rectangle with the given parameters using the current background color. |
abstract void |
setBackColor(Color c)
In most printers, setting from anything than Color.BLACK will turn gray what you draw. |
abstract void |
setFont(Font font)
Sets the font to the given font. |
abstract void |
setForeColor(Color c)
In most printers, setting from anything than Color.BLACK will turn gray what you draw. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
toString,
wait,
wait |
Constructor Detail |
protected Graphics() throws NotSupportedException
Method Detail |
public abstract void setFont(Font font) throws PrinterException, NotSupportedException
public abstract void drawImage(Image img, int x, int y) throws PrinterException, NotSupportedException
public abstract void drawImage(Image img, int x, int y, float scale) throws PrinterException, NotSupportedException
public abstract void drawText(String text, int x, int y) throws PrinterException, NotSupportedException
public abstract void setForeColor(Color c)
public abstract void setBackColor(Color c)
public abstract void drawLine(int ax, int ay, int bx, int by) throws PrinterException, NotSupportedException
public abstract void drawRoundRect(int x, int y, int width, int height, int r) throws PrinterException, NotSupportedException
public abstract void drawRect(int x, int y, int width, int height) throws PrinterException, NotSupportedException
public abstract void fillRoundRect(int x, int y, int width, int height, int r) throws PrinterException, NotSupportedException
public abstract void fillRect(int x, int y, int width, int height) throws PrinterException, NotSupportedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |