.
In Depth Banner
Skip Navigation Links

Select your preferred language

Right justification.

    /// <summary>

    /// Calculates word positions for a right justified line

    /// </summary>

    /// <param name="words">A reference to the line being repaginated</param>

    public virtual void RightJustifyLine(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=LeftMargin;

      RePos(ref words);

      words[0].PagePos=ColumnWidth-GetLineLength(ref words)+LeftMargin;

      RePos(ref words);

    }

 

Return to the article.

Copyright © Bob Powell 2000-.  All rights reserved.