Barcode2DDrawingOptions Class

Options for drawing a two-dimensional barcode (Data Matrix, PDF417 or Aztec) on a DrawingCanvas.

public sealed class Barcode2DDrawingOptions

Remarks

The sizes are in the units of the canvas: pixels, unless a transform is applied.

Constructors

NameDescription
Barcode2DDrawingOptions()

Barcode2DDrawingOptions()

Barcode2DDrawingOptions.cs
public Barcode2DDrawingOptions()

No documentation is available.

Properties

NameDescription
DarkBrushGets or sets the brush of the dark modules. Default is a black SolidBrush.
LightBrushGets or sets the brush of the light modules and of the quiet zone. Default is a white SolidBrush.
ModuleSizeGets or sets the size of each module. Default is 4.
QuietZoneModulesGets or sets the number of quiet zone modules around the barcode. Default is 2, the largest minimum of the supported symbologies (PDF417).
SnapToPixelsGets or sets a value indicating whether the module size and the position are rounded to whole units. Default is true.

Gets or sets the brush of the dark modules. Default is a black SolidBrush.

public Brush DarkBrush { get; set; }

Property value

Brush

Remarks

The brush is in the coordinates of the canvas: a gradient spans the canvas, not the barcode.

Gets or sets the brush of the light modules and of the quiet zone. Default is a white SolidBrush.

public Brush? LightBrush { get; set; }

Property value

Brush?

Remarks

null leaves the pixels under the light modules and the quiet zone unchanged.

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 barcode. Default is 2, the largest minimum of the supported symbologies (PDF417).

public int QuietZoneModules { get; set; }

Property value

int

Gets or sets a value indicating whether the module size and the position 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, which scanners read best. The module size rounds to the nearest whole number, at least 1. Set false to draw at the exact size and position.