Table of Contents

Class SvgRenderer

Namespace
ZXing.Rendering
Assembly
zxing.dll

Renders a barcode into a Svg image

public class SvgRenderer : IBarcodeRenderer<SvgRenderer.SvgImage>
Inheritance
SvgRenderer
Implements
Inherited Members

Constructors

SvgRenderer()

Initializes a new instance of the SvgRenderer class.

public SvgRenderer()

Fields

DefaultFontName

the default font name if nothing else is set (Arial)

public const string DefaultFontName = "Arial"

Field Value

string

DefaultFontSize

the default font size if nothing else is set (10)

public const int DefaultFontSize = 10

Field Value

int

Properties

Background

Gets or sets the background color.

[CLSCompliant(false)]
public SvgRenderer.Color Background { get; set; }

Property Value

SvgRenderer.Color

The background color.

FontName

Gets or sets the font family name

public string FontName { get; set; }

Property Value

string

The font family name.

FontSize

Gets or sets the font size in pixel

public int FontSize { get; set; }

Property Value

int

The font size in pixel.

Foreground

Gets or sets the foreground color.

[CLSCompliant(false)]
public SvgRenderer.Color Foreground { get; set; }

Property Value

SvgRenderer.Color

The foreground color.

Methods

Render(BitMatrix, BarcodeFormat, string)

Renders the specified matrix.

public SvgRenderer.SvgImage Render(BitMatrix matrix, BarcodeFormat format, string content)

Parameters

matrix BitMatrix

The matrix.

format BarcodeFormat

The format.

content string

The content.

Returns

SvgRenderer.SvgImage

Render(BitMatrix, BarcodeFormat, string, EncodingOptions)

Renders the specified matrix.

public SvgRenderer.SvgImage Render(BitMatrix matrix, BarcodeFormat format, string content, EncodingOptions options)

Parameters

matrix BitMatrix

The matrix.

format BarcodeFormat

The format.

content string

The content.

options EncodingOptions

The options.

Returns

SvgRenderer.SvgImage