QRCodeDrawingOptions Class
Options for drawing a QR code on a DrawingCanvas.
public sealed class QRCodeDrawingOptionsRemarks
The sizes are in the units of the canvas: pixels, unless a transform is applied.
Constructors
| Name | Description |
|---|---|
| QRCodeDrawingOptions() |
QRCodeDrawingOptions()
QRCodeDrawingOptions.cspublic QRCodeDrawingOptions()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 10. |
| QuietZoneModules | Gets or sets the number of quiet zone modules around the QR code. Default is 4. |
| SnapToPixels | Gets or sets a value indicating whether the module size and the position are rounded to whole units. Default is true. |
DarkBrush
QRCodeDrawingOptions.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 QR code.
LightBrush
QRCodeDrawingOptions.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
QRCodeDrawingOptions.csQuietZoneModules
QRCodeDrawingOptions.csSnapToPixels
QRCodeDrawingOptions.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.