Determines where a screen line should be wrapped at.

Namespace: Sgry.Azuki
Assembly: Azuki (in Azuki.dll) Version: 1.7.13.40248

Syntax

C#
int HandleWordWrapping(
	Document doc,
	int index
)
Visual Basic
Function HandleWordWrapping ( 
	doc As Document,
	index As Integer
) As Integer

Parameters

doc
Type: Sgry.Azuki..::..Document
The document currently rendering.
index
Type: System..::..Int32
The index of character which is to be drawn over the right edge of text area.

Return Value

Type: Int32
The index of the character which starts the next screen line.

Remarks

This method is used to determine where Azuki should wrap a screen line at.

Azuki calls this method everytime the graphic of a screen line reaches to the right edge of the text area. If a valid index is returned from this method, the text line will be 'wrapped' - characters at the index and after will be drawn as a new screen line.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptiondoc is null.
System..::..ArgumentOutOfRangeExceptionindex is less than 0 or greater than length of the document.

See Also