public PDFContextBase(PDFItemCollection items, PDFTraceLog log, PDFPerformanceMonitor perfmon, IPDFDocument document) { this._format = OutputFormat.PDF; this._log = log; if (null == log) { _log = new Logging.DoNothingTraceLog(Scryber.TraceRecordLevel.Off); } _shouldLogDebug = TraceRecordLevel.Diagnostic >= _log.RecordLevel; _shouldLogVerbose = TraceRecordLevel.Verbose >= _log.RecordLevel; _shouldLogMessage = TraceRecordLevel.Messages >= _log.RecordLevel; this._items = items; this._perfmon = perfmon; this._doc = document; }
private void AddPerformance(PDFPerformanceMonitor perfdata) { Head3 head = new Head3() { Text = "Performance Metrics" }; this.Contents.Add(head); TableGrid tbl = new TableGrid(); this.Contents.Add(tbl); TableHeaderRow top = new TableHeaderRow(); tbl.Rows.Add(top); TableCell cell = new TableHeaderCell(); cell.Contents.Add(new TextLiteral("Entry")); top.Cells.Add(cell); cell = new TableHeaderCell() { StyleClass = "number", Width = 100 }; cell.Contents.Add(new TextLiteral("Duration (ms)")); top.Cells.Add(cell); cell = new TableHeaderCell() { StyleClass = "number", Width = 60 }; cell.Contents.Add(new TextLiteral("Count")); top.Cells.Add(cell); foreach (PDFPerformanceMonitorEntry entry in perfdata) { if (entry.MonitorCount > 0) { this.AddPerformanceEntry(tbl, entry); } } }
public PDFInitContext(PDFItemCollection items, PDFTraceLog log, PDFPerformanceMonitor perfmon, IPDFDocument document) : base(items, log, perfmon, document) { }
internal PDFRenderContext(DrawingOrigin origin, int pageCount, PDFOutputFormatting format, Styles.StyleStack stack, PDFItemCollection items, PDFTraceLog log, PDFPerformanceMonitor perfmon, IPDFDocument document) : base(stack, items, log, perfmon, document) { this._origin = origin; this._offset = new PDFPoint(); this._space = new PDFSize(); this._pgCount = pageCount; this._pgindex = 0; this._format = format; }
// // .ctor // public PDFRenderContext(DrawingOrigin origin, int pageCount, PDFOutputFormatting format, Styles.Style root, PDFItemCollection items, PDFTraceLog log, PDFPerformanceMonitor perfmon, IPDFDocument document) : this(origin,pageCount,format, new Scryber.Styles.StyleStack(root), items, log, perfmon, document) { }
// // .ctors // #region public PDFDataContext(PDFItemCollection items, PDFTraceLog log) /// <summary> /// Creates a new PDFDataContext with the item collection and trace log /// </summary> /// <param name="items"></param> /// <param name="log"></param> public PDFDataContext(PDFItemCollection items, PDFTraceLog log, PDFPerformanceMonitor perfmon, IPDFDocument document) : this(items, log, perfmon, new PDFDataStack(), document) { }
/// <summary> /// Creates a new PDFDataContext with the item collection, trace log, and data stack /// </summary> /// <param name="items"></param> /// <param name="log"></param> /// <param name="stack"></param> public PDFDataContext(PDFItemCollection items, PDFTraceLog log, PDFPerformanceMonitor perfmon, PDFDataStack stack, IPDFDocument document) : base(items, log, perfmon, document) { this._datastack = stack; }
internal PDFContextStyleBase(Styles.StyleStack stylesstack, PDFItemCollection items, PDFTraceLog log, PDFPerformanceMonitor perfmon, IPDFDocument document) : base(items, log, perfmon, document) { this._stylestack = stylesstack; }
public PDFLayoutContext(Style style, PDFOutputFormatting format, PDFItemCollection items, PDFTraceLog log, PDFPerformanceMonitor perfmon, IPDFDocument document) : base(new StyleStack(style), items, log, perfmon, document) { this._format = format; }