QRCodeDrawingOptions Class

Options for drawing a QR code on a DrawingCanvas.

public sealed class QRCodeDrawingOptions

Remarks

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

Constructors

NameDescription
QRCodeDrawingOptions()

QRCodeDrawingOptions()

QRCodeDrawingOptions.cs
public QRCodeDrawingOptions()

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 10.
QuietZoneModulesGets or sets the number of quiet zone modules around the QR code. Default is 4.
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 QR code.

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 10.

public double ModuleSize { get; set; }

Property value

double

QuietZoneModules

QRCodeDrawingOptions.cs

Gets or sets the number of quiet zone modules around the QR code. Default is 4.

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.