Table of Contents

Interface IStringMeasure

Namespace
OFT.Rendering.Context
Assembly
OFT.Rendering.dll

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

text string
font RenderFont

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

text string
renderFont RenderFont

Returns

Rectangle