Class FourStateLogicHandler

java.lang.Object
org.krysalis.barcode4j.impl.AbstractVariableHeightLogicHandler
org.krysalis.barcode4j.impl.fourstate.FourStateLogicHandler
All Implemented Interfaces:
BarcodeLogicHandler, ClassicBarcodeLogicHandler

public class FourStateLogicHandler extends AbstractVariableHeightLogicHandler
Logic Handler to be used by "four-state" barcodes for painting on a Canvas.
Version:
$Id: FourStateLogicHandler.java,v 1.2 2008-05-13 13:00:43 jmaerki Exp $
Author:
Jeremias Maerki
  • Constructor Details

    • FourStateLogicHandler

      public FourStateLogicHandler(HeightVariableBarcodeBean bcBean, Canvas canvas)
      Constructor
      Parameters:
      bcBean - the barcode implementation class
      canvas - the canvas to paint to
  • Method Details

    • addBar

      public void addBar(boolean black, int height)
      This method indicates a new bar to be painted.
      Parameters:
      black - True if the bar is to be painted black, False if white/transparent
      height - logical weight of the bar. Concrete implementations are free to define this to be height or width. For example, 1 may be interpreted as "narrow bar", 2 as "wide bar" for certain barcodes. While other barcodes might define 1 to be "short bar", 2 as "tall bar". Also, this should not be confused with the effective painting width, or the actual physical size of the bar.