Barcode2DRenderOptions Class

Options for rendering a two-dimensional barcode (Data Matrix, PDF417, Aztec): as a scene, as SVG, and as an image or a PDF with the bridge packages.

public sealed class Barcode2DRenderOptions

Remarks

The sizes are in the units of the scene: pixels in an image at the default scale, CSS pixels in SVG.

Constructors

NameDescription
Barcode2DRenderOptions()

Barcode2DRenderOptions()

Barcode2DRenderOptions.cs
public Barcode2DRenderOptions()

No documentation is available.

Properties

NameDescription
DarkPaintGets or sets the paint of the dark modules. Default is black.
LightPaintGets or sets the paint of the light modules and of the quiet zone. Default is white.
ModuleSizeGets or sets the size of each module. Default is 4.
QuietZoneModulesGets or sets the number of quiet zone modules around the symbol. Default is 2.
SnapToPixelsGets or sets a value indicating whether the module size and the positions are rounded to whole units. Default is true.

Gets or sets the paint of the dark modules. Default is black.

public ScenePaint DarkPaint { get; set; }

Property value

ScenePaint

Remarks

A gradient is in the coordinates of the scene: (0, 0) is the top-left corner of the quiet zone.

Gets or sets the paint of the light modules and of the quiet zone. Default is white.

public ScenePaint? LightPaint { get; set; }

Property value

ScenePaint?

Remarks

null draws no background: it is transparent, or the content under the drawing shows through.

Gets or sets the size of each module. Default is 4.

public double ModuleSize { get; set; }

Property value

double

Gets or sets the number of quiet zone modules around the symbol. Default is 2.

public int QuietZoneModules { get; set; }

Property value

int

Gets or sets a value indicating whether the module size and the positions are rounded to whole units. Default is true.

public bool SnapToPixels { get; set; }

Property value

bool

Remarks

Rounding gives every module the same size and sharp edges in images, which scanners read best. The module size rounds to the nearest whole number, at least 1. Set false to draw at the exact size.