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
Type | Name | |
---|---|---|
string | typeFaceName | The 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
Type | Name | |
---|---|---|
string | text | The text to be displayed. |
Color | color | The color used to paint the text. |
int | maxWidth | The maximum text width (length) for a line of text. |
int | maxHeight | The maximum height of a text column. |
GetSimplePen(Color)
Gets the pen by specified color.
public Pen GetSimplePen(Color color)
Result Type: Pen
Parameters
Type | Name | |
---|---|---|
Color | color |
GetSolidBrush(Color)
Gets the brush by specified color.
public Brush GetSolidBrush(Color color)
Result Type: Brush
Parameters
Type | Name | |
---|---|---|
Color | color |