void StoreLineInformation()
{
PopSavedBlankWidth();
XUnit topBorderOffset = TopBorderOffset;
Area contentArea = this.renderInfo.LayoutInfo.ContentArea;
if (topBorderOffset > 0)//May only occure for the first line.
contentArea = this.formattingArea.GetFittingRect(this.formattingArea.Y, topBorderOffset);
if (contentArea == null)
{
contentArea = this.formattingArea.GetFittingRect(this.currentYPosition, this.currentVerticalInfo.height);
}
else
contentArea = contentArea.Unite(this.formattingArea.GetFittingRect(this.currentYPosition, this.currentVerticalInfo.height));
XUnit bottomBorderOffset = this.BottomBorderOffset;
if (bottomBorderOffset > 0)
contentArea = contentArea.Unite(this.formattingArea.GetFittingRect(this.currentYPosition + this.currentVerticalInfo.height, bottomBorderOffset));
LineInfo lineInfo = new LineInfo();
lineInfo.vertical = this.currentVerticalInfo;
if (this.startLeaf != null && this.startLeaf == this.currentLeaf)
HandleNonFittingLine();
lineInfo.lastTab = this.lastTab;
this.renderInfo.LayoutInfo.ContentArea = contentArea;
lineInfo.startIter = this.startLeaf;
if (this.currentLeaf == null)
lineInfo.endIter = new ParagraphIterator(this.paragraph.Elements).GetLastLeaf();
else
lineInfo.endIter = this.currentLeaf.GetPreviousLeaf();
lineInfo.blankCount = this.currentBlankCount;
lineInfo.wordsWidth = this.currentWordsWidth;
lineInfo.lineWidth = this.currentLineWidth;
lineInfo.tabOffsets = this.tabOffsets;
lineInfo.reMeasureLine = this.reMeasureLine;
this.savedWordWidth = 0;
this.reMeasureLine = false;
((ParagraphFormatInfo)this.renderInfo.FormatInfo).AddLineInfo(lineInfo);
}