PDFsharp-net6

MatrixCode

Namespace: PdfSharp.Drawing.BarCodes

Represents the base class of all 2D codes.

public abstract class MatrixCode : CodeBase

Inheritance ObjectCodeBaseMatrixCode

Properties

Encoding

Gets or sets the encoding.

public string Encoding { get; set; }

Property Value

String

Columns

Gets or sets the number of columns.

public int Columns { get; set; }

Property Value

Int32

Rows

Gets or sets the number of rows.

public int Rows { get; set; }

Property Value

Int32

Text

Gets or sets the text.

public string Text { get; set; }

Property Value

String

Size

Gets or sets the size.

public XSize Size { get; set; }

Property Value

XSize

Anchor

Always MiddleCenter.

public AnchorType Anchor { get; set; }

Property Value

AnchorType

Direction

Gets or sets the drawing direction.

public CodeDirection Direction { get; set; }

Property Value

CodeDirection

Constructors

MatrixCode(String, String, Int32, Int32, XSize)

Initializes a new instance of the MatrixCode class.

public MatrixCode(string text, string encoding, int rows, int columns, XSize size)

Parameters

text String

encoding String

rows Int32

columns Int32

size XSize

Methods

Render(XGraphics, XBrush, XPoint)

When implemented in a derived class renders the 2D code.

protected internal abstract void Render(XGraphics gfx, XBrush brush, XPoint center)

Parameters

gfx XGraphics

brush XBrush

center XPoint

CheckCode(String)

Determines whether the specified string can be used as Text for this matrix code type.

protected void CheckCode(string text)

Parameters

text String