Click or drag to resize
ParagraphWrapText Method
Wrap text to fit destination rect. Most if this code is coming from: http://stackoverflow.com/questions/15986473/how-do-i-implement-word-wrap

Namespace:  GeonBit.UI.Entities
Assembly:  GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public string WrapText(
	SpriteFont font,
	string text,
	float maxLineWidth,
	float fontSize
)

Parameters

font
Type: SpriteFont
Font of the text to wrap.
text
Type: SystemString
Text content.
maxLineWidth
Type: SystemSingle
Max line width to wrap.
fontSize
Type: SystemSingle
Font scale (scale you are about to use when drawing the text).

Return Value

Type: String
Text that is wrapped to fit the given length (by adding line breaks at the right places).
See Also