PDFsharp-net6

CodeBase

Namespace: PdfSharp.Drawing.BarCodes

Represents the base class of all codes.

public abstract class CodeBase

Inheritance ObjectCodeBase

Properties

Size

Gets or sets the size.

public XSize Size { get; set; }

Property Value

XSize

Text

Gets or sets the text the bar code shall represent.

public string Text { get; set; }

Property Value

String

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

Methods

CheckCode(String)

When implemented in a derived class, determines whether the specified string can be used as Text for this bar code type.

protected abstract void CheckCode(string text)

Parameters

text String
The code string to check.

CalcDistance(AnchorType, AnchorType, XSize)

Calculates the distance between an old anchor point and a new anchor point.

public static XVector CalcDistance(AnchorType oldType, AnchorType newType, XSize size)

Parameters

oldType AnchorType

newType AnchorType

size XSize

Returns

XVector