API Documentation

DrawingCache

Namespace: TagBites.WinSchedulers.Drawing
Assembly: TagBites.WinSchedulers.dll

Provides caching functionality for a System.Windows.Media.Brush, System.Windows.Media.Pen and TagBites.WinSchedulers.Drawing.DrawingCache.FormattedTextCache.

public class DrawingCache

Constructors

DrawingCache(string)

Initializes a new instance of the TagBites.WinSchedulers.Drawing.DrawingCache class for the specified font family typeface name.

public void DrawingCache(string typeFaceName)

Result Type: void

Parameters

TypeName
stringtypeFaceNameThe typeface name for the specified font family.

Methods

Begin()

public void Begin()

Result Type: void

End()

public void End()

Result Type: void

GetFormattedText(string, Color, int, int)

Returns the formatted text by specified text, color and maximum dimensions.

public FormattedText GetFormattedText(string text, Color color, int maxWidth, int maxHeight)

Result Type: FormattedText

Parameters

TypeName
stringtextThe text to be displayed.
ColorcolorThe color used to paint the text.
intmaxWidthThe maximum text width (length) for a line of text.
intmaxHeightThe maximum height of a text column.

GetSimplePen(Color)

Gets the pen by specified color.

public Pen GetSimplePen(Color color)

Result Type: Pen

Parameters

TypeName
Colorcolor

GetSolidBrush(Color)

Gets the brush by specified color.

public Brush GetSolidBrush(Color color)

Result Type: Brush

Parameters

TypeName
Colorcolor