///
<summary>
///
Calculates word positions for a centered line
///
</summary>
///
<param name="words">A
reference to the line being repaginated</param>
public
void CenterLine(ref
WordPosCollection words)
{
if(words.Count==0)
return;
TrimEnd(ref
words);
if(words.Count==0)
return;
TrimStart(ref
words);
if(words.Count==0)
return;
words[0].PagePos=(ColumnWidth/2) - (GetLineLength(ref
words)/2) + LeftMargin;
RePos(ref
words);
}
'/ <summary>
'/
Calculates word positions for a centred line
'/
</summary>
'/
<param name="words">A reference to the line being repaginated</param>
Public
Sub CenterLine(ByRef
words As WordPosCollection)
If
words.Count = 0 Then
Return
End
If
TrimEnd(words)
If
words.Count = 0 Then
Return
End
If
TrimStart(words)
If
words.Count = 0 Then
Return
End
If
words(0).PagePos = ColumnWidth / 2 - GetLineLength(words) / 2 + LeftMargin
RePos(words)
End
Sub 'CenterLine