barcode4j 2.1.0

org.krysalis.barcode4j.impl
Class DrawingUtil

java.lang.Object
  extended by org.krysalis.barcode4j.impl.DrawingUtil

public class DrawingUtil
extends java.lang.Object

Drawing utilities.

Version:
$Id: DrawingUtil.java,v 1.2 2008/05/13 13:00:45 jmaerki Exp $
Author:
Jeremias Maerki

Constructor Summary
DrawingUtil()
           
 
Method Summary
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, java.lang.String text, double x1, double x2, double y1)
          Deprecated. Use drawText(Canvas, AbstractBarcodeBean, String, double, double, double, TextAlignment) instead.
static void drawJustifiedText(Canvas canvas, AbstractBarcodeBean bean, java.lang.String text, double x1, double x2, double y1)
          Deprecated. Use drawText(Canvas, AbstractBarcodeBean, String, double, double, double, TextAlignment) instead.
static void drawText(Canvas canvas, AbstractBarcodeBean bean, java.lang.String text, double x1, double x2, double y1, TextAlignment textAlign)
          Draws text on a canvas.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawingUtil

public DrawingUtil()
Method Detail

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 on
bean - the barcode bean to get the font settings from
ch - the character
x1 - the left boundary
x2 - the right boundary
y1 - the y coordinate of the font's baseline

drawJustifiedText

public static void drawJustifiedText(Canvas canvas,
                                     AbstractBarcodeBean bean,
                                     java.lang.String text,
                                     double x1,
                                     double x2,
                                     double y1)
Deprecated. Use drawText(Canvas, AbstractBarcodeBean, String, double, double, double, TextAlignment) instead.

Draws justified text on a canvas.

Parameters:
canvas - the canvas to paint on
bean - the barcode bean to get the font settings from
text - the text to paint
x1 - the left boundary
x2 - the right boundary
y1 - the y coordinate of the font's baseline

drawCenteredText

public static void drawCenteredText(Canvas canvas,
                                    AbstractBarcodeBean bean,
                                    java.lang.String text,
                                    double x1,
                                    double x2,
                                    double y1)
Deprecated. Use drawText(Canvas, AbstractBarcodeBean, String, double, double, double, TextAlignment) instead.

Draws centered text on a canvas.

Parameters:
canvas - the canvas to paint on
bean - the barcode bean to get the font settings from
text - the text to paint
x1 - the left boundary
x2 - the right boundary
y1 - the y coordinate of the font's baseline

drawText

public static void drawText(Canvas canvas,
                            AbstractBarcodeBean bean,
                            java.lang.String text,
                            double x1,
                            double x2,
                            double y1,
                            TextAlignment textAlign)
Draws text on a canvas.

Parameters:
canvas - the canvas to paint on
bean - the barcode bean to get the font settings from
text - the text to paint
x1 - the left boundary
x2 - the right boundary
y1 - the y coordinate of the font's baseline
textAlign - the text alignment

barcode4j 2.1.0

Copyright © 2000-2010 Jeremias Maerki. All rights reserved.