LinearBarcodeSymbologyBase Class
Provides a base class for linear (1D) barcode symbologies.
public abstract class LinearBarcodeSymbologyBase : BarcodeSymbologyBase
- Inheritance:
- object ObservableObjectBase BarcodeSymbologyBase object
- Derived:
- CodabarSymbology Code128Symbology Code39Symbology Code93Symbology EanUpcSymbologyBase Interleaved2of5Symbology
Constructors
LinearBarcodeSymbologyBase()
Initializes an instance of the class.
protected LinearBarcodeSymbologyBase()
Properties
BarHeight
The height of the bars.
public double BarHeight { get; set; }
Property Value
- double:
The default value is
35.0.
Remarks
When calculating the desired height of the barcode, the BarHeight property will be used unless its height is less than the percentage of the desired width specified by MinHeightToWidthRatio. In that case the MinHeightToWidthRatio percentage of the desired width is used for height. This ensures that the barcode is always sized to be read properly.
MinHeightToWidthRatio
The minimum ratio that the height of the barcode must be in relation to its width.
public double MinHeightToWidthRatio { get; set; }
Property Value
- double:
The default value is
0.15(15%).
Remarks
Many symbologies indicate that the barcode's height must be at least a certain percentage of its width.
For instance, Code 39 specifies that the height must be at least 15% of the width.
When calculating the desired height of the barcode, the BarHeight property will be used unless its height is less than the percentage of the desired width specified by MinHeightToWidthRatio. In that case the MinHeightToWidthRatio percentage of the desired width is used for height. This ensures that the barcode is always sized to be read properly.
QuietZoneThickness
The quiet zone (margin) thickness around the barcode.
public override Thickness QuietZoneThickness { get; set; }
Property Value
- Thickness:
The default value varies based on the common standards for each symbology.
ValueAlignment
Indicates how the display value is aligned relative to the barcode.
public LinearBarcodeValueAlignment ValueAlignment { get; set; }
Property Value
- LinearBarcodeValueAlignment:
The default value is Center.
Methods
GetMargin()
Returns the margin thickness to apply around the barcode, which is typically used to provide a quiet zone for better scanning reliability.
public virtual Thickness GetMargin()
Returns
- Thickness:
The margin Avalonia.Thickness, which is generally the value of the QuietZoneThickness property.
GetModulesWidth(int)
Returns the width of the specified number of modules.
protected virtual double GetModulesWidth(int moduleCount)
| Parameter | Type | Description |
|---|---|---|
| moduleCount | int | The number of modules. |
Returns
- double:
The calculated width, taking into account any adjustments such as wide-to-narrow ratios that a symbology may require.
Inherited Members
- BarcodeSymbologyBase.CreateRenderData(BarcodeEncodingRequest)
- BarcodeSymbologyBase.CreateRenderDataAsync(BarcodeEncodingRequest, CancellationToken)
- BarcodeSymbologyBase.Validate(string)
- BarcodeSymbologyBase.ExampleValue
- BarcodeSymbologyBase.Name
- ObservableObjectBase.OnPropertyChanged(string)
- ObservableObjectBase.OnPropertyChanged(PropertyChangedEventArgs)
- ObservableObjectBase.OnPropertyChanging(string)
- ObservableObjectBase.OnPropertyChanging(PropertyChangingEventArgs)
- ObservableObjectBase.SetProperty<T>(ref T, T, string)
- ObservableObjectBase.PropertyChanged
- ObservableObjectBase.PropertyChanging
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()