The RePos method.
///
<summary>
///
Re positions words according to their calculated word widths
///
</summary>
///
<param name="words">A
reference to the line being repaginated</param>
public
void RePos(ref
WordPosCollection words)
{
if(words.Count==0)
return;
float
currPos = words[0].PagePos;
for(int
i=0;i<words.Count;i++)
{
words[i].PagePos=currPos;
currPos+=words[i].WordWidth;
}
}
'/ <summary>
'/
Re positions words according to their calculated word widths
'/
</summary>
'/
<param name="words">A reference to the line being repaginated</param>
Public
Sub RePos(ByRef
words As WordPosCollection)
If
words.Count = 0 Then
Return
End
If
Dim
currPos As Single
= words(0).PagePos
Dim
i As Integer
For
i = 0 To words.Count - 1
words(i).PagePos
= currPos
currPos
+= words(i).WordWidth
Next
i
End
Sub 'RePos