Package org.krysalis.barcode4j.impl
Class DrawingUtil
java.lang.Object
org.krysalis.barcode4j.impl.DrawingUtil
Drawing utilities.
- Version:
- $Id: DrawingUtil.java,v 1.2 2008-05-13 13:00:45 jmaerki Exp $
- Author:
- Jeremias Maerki
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddrawCenteredChar(Canvas canvas, AbstractBarcodeBean bean, char ch, double x1, double x2, double y1) Draws a centered character on a canvas.static voiddrawCenteredText(Canvas canvas, AbstractBarcodeBean bean, String text, double x1, double x2, double y1) Deprecated.static voiddrawJustifiedText(Canvas canvas, AbstractBarcodeBean bean, String text, double x1, double x2, double y1) Deprecated.static voiddrawText(Canvas canvas, AbstractBarcodeBean bean, String text, double x1, double x2, double y1, TextAlignment textAlign) Draws text on a canvas.
-
Constructor Details
-
DrawingUtil
public DrawingUtil()
-
-
Method Details
-
drawCenteredChar
public static void drawCenteredChar(Canvas canvas, AbstractBarcodeBean bean, char ch, double x1, double x2, double y1) Draws a centered character on a canvas.- Parameters:
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 baseline
-
drawJustifiedText
public static void drawJustifiedText(Canvas canvas, AbstractBarcodeBean bean, String text, double x1, double x2, double y1) Deprecated.Draws justified text on a canvas.- Parameters:
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 baseline
-
drawCenteredText
public static void drawCenteredText(Canvas canvas, AbstractBarcodeBean bean, String text, double x1, double x2, double y1) Deprecated.Draws centered text on a canvas.- Parameters:
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 baseline
-
drawText
public static void drawText(Canvas canvas, AbstractBarcodeBean bean, String text, double x1, double x2, double y1, TextAlignment textAlign) Draws text on a canvas.- Parameters:
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 alignment
-
drawText(Canvas, AbstractBarcodeBean, String, double, double, double, TextAlignment)instead.