Barcode2DDrawingOptions Class
Options for drawing a two-dimensional barcode (Data Matrix, PDF417 or Aztec) on a DrawingCanvas.
public sealed class Barcode2DDrawingOptionsRemarks
The sizes are in the units of the canvas: pixels, unless a transform is applied.
Constructors
| Name | Description |
|---|---|
| Barcode2DDrawingOptions() |
Barcode2DDrawingOptions()
Barcode2DDrawingOptions.cspublic Barcode2DDrawingOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| DarkBrush | Gets or sets the brush of the dark modules. Default is a black SolidBrush. |
| LightBrush | Gets or sets the brush of the light modules and of the quiet zone. Default is a white SolidBrush. |
| ModuleSize | Gets or sets the size of each module. Default is 4. |
| QuietZoneModules | Gets or sets the number of quiet zone modules around the barcode. Default is 2, the largest minimum of the supported symbologies (PDF417). |
| SnapToPixels | Gets or sets a value indicating whether the module size and the position are rounded to whole units. Default is true. |
DarkBrush
Barcode2DDrawingOptions.csGets or sets the brush of the dark modules. Default is a black SolidBrush.
public Brush DarkBrush { get; set; }Property value
Remarks
The brush is in the coordinates of the canvas: a gradient spans the canvas, not the barcode.
LightBrush
Barcode2DDrawingOptions.csGets 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
Remarks
null leaves the pixels under the light modules and the quiet zone unchanged.
ModuleSize
Barcode2DDrawingOptions.csQuietZoneModules
Barcode2DDrawingOptions.csSnapToPixels
Barcode2DDrawingOptions.csGets 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
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.