public class SizingOutput extends AbstractOutput
SizingOutput class is used to calculate the size of a barcode.
This class will not generate any output.
backgroundColour, barHeight, font, foregroundColour, painting, scalar| 构造器和说明 |
|---|
SizingOutput(java.awt.Font font,
double barwidth,
double barheight,
java.awt.Color fgColor,
java.awt.Color bgColor) |
SizingOutput(java.awt.Font font,
double barwidth,
double barheight,
java.awt.FontMetrics fm,
java.awt.Color fgColor,
java.awt.Color bgColor) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
beginDraw()
Sets up the drawing environment.
|
void |
beginDraw(double width,
double height)
Sets up the drawing environment.
|
void |
drawBar(int x,
int y,
int width,
int height,
boolean paintWithForegroundColor)
"Draws" a bar at the given coordinates.
|
double |
drawText(java.lang.String text,
double x,
double y,
double width)
Draw the specified text.
|
void |
drawText(java.lang.String leadChar,
LabelLayout createMarginLayout) |
void |
endDraw()
Balanced with startDraw() above, used for caching, output of epilogues (for
SVG), etc.
|
void |
endDraw(int width,
int height)
Balanced with startDraw() above, used for caching, output of epilogues (for
SVG), etc.
|
void |
paintBackground(int x,
int y,
int width,
int height)
Paint the background the background colour, based on the height and the width.
|
getBackgroundColour, getBarHeight, getBarWidth, getForegroundColour, setupForBlankDrawing, teardownFromBlankDrawingpublic SizingOutput(java.awt.Font font,
double barwidth,
double barheight,
java.awt.Color fgColor,
java.awt.Color bgColor)
public SizingOutput(java.awt.Font font,
double barwidth,
double barheight,
java.awt.FontMetrics fm,
java.awt.Color fgColor,
java.awt.Color bgColor)
public void drawBar(int x,
int y,
int width,
int height,
boolean paintWithForegroundColor)
drawBar 在类中 AbstractOutputx - the x coordinatey - the y coordinatewidth - the widthheight - the heightpaintWithForegroundColor - if true, use the foreground color, otherwise use the 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 barcode.public 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 paintedpublic void beginDraw(double width,
double height)
AbstractOutputbeginDraw 在类中 AbstractOutputwidth - The output width (in pixels) of the barcodeheight - The output height (in pixels) of the barcode.public void endDraw()
AbstractOutputendDraw 在类中 AbstractOutputpublic double drawText(java.lang.String text,
double x,
double y,
double width)
AbstractOutputdrawText 在类中 AbstractOutputtext - text to drawx - x positiony - y positionwidth - width of barcode (total)public void drawText(java.lang.String leadChar,
LabelLayout createMarginLayout)
drawText 在类中 AbstractOutput