MigraDoc.Rendering.ParagraphRenderer.ProbeAfterRightAlignedTab C# (CSharp) Method

ProbeAfterRightAlignedTab() private method

Probes the paragraph elements after a right aligned tab stop and returns the vertical text position to start at.
private ProbeAfterRightAlignedTab ( PdfSharp.Drawing.XUnit tabStopPosition, bool &notFitting ) : PdfSharp.Drawing.XUnit
tabStopPosition PdfSharp.Drawing.XUnit Position of the tab to probe.
notFitting bool Out parameter determining whether the tab causes a line break.
return PdfSharp.Drawing.XUnit
    XUnit ProbeAfterRightAlignedTab(XUnit tabStopPosition, out bool notFitting)
    {
      //--- Save ---------------------------------
      ParagraphIterator iter;
      int blankCount;
      XUnit xPosition;
      XUnit lineWidth;
      XUnit wordsWidth;
      XUnit blankWidth;
      SaveBeforeProbing(out iter, out blankCount, out wordsWidth, out xPosition, out lineWidth, out blankWidth);
      //------------------------------------------

      XUnit xPositionAfterTab = xPosition;

      notFitting = ProbeAfterTab();
      if (!notFitting && xPosition + this.currentLineWidth <= this.formattingArea.X + tabStopPosition)
        xPositionAfterTab = this.formattingArea.X + tabStopPosition - this.currentLineWidth;

      //--- Restore ------------------------------
      RestoreAfterProbing(iter, blankCount, wordsWidth, xPosition, lineWidth, blankWidth);
      //------------------------------------------
      return xPositionAfterTab;
    }
ParagraphRenderer