Table of Contents

Class CodeBase

Namespace
PdfSharp.Drawing.BarCodes
Assembly
PdfSharp.dll

Represents the base class of all codes.

public abstract class CodeBase
Inheritance
CodeBase
Derived
Inherited Members

Constructors

CodeBase(string, XSize, CodeDirection)

Initializes a new instance of the CodeBase class.

protected CodeBase(string text, XSize size, CodeDirection direction)

Parameters

text string
size XSize
direction CodeDirection

Properties

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

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

Methods

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

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.