|
barcode4j 2.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.krysalis.barcode4j.output.Canvas
public class Canvas
This class is used by barcode rendering classes that paint a barcode using a coordinate system. The class delegates the call to a CanvasProvider and provides some convenience methods.
| Constructor Summary | |
|---|---|
Canvas(CanvasProvider canvasImp)
Main constructor |
|
| Method Summary | |
|---|---|
void |
drawCenteredChar(char ch,
double x1,
double x2,
double y1,
java.lang.String fontName,
double fontSize)
Draws a centered character. |
void |
drawCenteredText(java.lang.String text,
double x1,
double x2,
double y1,
java.lang.String fontName,
double fontSize)
Deprecated. Use drawText(String, double, double, double, String, double, TextAlignment) instead. |
void |
drawJustifiedText(java.lang.String text,
double x1,
double x2,
double y1,
java.lang.String fontName,
double fontSize)
Deprecated. Use drawText(String, double, double, double, String, double, TextAlignment) instead. |
void |
drawRect(double x1,
double y1,
double x2,
double y2)
Draws a rectangle. |
void |
drawRectWH(double x,
double y,
double w,
double h)
Draws a rectangle |
void |
drawText(java.lang.String text,
double x1,
double x2,
double y1,
java.lang.String fontName,
double fontSize,
TextAlignment textAlign)
Draws text. |
void |
establishDimensions(BarcodeDimension dim)
Sets the dimensions of the barcode. |
CanvasProvider |
getCanvasImp()
Returns the canvas provider in use. |
int |
getOrientation()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Canvas(CanvasProvider canvasImp)
canvasImp - the canvas provider to use| Method Detail |
|---|
public CanvasProvider getCanvasImp()
public void establishDimensions(BarcodeDimension dim)
dim - the barcode dimensionspublic int getOrientation()
public void drawRect(double x1,
double y1,
double x2,
double y2)
x1 - x coordinate of the upper left cornery1 - y coordinate of the upper left cornerx2 - x coordinate of the lower right cornery2 - y coordinate of the lower right corner
public void drawRectWH(double x,
double y,
double w,
double h)
x - x coordinate of the upper left cornery - y coordinate of the upper left cornerw - the widthh - the height
public void drawCenteredChar(char ch,
double x1,
double x2,
double y1,
java.lang.String fontName,
double fontSize)
ch - the characterx1 - the left boundaryx2 - the right boundaryy1 - the y coordinatefontName - the name of the fontfontSize - the size of the font
public void drawJustifiedText(java.lang.String text,
double x1,
double x2,
double y1,
java.lang.String fontName,
double fontSize)
drawText(String, double, double, double, String, double, TextAlignment) instead.
text - the text to drawx1 - the left boundaryx2 - the right boundaryy1 - the y coordinatefontName - the name of the fontfontSize - the size of the font
public void drawCenteredText(java.lang.String text,
double x1,
double x2,
double y1,
java.lang.String fontName,
double fontSize)
drawText(String, double, double, double, String, double, TextAlignment) instead.
text - the text to drawx1 - the left boundaryx2 - the right boundaryy1 - the y coordinatefontName - the name of the fontfontSize - the size of the font
public void drawText(java.lang.String text,
double x1,
double x2,
double y1,
java.lang.String fontName,
double fontSize,
TextAlignment textAlign)
text - the text to drawx1 - the left boundaryx2 - the right boundaryy1 - the y coordinatefontName - the name of the fontfontSize - the size of the fonttextAlign - the text alignment
|
barcode4j 2.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||