Interface IStringMeasure
Measures text drawn with a RenderFont. Implemented by RenderContext, so the measurements use the coordinate units of the context the text is drawn in.
public interface IStringMeasure
- Extension Methods
Methods
MeasureString(string, RenderFont)
Returns size of the text. Resulted height will be maximum of possible font height. Use when your text will change
Size MeasureString(string text, RenderFont font)
Parameters
textstringfontRenderFont
Returns
- Size
MeasureStringWithOverhang(string, RenderFont)
Returns the smallest rectangle that text will fit. Height will depend on actual drawing characters.
Rectangle MeasureStringWithOverhang(string text, RenderFont renderFont)
Parameters
textstringrenderFontRenderFont
Returns
- Rectangle