本文整理汇总了C#中RenderingContext.IsCellRenderedOnPage方法的典型用法代码示例。如果您正苦于以下问题:C# RenderingContext.IsCellRenderedOnPage方法的具体用法?C# RenderingContext.IsCellRenderedOnPage怎么用?C# RenderingContext.IsCellRenderedOnPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderingContext
的用法示例。
在下文中一共展示了RenderingContext.IsCellRenderedOnPage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenderCells
protected internal void RenderCells(RenderingContext ctx, ArrayList cells, bool hasToFit)
{
if (hasToFit) {
foreach (PdfCell cell in cells) {
if (!cell.Header) {
if (cell.Bottom < IndentBottom) return;
}
}
}
foreach (PdfCell cell in cells) {
if (!ctx.IsCellRenderedOnPage(cell, PageNumber)) {
float correction = 0;
if (ctx.NumCellRendered(cell) >= 1) {
correction = 1.0f;
}
lines = cell.GetLines(ctx.pagetop, IndentBottom - correction);
// if there is still text to render we render it
if (lines != null && lines.Count > 0) {
// we write the text
float cellTop = cell.GetTop(ctx.pagetop - ctx.oldHeight);
text.MoveText(0, cellTop);
float cellDisplacement = FlushLines() - cellTop;
text.MoveText(0, cellDisplacement);
if (ctx.oldHeight + cellDisplacement > currentHeight) {
currentHeight = ctx.oldHeight + cellDisplacement;
}
ctx.CellRendered(cell, PageNumber);
}
float indentBottom = Math.Max(cell.Bottom, IndentBottom);
Rectangle tableRect = ctx.table.GetRectangle(ctx.pagetop, IndentBottom);
indentBottom = Math.Max(tableRect.Bottom, indentBottom);
// we paint the borders of the cells
Rectangle cellRect = cell.GetRectangle(tableRect.Top, indentBottom);
//cellRect.Bottom = cellRect.Bottom;
if (cellRect.Height > 0) {
ctx.lostTableBottom = indentBottom;
ctx.cellGraphics.Rectangle(cellRect);
}
// and additional graphics
ArrayList images = cell.GetImages(ctx.pagetop, IndentBottom);
foreach (Image image in images) {
graphics.AddImage(image);
}
}
}
}