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
Bold
Gets/sets if the font is to be shown bold.
public bool Bold { get; set; }
Property Value
Color
The font color as Windows color.
public int Color { get; set; }
Property Value
DrawingArea
Gets the DrawingArea this font is printing on.
public DrawingArea DrawingArea { get; }
Property Value
FaceName
Gets/sets the name of the font.
public string FaceName { get; set; }
Property Value
Hspacing
Additional horizontal spacing (offsetting) for when printing the font in pixels. (move in X position).
public int Hspacing { get; set; }
Property Value
Italic
Gets/sets if the font is to be in italic.
public bool Italic { get; set; }
Property Value
Rotation
Gets/sets the rotation of the font in degrees.
public int Rotation { get; set; }
Property Value
ShadowColor
The color of the shadow for the font as Windows color.
public int ShadowColor { get; set; }
Property Value
ShadowX
The offset of the shadow in X direction.
public int ShadowX { get; set; }
Property Value
ShadowY
The offset of the shadow in Y direction.
public int ShadowY { get; set; }
Property Value
Size
Gets/sets the size of the font in points.
public float Size { get; set; }
Property Value
TextLineHeight
Returns the height of one line of text (independent of the contents of the text).
public float TextLineHeight { get; }
Property Value
Underline
Gets/sets if the font is to be underlined.
public bool Underline { get; set; }
Property Value
Vspacing
Additional vertical spacing (offsetting) for when printing the font in pixels. (move in Y position).
public int Vspacing { get; set; }
Property Value
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
stringThe text to print. Multiline text is supported.
pXposition
intThe x postion.
pYposition
intThe y position.
pSuppressSpacing
boolPass as True to suppress adding the spacing.
pSuppressRotation
boolPass 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
stringThe 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
stringThe text to get the width for.
Returns
- double
The width in pixels for the given text.