Table of Contents

Class PolarFont

Namespace
PolarChart
Assembly
PolarChart.dll

This class is used to print text in an DrawingArea

public class PolarFont
Inheritance
PolarFont
Inherited Members
Extension Methods

Properties

Alignment

Gets/sets the alignment of the text. Use one of: -1:Left aligned, 0:Centered, 1:Right aligned

public int Alignment { get; set; }

Property Value

int

Bold

Gets/sets if the font is to be shown bold.

public bool Bold { get; set; }

Property Value

bool

Color

The font color as Windows color.

public int Color { get; set; }

Property Value

int

DrawingArea

Gets the DrawingArea this font is printing on.

public DrawingArea DrawingArea { get; }

Property Value

DrawingArea

FaceName

Gets/sets the name of the font.

public string FaceName { get; set; }

Property Value

string

Hspacing

Additional horizontal spacing (offsetting) for when printing the font in pixels. (move in X position).

public int Hspacing { get; set; }

Property Value

int

Italic

Gets/sets if the font is to be in italic.

public bool Italic { get; set; }

Property Value

bool

Rotation

Gets/sets the rotation of the font in degrees.

public int Rotation { get; set; }

Property Value

int

ShadowColor

The color of the shadow for the font as Windows color.

public int ShadowColor { get; set; }

Property Value

int

ShadowX

The offset of the shadow in X direction.

public int ShadowX { get; set; }

Property Value

int

ShadowY

The offset of the shadow in Y direction.

public int ShadowY { get; set; }

Property Value

int

Size

Gets/sets the size of the font in points.

public float Size { get; set; }

Property Value

float

TextLineHeight

Returns the height of one line of text (independent of the contents of the text).

public float TextLineHeight { get; }

Property Value

float

Underline

Gets/sets if the font is to be underlined.

public bool Underline { get; set; }

Property Value

bool

Vspacing

Additional vertical spacing (offsetting) for when printing the font in pixels. (move in Y position).

public int Vspacing { get; set; }

Property Value

int

Methods

PrintText(string, int, int, bool, bool)

Prints a text using this font.

public void PrintText(string pText, int pXposition, int pYposition, bool pSuppressSpacing, bool pSuppressRotation)

Parameters

pText string

The text to print. Multiline text is supported.

pXposition int

The x postion.

pYposition int

The y position.

pSuppressSpacing bool

Pass as True to suppress adding the spacing.

pSuppressRotation bool

Pass as True to suppress the rotation.

TextHeight(string)

Gets the height of a specified text when would be printed using the current font specifications.

public double TextHeight(string pText)

Parameters

pText string

The text to get the height for.

Returns

double

The height in pixels for the given text.

TextWidth(string)

Gets the width of a specified text when would be printed using the current font specifications.

public double TextWidth(string pText)

Parameters

pText string

The text to get the width for.

Returns

double

The width in pixels for the given text.