QRCodeRenderOptions Class

Options for rendering a QR code: as a scene, as SVG, and as an image or a PDF with the bridge packages.

public sealed class QRCodeRenderOptions

Remarks

The sizes are in the units of the scene: pixels in an image at the default scale, CSS pixels in SVG.

Constructors

NameDescription
QRCodeRenderOptions()

QRCodeRenderOptions()

QRCodeRenderOptions.cs
public QRCodeRenderOptions()

No documentation is available.

Properties

NameDescription
DarkPaintGets or sets the paint of the dark modules. Default is black.
LightPaintGets or sets the paint of the light modules and of the quiet zone. Default is white.
LogoGets or sets the logo drawn over the center of the QR code. Default is null: no logo.
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 positions are rounded to whole units. Default is true.

Gets or sets the paint of the dark modules. Default is black.

public ScenePaint DarkPaint { get; set; }

Property value

ScenePaint

Remarks

A gradient is in the coordinates of the scene: (0, 0) is the top-left corner of the quiet zone.

Gets or sets the paint of the light modules and of the quiet zone. Default is white.

public ScenePaint? LightPaint { get; set; }

Property value

ScenePaint?

Remarks

null draws no background: it is transparent, or the content under the drawing shows through.

Gets or sets the size of each module. Default is 10.

public double ModuleSize { get; set; }

Property value

double

QuietZoneModules

QRCodeRenderOptions.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 positions 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 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.