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

FormatAsWord() private method

private FormatAsWord ( PdfSharp.Drawing.XUnit width ) : FormatResult
width PdfSharp.Drawing.XUnit
return FormatResult
    FormatResult FormatAsWord(XUnit width)
    {
      VerticalLineInfo newVertInfo = CalcCurrentVerticalInfo();

      Rectangle rect = this.formattingArea.GetFittingRect(this.currentYPosition, newVertInfo.height + BottomBorderOffset);
      if (rect == null)
        return FormatResult.NewArea;

      if (this.currentXPosition + width <= rect.X + rect.Width - this.RightIndent + Tolerance)
      {
        this.savedWordWidth = width;
        this.currentXPosition += width;
        // For Tabs in justified context
        if (!this.IgnoreHorizontalGrowth)
          this.currentWordsWidth += width;
        if (this.savedBlankWidth > 0)
        {
          // For Tabs in justified context
          if (!this.IgnoreHorizontalGrowth)
            ++this.currentBlankCount;
        }
        // For Tabs in justified context
        if (!this.IgnoreHorizontalGrowth)
          this.currentLineWidth += width + PopSavedBlankWidth();
        this.currentVerticalInfo = newVertInfo;
        this.minWidth = Math.Max(this.minWidth, width);
        return FormatResult.Continue;
      }
      else
      {
        savedWordWidth = width;
        return FormatResult.NewLine;
      }
    }
ParagraphRenderer