C# Class Ohana3DS_Transfigured.GUI.DrawingUtils

Show file Open project: Quibilia/Ohana3DS-Transfigured Class Usage Examples

Public Methods

Method Description
clampText ( Graphics g, string text, Font font, int maxWidth ) : string

Clamp the text to fit on a limited space. Should be only used with single line Strings.

measureText ( Graphics g, string text, Font font ) : SizeF

Measures the Size of a Text.

Method Details

clampText() public static method

Clamp the text to fit on a limited space. Should be only used with single line Strings.
public static clampText ( Graphics g, string text, Font font, int maxWidth ) : string
g System.Drawing.Graphics Graphics object used to draw the text
text string The string with the text to be clamped
font System.Drawing.Font The font that will be used to render the text
maxWidth int The maximum space the text can use
return string

measureText() public static method

Measures the Size of a Text.
public static measureText ( Graphics g, string text, Font font ) : SizeF
g System.Drawing.Graphics Graphics object used to draw the text
text string The text
font System.Drawing.Font Font used to draw the text
return System.Drawing.SizeF