barcode4j 2.1.0

org.krysalis.barcode4j
Class BarcodeDimension

java.lang.Object
  extended by org.krysalis.barcode4j.BarcodeDimension

public class BarcodeDimension
extends java.lang.Object

This class provides information on the dimensions of a barcode. It makes a distinction between the dimensions with and without quiet zone.

Version:
$Id: BarcodeDimension.java,v 1.3 2006/11/07 16:43:37 jmaerki Exp $
Author:
Jeremias Maerki

Constructor Summary
BarcodeDimension(double w, double h)
          Creates a new BarcodeDimension object.
BarcodeDimension(double w, double h, double wpq, double hpq, double xoffset, double yoffset)
          Creates a new BarcodeDimension object.
 
Method Summary
 java.awt.geom.Rectangle2D getBoundingRect()
           
 java.awt.geom.Rectangle2D getContentRect()
           
 double getHeight()
          Returns the height of the barcode (ignores quiet-zone).
 double getHeight(int orientation)
           
 double getHeightPlusQuiet()
          Returns the height of the barcode (quiet-zone included).
 double getHeightPlusQuiet(int orientation)
           
 double getWidth()
          Returns the width of the barcode (ignores quiet-zone).
 double getWidth(int orientation)
           
 double getWidthPlusQuiet()
          Returns the width of the barcode (quiet-zone included).
 double getWidthPlusQuiet(int orientation)
           
 double getXOffset()
          Returns the x-offset of the upper-left corner of the barcode within the extended barcode area.
 double getYOffset()
          Returns the y-offset of the upper-left corner of the barcode within the extended barcode area.
static int normalizeOrientation(int orientation)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BarcodeDimension

public BarcodeDimension(double w,
                        double h)
Creates a new BarcodeDimension object. No quiet-zone is respected.

Parameters:
w - width of the barcode in millimeters (mm).
h - height of the barcode in millimeters (mm).

BarcodeDimension

public BarcodeDimension(double w,
                        double h,
                        double wpq,
                        double hpq,
                        double xoffset,
                        double yoffset)
Creates a new BarcodeDimension object.

Parameters:
w - width of the raw barcode (without quiet-zone) in millimeters (mm).
h - height of the raw barcode (without quiet-zone) in millimeters (mm).
wpq - width of the barcode (quiet-zone included) in millimeters (mm).
hpq - height of the barcode (quiet-zone included) in millimeters (mm).
xoffset - x-offset if the upper-left corner of the barcode within the extended barcode area.
yoffset - y-offset if the upper-left corner of the barcode within the extended barcode area.
Method Detail

getHeight

public double getHeight()
Returns the height of the barcode (ignores quiet-zone).

Returns:
height in millimeters (mm)

getHeight

public double getHeight(int orientation)

getHeightPlusQuiet

public double getHeightPlusQuiet()
Returns the height of the barcode (quiet-zone included).

Returns:
height in millimeters (mm)

getHeightPlusQuiet

public double getHeightPlusQuiet(int orientation)

getWidth

public double getWidth()
Returns the width of the barcode (ignores quiet-zone).

Returns:
width in millimeters (mm)

normalizeOrientation

public static int normalizeOrientation(int orientation)

getWidth

public double getWidth(int orientation)

getWidthPlusQuiet

public double getWidthPlusQuiet()
Returns the width of the barcode (quiet-zone included).

Returns:
width in millimeters (mm)

getWidthPlusQuiet

public double getWidthPlusQuiet(int orientation)

getXOffset

public double getXOffset()
Returns the x-offset of the upper-left corner of the barcode within the extended barcode area.

Returns:
double x-offset in millimeters (mm)

getYOffset

public double getYOffset()
Returns the y-offset of the upper-left corner of the barcode within the extended barcode area.

Returns:
double y-offset in millimeters (mm)

getBoundingRect

public java.awt.geom.Rectangle2D getBoundingRect()
Returns:
a bounding rectangle (including quiet zone if applicable)

getContentRect

public java.awt.geom.Rectangle2D getContentRect()
Returns:
a content rectangle (excluding quiet zone)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

barcode4j 2.1.0

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