Table of Contents

Class SymbolSvgOptions

Namespace
TwBlazor.Services.Encoding
Assembly
TwBlazor.dll

Settings for writing an IEncodedSymbol out as a standalone SVG document.

public sealed record SymbolSvgOptions : IEquatable<SymbolSvgOptions>
Inheritance
SymbolSvgOptions
Implements
Inherited Members

Constructors

SymbolSvgOptions()

public SymbolSvgOptions()

Properties

BarHeight

Gets the height of the bars of a one-dimensional barcode, in modules. Defaults to 50. Two-dimensional symbols ignore it.

public int BarHeight { get; init; }

Property Value

int

Caption

Gets the text printed under the symbol, such as a barcode's Text, or null (the default) for none.

public string? Caption { get; init; }

Property Value

string

DarkColor

Gets the CSS color of the dark modules and caption. Defaults to #000000.

public string DarkColor { get; init; }

Property Value

string

Default

Gets the shared default options: the symbol's own quiet zone, black on white, no caption and no title.

public static SymbolSvgOptions Default { get; }

Property Value

SymbolSvgOptions

LightColor

Gets the CSS color of the background, or null for a transparent one. Defaults to #ffffff. Keep strong contrast with DarkColor: most scanners need dark modules on a light background.

public string? LightColor { get; init; }

Property Value

string

QuietZone

Gets the light margin, in modules, or null (the default) for the symbol's own QuietZone. Scanners struggle with less.

public int? QuietZone { get; init; }

Property Value

int?

Title

Gets the text alternative written into the SVG's <title>, or null for none. Set it when the SVG is shown on its own so assistive technology can describe it.

public string? Title { get; init; }

Property Value

string

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(SymbolSvgOptions?)

public bool Equals(SymbolSvgOptions? other)

Parameters

other SymbolSvgOptions

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(SymbolSvgOptions?, SymbolSvgOptions?)

public static bool operator ==(SymbolSvgOptions? left, SymbolSvgOptions? right)

Parameters

left SymbolSvgOptions
right SymbolSvgOptions

Returns

bool

operator !=(SymbolSvgOptions?, SymbolSvgOptions?)

public static bool operator !=(SymbolSvgOptions? left, SymbolSvgOptions? right)

Parameters

left SymbolSvgOptions
right SymbolSvgOptions

Returns

bool