java.lang.Object
de.vwsoft.barcodelib4j.oned.Barcode
de.vwsoft.barcodelib4j.oned.LineageTwoWidth
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ImplCodabar
,ImplCode11
,ImplCode39
,ImplITF
Abstract class used as the basis for barcode types characterized by bars with only two distinct
widths.
Such barcodes are commonly referred to as two-width barcodes.
The ratio between the two widths can typically be freely selected within the range from 2:1 to 3:1. The primary objective is to optimize scanning efficiency. A higher ratio tends to make it easier for the scanner to distinguish between wide and narrow bars. This feature thus allows the barcode to adapt to different conditions and ensures readability resilience against factors such as poor print quality, environmental influences or physical damage.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final float
The default value is 2.5F, corresponding to a ratio of 2.5:1. -
Method Summary
Methods inherited from class de.vwsoft.barcodelib4j.oned.Barcode
clone, draw, draw, draw, getAddOn, getContent, getFont, getText, getTextOffset, isFontSizeAdjusted, isOptionalChecksumVisible, isTextOnTop, isTextVisible, newInstance, newInstance, setAddOn, setContent, setCustomText, setFont, setFontSizeAdjusted, setOptionalChecksumVisible, setTextOffset, setTextOnTop, setTextVisible, supportsAddOn, supportsAutoCompletion, supportsCustomText, supportsOptionalChecksum, supportsTextOnTop
-
Field Details
-
DEFAULT_RATIO
public static final float DEFAULT_RATIOThe default value is 2.5F, corresponding to a ratio of 2.5:1.
-
-
Method Details
-
setRatio
public void setRatio(float ratio) Description copied from class:Barcode
Sets the ratio between the width of the wide bars and the width of the narrow bars in two-width barcode types. The value must be in the range 2.0F to 3.0F, corresponding to ratios of 2.0:1 to 3.0:1. If not explicitly set, the default ratio isDEFAULT_RATIO
. -
getRatio
public float getRatio()Description copied from class:Barcode
Returns the ratio value.
-