public class DrawingUtil extends Object
| Constructor and Description |
|---|
DrawingUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
drawCenteredChar(Canvas canvas,
AbstractBarcodeBean bean,
char ch,
double x1,
double x2,
double y1)
Draws a centered character on a canvas.
|
static void |
drawCenteredText(Canvas canvas,
AbstractBarcodeBean bean,
String text,
double x1,
double x2,
double y1)
Deprecated.
|
static void |
drawJustifiedText(Canvas canvas,
AbstractBarcodeBean bean,
String text,
double x1,
double x2,
double y1)
Deprecated.
|
static void |
drawText(Canvas canvas,
AbstractBarcodeBean bean,
String text,
double x1,
double x2,
double y1,
TextAlignment textAlign)
Draws text on a canvas.
|
public static void drawCenteredChar(Canvas canvas, AbstractBarcodeBean bean, char ch, double x1, double x2, double y1)
canvas - the canvas to paint onbean - the barcode bean to get the font settings fromch - the characterx1 - the left boundaryx2 - the right boundaryy1 - the y coordinate of the font's baselinepublic static void drawJustifiedText(Canvas canvas, AbstractBarcodeBean bean, String text, double x1, double x2, double y1)
drawText(Canvas, AbstractBarcodeBean, String, double, double, double, TextAlignment) instead.canvas - the canvas to paint onbean - the barcode bean to get the font settings fromtext - the text to paintx1 - the left boundaryx2 - the right boundaryy1 - the y coordinate of the font's baselinepublic static void drawCenteredText(Canvas canvas, AbstractBarcodeBean bean, String text, double x1, double x2, double y1)
drawText(Canvas, AbstractBarcodeBean, String, double, double, double, TextAlignment) instead.canvas - the canvas to paint onbean - the barcode bean to get the font settings fromtext - the text to paintx1 - the left boundaryx2 - the right boundaryy1 - the y coordinate of the font's baselinepublic static void drawText(Canvas canvas, AbstractBarcodeBean bean, String text, double x1, double x2, double y1, TextAlignment textAlign)
canvas - the canvas to paint onbean - the barcode bean to get the font settings fromtext - the text to paintx1 - the left boundaryx2 - the right boundaryy1 - the y coordinate of the font's baselinetextAlign - the text alignmentCopyright © 2003–2023. All rights reserved.