CachedTrimmedText

public class CachedTrimmedText
Caches a trimmed, left aligned piece of text.

Constructors

CachedTrimmedText

#
public CachedTrimmedText(string original)
original (string)

Properties

OriginalSize

#
public SizeF OriginalSize { get; }
Gets the size of the original text.

OriginalText

#
public string OriginalText { get; }
Gets the original piece of text.

Methods

CreateOriginalMetrics

#
public void CreateOriginalMetrics(Font font)
Ensure that the OriginalSize is set based on a given font.
font (Font)

Draw

#
public void Draw(Graphics graphics, Brush fill, Font font, RectangleF frame, int horizontal, int vertical)
Draw this string into a frame.
graphics (Graphics)Graphics object to draw with.
fill (Brush)Text fill.
font (Font)Tex font.
frame (RectangleF)Bounds within which to draw.
horizontal (int)Horizontal alignment within bounds. -1=left, 0=centre, +1=right.
vertical (int)Vertical alignment within bounds. -1=top, 0=centre, +1=bottom.