PDFsharp-net6

BarCode

Namespace: PdfSharp.Drawing.BarCodes

Represents the base class of all bar codes.

public abstract class BarCode : CodeBase

Inheritance ObjectCodeBaseBarCode

Properties

WideNarrowRatio

When overridden in a derived class gets or sets the wide narrow ratio.

public double WideNarrowRatio { get; set; }

Property Value

Double

TextLocation

Gets or sets the location of the text next to the bar code.

public TextLocation TextLocation { get; set; }

Property Value

TextLocation

DataLength

Gets or sets the length of the data that defines the bar code.

public int DataLength { get; set; }

Property Value

Int32

StartChar

Gets or sets the optional start character.

public char StartChar { get; set; }

Property Value

Char

EndChar

Gets or sets the optional end character.

public char EndChar { get; set; }

Property Value

Char

TurboBit

Gets or sets a value indicating whether the turbo bit is to be drawn. (A turbo bit is something special to Kern (computer output processing) company (as far as I know))

public bool TurboBit { get; set; }

Property Value

Boolean

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

FromType(CodeType, String, XSize, CodeDirection)

Creates a bar code from the specified code type.

public static BarCode FromType(CodeType type, string text, XSize size, CodeDirection direction)

Parameters

type CodeType

text String

size XSize

direction CodeDirection

Returns

BarCode

FromType(CodeType, String, XSize)

Creates a bar code from the specified code type.

public static BarCode FromType(CodeType type, string text, XSize size)

Parameters

type CodeType

text String

size XSize

Returns

BarCode

FromType(CodeType, String)

Creates a bar code from the specified code type.

public static BarCode FromType(CodeType type, string text)

Parameters

type CodeType

text String

Returns

BarCode

FromType(CodeType)

Creates a bar code from the specified code type.

public static BarCode FromType(CodeType type)

Parameters

type CodeType

Returns

BarCode

InitRendering(BarCodeRenderInfo)

internal void InitRendering(BarCodeRenderInfo info)

Parameters

info BarCodeRenderInfo

Render(XGraphics, XBrush, XFont, XPoint)

When defined in a derived class renders the code.

protected internal abstract void Render(XGraphics gfx, XBrush brush, XFont font, XPoint position)

Parameters

gfx XGraphics

brush XBrush

font XFont

position XPoint