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 Barcode2DRenderOptionsRemarks
The sizes are in the units of the scene: pixels in an image at the default scale, CSS pixels in SVG.
Constructors
| Name | Description |
|---|---|
| Barcode2DRenderOptions() |
Barcode2DRenderOptions()
Barcode2DRenderOptions.cspublic Barcode2DRenderOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| DarkPaint | Gets or sets the paint of the dark modules. Default is black. |
| LightPaint | Gets or sets the paint of the light modules and of the quiet zone. Default is white. |
| ModuleSize | Gets or sets the size of each module. Default is 4. |
| QuietZoneModules | Gets or sets the number of quiet zone modules around the symbol. Default is 2. |
| SnapToPixels | Gets or sets a value indicating whether the module size and the positions are rounded to whole units. Default is true. |
DarkPaint
Barcode2DRenderOptions.csGets or sets the paint of the dark modules. Default is black.
public ScenePaint DarkPaint { get; set; }Property value
Remarks
A gradient is in the coordinates of the scene: (0, 0) is the top-left corner of the quiet zone.
LightPaint
Barcode2DRenderOptions.csGets or sets the paint of the light modules and of the quiet zone. Default is white.
public ScenePaint? LightPaint { get; set; }Property value
Remarks
null draws no background: it is transparent, or the content under the drawing shows through.
ModuleSize
Barcode2DRenderOptions.csQuietZoneModules
Barcode2DRenderOptions.csSnapToPixels
Barcode2DRenderOptions.csGets 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
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.