Class SymbolSvgOptions
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
Caption
public string? Caption { get; init; }
Property Value
DarkColor
Gets the CSS color of the dark modules and caption. Defaults to #000000.
public string DarkColor { get; init; }
Property Value
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
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
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
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(SymbolSvgOptions?)
public bool Equals(SymbolSvgOptions? other)
Parameters
otherSymbolSvgOptions
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(SymbolSvgOptions?, SymbolSvgOptions?)
public static bool operator ==(SymbolSvgOptions? left, SymbolSvgOptions? right)
Parameters
leftSymbolSvgOptionsrightSymbolSvgOptions
Returns
operator !=(SymbolSvgOptions?, SymbolSvgOptions?)
public static bool operator !=(SymbolSvgOptions? left, SymbolSvgOptions? right)
Parameters
leftSymbolSvgOptionsrightSymbolSvgOptions