Interface CanvasProvider

All Known Implementing Classes:
AbstractCanvasProvider, AbstractSVGGeneratingCanvasProvider, AbstractXMLGeneratingCanvasProvider, BitmapCanvasProvider, EPSCanvasProvider, Java2DCanvasProvider, 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 Details

    • 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(String text, double x1, double x2, double y1, 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(String text, double x1, double x2, double y1, 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(String text, double x1, double x2, double y1, 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