Class QrStyleOptions
Creates the styling options for a QR code, including dimensions, margins, color, background color, annotations, and logo.
Inheritance
Namespace: IronQr
Assembly: IronQr.dll
Syntax
public sealed class QrStyleOptions : ValueType
Constructors
QrStyleOptions()
Initializes a new instance of the QrStyleOptions struct with default values.
Declaration
public QrStyleOptions()
QrStyleOptions(Int32, Int32, Color, Color, Nullable<QrLogo>)
Initializes a new instance of the QrStyleOptions struct with specified values.
Declaration
public QrStyleOptions(int dimensions = 300, int margins = 10, Color color = null, Color backgroundColor = null, Nullable<QrLogo> logo = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | dimensions | The width and height of the QR code in pixels. Defaults to 300. |
| System.Int32 | margins | The whitespace margins around the QR code. Defaults to 10. |
| IronSoftware.Drawing.Color | color | The color of the QR code's content. Defaults to black. |
| IronSoftware.Drawing.Color | backgroundColor | The background color of the QR code. Defaults to white. |
| System.Nullable<QrLogo> | logo | An optional logo to be embedded within the QR code. |
Properties
BackgroundColor
Specifies the background color of the QR code.
Declaration
public Color BackgroundColor { get; set; }
Property Value
| Type | Description |
|---|---|
| IronSoftware.Drawing.Color |
Color
Specifies the color of the QR code's content.
Declaration
public Color Color { get; set; }
Property Value
| Type | Description |
|---|---|
| IronSoftware.Drawing.Color |
Dimensions
The width and height of the QR code in pixels.
Declaration
public int Dimensions { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Logo
Specifies an optional logo to be embedded within the QR code.
Declaration
public Nullable<QrLogo> Logo { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<QrLogo> |
MarginBottom
Specifies the amount of whitespace or padding at the bottom of the QR code.
Declaration
public int MarginBottom { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
MarginLeft
Specifies the amount of whitespace or padding at the left of the QR code.
Declaration
public int MarginLeft { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
MarginRight
Specifies the amount of whitespace or padding at the right of the QR code.
Declaration
public int MarginRight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Margins
Sets the whitespace margins around the QR code, applying the same value to the top, bottom, left, and right.
Declaration
public int Margins { set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
MarginTop
Specifies the amount of whitespace or padding at the top of the QR code.
Declaration
public int MarginTop { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |