Class Barcode
An encoded one-dimensional barcode: a row of dark and light modules (the narrowest bar width), ready to be drawn by any renderer.
public sealed class Barcode : IEncodedSymbol
- Inheritance
-
Barcode
- Implements
- Inherited Members
- Extension Methods
Remarks
The barcode is immutable, so it can be cached and shared freely. It does not include the quiet zone; a renderer adds that margin itself, using QuietZone as the recommended width. Draw it with the SymbolSvg methods.
Properties
Format
Gets the symbology the barcode was encoded with.
public BarcodeFormat Format { get; }
Property Value
Height
Gets the number of rows: always 1, as the bars are stretched to any height.
public int Height { get; }
Property Value
this[int]
Gets whether the module at a position is dark (part of a bar).
public bool this[int x] { get; }
Parameters
xintThe module, from 0 at the left.
Property Value
this[int, int]
Gets whether the module at a position is dark.
public bool this[int x, int y] { get; }
Parameters
Property Value
QuietZone
Gets the light margin, in modules, the symbology needs on each side so scanners can find the bars.
public int QuietZone { get; }
Property Value
Text
Gets the human readable text printed under the bars, including any check digit that was added.
public string Text { get; }
Property Value
Width
Gets the width of the bars, in modules, without the quiet zone.
public int Width { get; }