.
In Depth Banner
Skip Navigation Links

Select your preferred language

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;

      }

    }

 

Return to the article

Copyright © Bob Powell 2000-.  All rights reserved.