barcode4j 2.1.0

org.krysalis.barcode4j.output
Interface CanvasProvider

All Known Implementing Classes:
AbstractCanvasProvider, AbstractSVGGeneratingCanvasProvider, AbstractXMLGeneratingCanvasProvider, BitmapCanvasProvider, EPSCanvasProvider, Java2DCanvasProvider, JDOMSVGCanvasProvider, SVGCanvasProvider

public interface CanvasProvider

This interface is implemented to provide an output format that is using a coordinate system.

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

Method Summary
 void deviceCenteredText(java.lang.String text, double x1, double x2, double y1, java.lang.String fontName, double fontSize)
          Draws centered text.
 void deviceFillRect(double x, double y, double w, double h)
          Paints a filled rectangle.
 void deviceJustifiedText(java.lang.String text, double x1, double x2, double y1, java.lang.String fontName, double fontSize)
          Draws justified text.
 void deviceText(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.
 BarcodeDimension getDimensions()
          Returns the barcode dimensions once established.
 int getOrientation()
          Returns the orientation of the barcode.
 

Method Detail

establishDimensions

void establishDimensions(BarcodeDimension dim)
Sets the dimensions of the barcode.

Parameters:
dim - the dimensions of the barcode

getDimensions

BarcodeDimension getDimensions()
Returns the barcode dimensions once established.

Returns:
the barcode dimensions

getOrientation

int getOrientation()
Returns the orientation of the barcode.

Returns:
the orientation (0, 90, 180 or 270)

deviceFillRect

void deviceFillRect(double x,
                    double y,
                    double w,
                    double h)
Paints a filled rectangle.

Parameters:
x - x coordinate of the upper left corner
y - y coordinate of the upper left corner
w - the width
h - the height

deviceJustifiedText

void deviceJustifiedText(java.lang.String text,
                         double x1,
                         double x2,
                         double y1,
                         java.lang.String fontName,
                         double fontSize)
Draws justified text.

Parameters:
text - the text to draw
x1 - the left boundary
x2 - the right boundary
y1 - the y coordinate
fontName - the name of the font
fontSize - the size of the font

deviceCenteredText

void deviceCenteredText(java.lang.String text,
                        double x1,
                        double x2,
                        double y1,
                        java.lang.String fontName,
                        double fontSize)
Draws centered text.

Parameters:
text - the text to draw
x1 - the left boundary
x2 - the right boundary
y1 - the y coordinate
fontName - the name of the font
fontSize - the size of the font

deviceText

void deviceText(java.lang.String text,
                double x1,
                double x2,
                double y1,
                java.lang.String fontName,
                double fontSize,
                TextAlignment textAlign)
Draws text.

Parameters:
text - the text to draw
x1 - the left boundary
x2 - the right boundary
y1 - the y coordinate
fontName - the name of the font
fontSize - the size of the font
textAlign - the text alignment

barcode4j 2.1.0

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