public class GraphicsOutput extends AbstractOutput
backgroundColour, font, foregroundColour, painting, scalar| Constructor and Description |
|---|
GraphicsOutput(Graphics2D graphics,
Font font,
Color fgColor,
Color bgColor)
Creates a Graphics2D AbstractOutput
|
| Modifier and Type | Method and Description |
|---|---|
void |
beginDraw()
From AbstractOutput - Saves current colour.
|
int |
drawBar(int x,
int y,
int width,
int height,
boolean paintWithForegroundColor)
From AbstractOutput - Draws a bar at the given coordinates onto the output Graphics.
|
int |
drawText(String text,
LabelLayout labelLayout)
Draw the specified text.
|
void |
endDraw(int width,
int height)
From AbstractOutput - Restores colour.
|
void |
paintBackground(int x,
int y,
int width,
int height)
Paint the background the background colour, based on the height and the width.
|
toggleDrawingColorpublic GraphicsOutput(Graphics2D graphics, Font font, Color fgColor, Color bgColor)
graphics - The graphics to output tofont - The font for text renderingfgColor - Foreground ColorbgColor - Background Colorpublic void beginDraw()
public void endDraw(int width,
int height)
width - The output width (in pixels) of the barcodeheight - The output height (in pixels) of the barcodepublic int drawBar(int x,
int y,
int width,
int height,
boolean paintWithForegroundColor)
x - the x coordinatey - the y coordinatewidth - the widthheight - the heightpaintWithForegroundColor - if true, use the foreground color, otherwise use the background colorpublic int drawText(String text, LabelLayout labelLayout) throws OutputException
Outputtext - text to drawlabelLayout - the text layout calculatorOutputExceptionpublic void paintBackground(int x,
int y,
int width,
int height)
x - the x coordinatey - the y coordinatewidth - the width to be paintedheight - the height to be paintedCopyright © 2003-2013 barbecue.sourceforge.net. All Rights Reserved.