private void RenderFooter(XGraphics graphics, int page) { FormattedHeaderFooter formattedFooter = this.formattedDocument.GetFormattedFooter(page); if (formattedFooter == null) { return; } Rectangle footerArea = this.formattedDocument.GetFooterArea(page); RenderInfo[] renderInfos = formattedFooter.GetRenderInfos(); XUnit topY = footerArea.Y + footerArea.Height - RenderInfo.GetTotalHeight(renderInfos); FieldInfos fieldInfos = this.formattedDocument.GetFieldInfos(page); foreach (RenderInfo renderInfo in renderInfos) { Renderer renderer = Renderer.Create(graphics, this, renderInfo, fieldInfos); XUnit savedY = renderer.RenderInfo.LayoutInfo.ContentArea.Y; renderer.RenderInfo.LayoutInfo.ContentArea.Y = topY; renderer.Render(); renderer.RenderInfo.LayoutInfo.ContentArea.Y = savedY; } }
internal void Format(XGraphics gfx) { this.gfx = gfx; this.isFirstArea = true; this.formatter = new TopDownFormatter(this, this.documentRenderer, this.textframe.Elements); this.formatter.FormatOnAreas(gfx, false); this.contentHeight = RenderInfo.GetTotalHeight(GetRenderInfos()); }
private XUnit CalcContentHeight(DocumentRenderer documentRenderer) { XUnit height = RenderInfo.GetTotalHeight(GetRenderInfos()); if (height == 0) { height = ParagraphRenderer.GetLineHeight(this.cell.Format, this.gfx, documentRenderer); height += this.cell.Format.SpaceBefore; height += this.cell.Format.SpaceAfter; } return(height); }