QRCodeSvgOptions Class

Options for rendering a QR code as SVG.

public sealed class QRCodeSvgOptions

Constructors

NameDescription
QRCodeSvgOptions()

QRCodeSvgOptions()

QRCodeSvgOptions.cs
public QRCodeSvgOptions()

No documentation is available.

Properties

NameDescription
DarkColorGets or sets the color for dark modules. Default is Color.Black.
LightColorGets or sets the color for light modules. Default is Color.White.
LogoImageHrefGets or sets the image source for a centered logo in the SVG output (for example, a URL or a data URI).
LogoSizePercentGets or sets the logo size as a percentage of the smallest SVG side. Default is 20.
ModuleSizeGets or sets the size of each module in SVG units. Default is 10.
QuietZoneModulesGets or sets the number of quiet zone modules around the QR code. Default is 4.

Gets or sets the color for dark modules. Default is Color.Black.

public Color DarkColor { get; set; }

Property value

Color

Gets or sets the color for light modules. Default is Color.White.

public Color LightColor { get; set; }

Property value

Color

LogoImageHref

QRCodeSvgOptions.cs

Gets or sets the image source for a centered logo in the SVG output (for example, a URL or a data URI).

public string? LogoImageHref { get; set; }

Property value

string?

Remarks

Logo rendering is only supported by the SVG renderer.

LogoSizePercent

QRCodeSvgOptions.cs

Gets or sets the logo size as a percentage of the smallest SVG side. Default is 20.

public int LogoSizePercent { get; set; }

Property value

int

Remarks

Used only when QRCodeSvgOptions.LogoImageHref is set. Valid values are between 1 and 100.

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

public int ModuleSize { get; set; }

Property value

int

QuietZoneModules

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