Ejemplo n.º 1
0
 internal Renderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
 {
     this.documentObject = renderInfo.DocumentObject;
     this.gfx = gfx;
     this.renderInfo = renderInfo;
     this.fieldInfos = fieldInfos;
 }
Ejemplo n.º 2
0
 internal ShapeRenderer(XGraphics gfx, Shape shape, FieldInfos fieldInfos)
     : base(gfx, shape, fieldInfos)
 {
     this.shape = shape;
       LineFormat lf = (LineFormat)this.shape.GetValue("LineFormat", GV.ReadOnly);
       this.lineFormatRenderer = new LineFormatRenderer(lf, gfx);
 }
Ejemplo n.º 3
0
 internal Renderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
 {
     _documentObject = renderInfo.DocumentObject;
     _gfx = gfx;
     _renderInfo = renderInfo;
     _fieldInfos = fieldInfos;
 }
Ejemplo n.º 4
0
 internal ImageRenderer(XGraphics gfx, Image image, FieldInfos fieldInfos)
     : base(gfx, image, fieldInfos)
 {
     _image = image;
     ImageRenderInfo renderInfo = new ImageRenderInfo();
     renderInfo.DocumentObject = _shape;
     _renderInfo = renderInfo;
 }
Ejemplo n.º 5
0
 internal ImageRenderer(XGraphics gfx, Image image, FieldInfos fieldInfos)
     : base(gfx, image, fieldInfos)
 {
     this.image = image;
     ImageRenderInfo renderInfo = new ImageRenderInfo();
     renderInfo.shape = this.shape;
     this.renderInfo = renderInfo;
 }
Ejemplo n.º 6
0
 internal TextFrameRenderer(XGraphics gfx, TextFrame textframe, FieldInfos fieldInfos)
     : base(gfx, textframe, fieldInfos)
 {
     _textframe = textframe;
     TextFrameRenderInfo renderInfo = new TextFrameRenderInfo();
     renderInfo.DocumentObject = _shape;
     _renderInfo = renderInfo;
 }
Ejemplo n.º 7
0
 internal TextFrameRenderer(XGraphics gfx, TextFrame textframe, FieldInfos fieldInfos)
   : base(gfx, textframe, fieldInfos)
 {
   this.textframe = textframe;
   TextFrameRenderInfo renderInfo = new TextFrameRenderInfo();
   renderInfo.shape = this.shape;
   this.renderInfo = renderInfo;
 }
Ejemplo n.º 8
0
 internal ChartRenderer(XGraphics gfx, Chart chart, FieldInfos fieldInfos)
   : base(gfx, chart, fieldInfos)
 {
   this.chart = chart;
   ChartRenderInfo renderInfo = new ChartRenderInfo();
   renderInfo.shape = this.shape;
   this.renderInfo = renderInfo;
 }
Ejemplo n.º 9
0
 internal ChartRenderer(XGraphics gfx, Chart chart, FieldInfos fieldInfos)
     : base(gfx, chart, fieldInfos)
 {
     _chart = chart;
     ChartRenderInfo renderInfo = new ChartRenderInfo();
     renderInfo.DocumentObject = _shape;
     _renderInfo = renderInfo;
 }
Ejemplo n.º 10
0
 internal BarcodeRenderer(XGraphics gfx, Barcode barcode, FieldInfos fieldInfos)
     : base(gfx, barcode, fieldInfos)
 {
     this.barcode = barcode;
     BarcodeRenderInfo renderInfo = new BarcodeRenderInfo();
     renderInfo.shape = this.shape;
     this.renderInfo = renderInfo;
 }
Ejemplo n.º 11
0
 internal FormattedCell(Cell cell, DocumentRenderer documentRenderer, Borders cellBorders, FieldInfos fieldInfos, XUnit xOffset, XUnit yOffset)
 {
     _cell = cell;
     _fieldInfos = fieldInfos;
     _yOffset = yOffset;
     _xOffset = xOffset;
     _bordersRenderer = new BordersRenderer(cellBorders, null);
     _documentRenderer = documentRenderer;
 }
Ejemplo n.º 12
0
 internal ShapeRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     this.shape = (Shape)renderInfo.DocumentObject;
       LineFormat lf = (LineFormat)this.shape.GetValue("LineFormat", GV.ReadOnly);
       this.lineFormatRenderer = new LineFormatRenderer(lf, gfx);
       FillFormat ff = (FillFormat)this.shape.GetValue("FillFormat", GV.ReadOnly);
       this.fillFormatRenderer = new FillFormatRenderer(ff, gfx);
 }
Ejemplo n.º 13
0
 internal FormattedCell(Cell cell, DocumentRenderer documentRenderer, Borders cellBorders, FieldInfos fieldInfos, XUnit xOffset, XUnit yOffset)
 {
   this.cell = cell;
   this.fieldInfos = fieldInfos;
   this.yOffset = yOffset;
   this.xOffset = xOffset;
   this.bordersRenderer = new BordersRenderer(cellBorders, null);
   this.documentRenderer = documentRenderer;
 }
Ejemplo n.º 14
0
 internal Renderer(XGraphics gfx, DocumentObject documentObject, FieldInfos fieldInfos)
 {
     this.documentObject = documentObject;
     this.gfx = gfx;
     this.fieldInfos = fieldInfos;
 }
Ejemplo n.º 15
0
        /// <summary>
        /// Creates a fitting renderer for the given document object for formatting.
        /// </summary>
        /// <param name="gfx">The XGraphics object to do measurements on.</param>
        /// <param name="documentRenderer">The document renderer.</param>
        /// <param name="documentObject">the document object to format.</param>
        /// <param name="fieldInfos">The field infos.</param>
        /// <returns>The fitting Renderer.</returns>
        internal static Renderer Create(XGraphics gfx, DocumentRenderer documentRenderer, DocumentObject documentObject, FieldInfos fieldInfos)
        {
            Renderer renderer = null;
            if (documentObject is Paragraph)
                renderer = new ParagraphRenderer(gfx, (Paragraph)documentObject, fieldInfos);
            else if (documentObject is Table)
                renderer = new TableRenderer(gfx, (Table)documentObject, fieldInfos);
            else if (documentObject is PageBreak)
                renderer = new PageBreakRenderer(gfx, (PageBreak)documentObject, fieldInfos);
            else if (documentObject is TextFrame)
                renderer = new TextFrameRenderer(gfx, (TextFrame)documentObject, fieldInfos);
            else if (documentObject is Chart)
                renderer = new ChartRenderer(gfx, (Chart)documentObject, fieldInfos);
            else if (documentObject is Image)
                renderer = new ImageRenderer(gfx, (Image)documentObject, fieldInfos);
            else if (documentObject is Barcode)
                renderer = new BarcodeRenderer(gfx, (Barcode)documentObject, fieldInfos);

            if (renderer != null)
                renderer.documentRenderer = documentRenderer;

            return renderer;
        }
Ejemplo n.º 16
0
 internal ChartRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     _chart = (Chart)renderInfo.DocumentObject;
 }
Ejemplo n.º 17
0
 public TableRenderer(XGraphics gfx, Table documentObject, FieldInfos fieldInfos)
     : base(gfx, documentObject, fieldInfos)
 {
     _table = documentObject;
 }
Ejemplo n.º 18
0
 public TableRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     _table = (Table)_renderInfo.DocumentObject;
 }
Ejemplo n.º 19
0
 internal FormattedTextArea(DocumentRenderer documentRenderer, TextArea textArea, FieldInfos fieldInfos)
 {
     TextArea          = textArea;
     _fieldInfos       = fieldInfos;
     _documentRenderer = documentRenderer;
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Initializes a ParagraphRenderer object for rendering.
 /// </summary>
 /// <param name="gfx">The XGraphics object to render on.</param>
 /// <param name="renderInfo">The render info object containing information necessary for rendering.</param>
 /// <param name="fieldInfos">The field infos.</param>
 internal ParagraphRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
   : base(gfx, renderInfo, fieldInfos)
 {
   this.paragraph = (Paragraph)renderInfo.DocumentObject;
 }
Ejemplo n.º 21
0
        void InitFieldInfos()
        {
            _currentFieldInfos = new FieldInfos(_bookmarks);
            _currentFieldInfos.PhysicalPageNr = _currentPage;
            _currentFieldInfos.Section = _sectionNumber;

            if (_isNewSection && !_currentSection.PageSetup._startingNumber.IsNull)
                _shownPageNumber = _currentSection.PageSetup.StartingNumber;

            _currentFieldInfos.DisplayPageNr = _shownPageNumber;
        }
Ejemplo n.º 22
0
 internal Renderer(XGraphics gfx, DocumentObject documentObject, FieldInfos fieldInfos)
 {
     _documentObject = documentObject;
     _gfx = gfx;
     _fieldInfos = fieldInfos;
 }
Ejemplo n.º 23
0
 internal TableRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
   :
   base(gfx, renderInfo, fieldInfos)
 {
   this.table = (Table)this.renderInfo.DocumentObject;
 }
Ejemplo n.º 24
0
        /// <summary>
        /// Creates a fitting renderer for the render info to render and layout with.
        /// </summary>
        /// <param name="gfx">The XGraphics object to render on.</param>
        /// <param name="documentRenderer">The document renderer.</param>
        /// <param name="renderInfo">The RenderInfo object stored after a previous call of Format().</param>
        /// <param name="fieldInfos">The field infos.</param>
        /// <returns>The fitting Renderer.</returns>
        internal static Renderer Create(XGraphics gfx, DocumentRenderer documentRenderer, RenderInfo renderInfo, FieldInfos fieldInfos)
        {
            Renderer renderer = null;

            if (renderInfo.DocumentObject is Paragraph)
            {
                renderer = new ParagraphRenderer(gfx, renderInfo, fieldInfos);
            }
            else if (renderInfo.DocumentObject is Table)
            {
                renderer = new TableRenderer(gfx, renderInfo, fieldInfos);
            }
            else if (renderInfo.DocumentObject is PageBreak)
            {
                renderer = new PageBreakRenderer(gfx, renderInfo, fieldInfos);
            }
            else if (renderInfo.DocumentObject is TextFrame)
            {
                renderer = new TextFrameRenderer(gfx, renderInfo, fieldInfos);
            }
            else if (renderInfo.DocumentObject is Chart)
            {
                renderer = new ChartRenderer(gfx, renderInfo, fieldInfos);
            }
            //else if (renderInfo.DocumentObject is Chart)
            //  renderer = new ChartRenderer(gfx, renderInfo, fieldInfos);
            else if (renderInfo.DocumentObject is Image image)
            {
                if (_xpsCheck.IsMatch(image.Name))
                {
                    renderer = new XpsRenderer(gfx, renderInfo, fieldInfos, documentRenderer.XpsCache);
                }
                else
                {
                    renderer = new ImageRenderer(gfx, renderInfo, fieldInfos);
                }
            }

            if (renderer != null)
            {
                renderer._documentRenderer = documentRenderer;
            }

            return(renderer);
        }
Ejemplo n.º 25
0
 internal Renderer(XGraphics gfx, DocumentObject documentObject, FieldInfos fieldInfos)
 {
     _documentObject = documentObject;
     _gfx            = gfx;
     _fieldInfos     = fieldInfos;
 }
 /// <summary>
 /// Initializes a ParagraphRenderer object for formatting.
 /// </summary>
 /// <param name="gfx">The XGraphics object to do measurements on.</param>
 /// <param name="pageBreak">The page break.</param>
 /// <param name="fieldInfos">The field infos.</param>
 public PageBreakRenderer(XGraphics gfx, PageBreak pageBreak, FieldInfos fieldInfos)
     : base(gfx, pageBreak, fieldInfos)
 {
     _pageBreak = pageBreak;
 }
 /// <summary>
 /// Initializes a ParagraphRenderer object for rendering.
 /// </summary>
 /// <param name="gfx">The XGraphics object to render on.</param>
 /// <param name="renderInfo">The render info object containing information necessary for rendering.</param>
 /// <param name="fieldInfos">The field infos.</param>
 public PageBreakRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     _renderInfo = renderInfo;
 }
Ejemplo n.º 28
0
 internal TableRenderer(XGraphics gfx, Table documentObject, FieldInfos fieldInfos)
   :
   base(gfx, documentObject, fieldInfos)
 {
   this.table = (Table)documentObject;
 }
Ejemplo n.º 29
0
 internal FormattedHeaderFooter(HeaderFooter headerFooter, DocumentRenderer documentRenderer, FieldInfos fieldInfos)
 {
     _headerFooter = headerFooter;
     _fieldInfos = fieldInfos;
     _documentRenderer = documentRenderer;
 }
Ejemplo n.º 30
0
        /// <summary>
        /// Creates a fitting renderer for the render info to render and layout with.
        /// </summary>
        /// <param name="gfx">The XGraphics object to render on.</param>
        /// <param name="documentRenderer">The document renderer.</param>
        /// <param name="renderInfo">The RenderInfo object stored after a previous call of Format().</param>
        /// <param name="fieldInfos">The field infos.</param>
        /// <returns>The fitting Renderer.</returns>
        internal static Renderer Create(XGraphics gfx, DocumentRenderer documentRenderer, RenderInfo renderInfo, FieldInfos fieldInfos)
        {
            Renderer renderer = null;

            if (renderInfo.DocumentObject is Paragraph)
                renderer = new ParagraphRenderer(gfx, renderInfo, fieldInfos);
            else if (renderInfo.DocumentObject is Table)
                renderer = new TableRenderer(gfx, renderInfo, fieldInfos);
            else if (renderInfo.DocumentObject is PageBreak)
                renderer = new PageBreakRenderer(gfx, renderInfo, fieldInfos);
            else if (renderInfo.DocumentObject is TextFrame)
                renderer = new TextFrameRenderer(gfx, renderInfo, fieldInfos);
            else if (renderInfo.DocumentObject is Chart)
                renderer = new ChartRenderer(gfx, renderInfo, fieldInfos);
            //else if (renderInfo.DocumentObject is Chart)
            //  renderer = new ChartRenderer(gfx, renderInfo, fieldInfos);
            else if (renderInfo.DocumentObject is Image)
                renderer = new ImageRenderer(gfx, renderInfo, fieldInfos);

            if (renderer != null)
                renderer._documentRenderer = documentRenderer;

            return renderer;
        }
Ejemplo n.º 31
0
 internal ImageRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     this.image = (Image)renderInfo.DocumentObject;
 }
Ejemplo n.º 32
0
        /// <summary>
        /// Creates a fitting renderer for the given document object for formatting.
        /// </summary>
        /// <param name="gfx">The XGraphics object to do measurements on.</param>
        /// <param name="documentRenderer">The document renderer.</param>
        /// <param name="documentObject">the document object to format.</param>
        /// <param name="fieldInfos">The field infos.</param>
        /// <returns>The fitting Renderer.</returns>
        internal static Renderer Create(XGraphics gfx, DocumentRenderer documentRenderer, DocumentObject documentObject, FieldInfos fieldInfos)
        {
            Renderer renderer = null;

            if (documentObject is Paragraph paragraph)
            {
                renderer = new ParagraphRenderer(gfx, paragraph, fieldInfos);
            }
            else if (documentObject is Table table)
            {
                renderer = new TableRenderer(gfx, table, fieldInfos);
            }
            else if (documentObject is PageBreak pageBreak)
            {
                renderer = new PageBreakRenderer(gfx, pageBreak, fieldInfos);
            }
            else if (documentObject is TextFrame textFrame)
            {
                renderer = new TextFrameRenderer(gfx, textFrame, fieldInfos);
            }
            else if (documentObject is Chart chart)
            {
                renderer = new ChartRenderer(gfx, chart, fieldInfos);
            }
            else if (documentObject is Image image)
            {
                if (_xpsCheck.IsMatch(image.Name))
                {
                    renderer = new XpsRenderer(gfx, image, fieldInfos, documentRenderer.XpsCache);
                }
                else
                {
                    renderer = new ImageRenderer(gfx, image, fieldInfos);
                }
            }

            if (renderer != null)
            {
                renderer._documentRenderer = documentRenderer;
            }

            return(renderer);
        }
Ejemplo n.º 33
0
 /// <summary>
 /// Initializes a ParagraphRenderer object for formatting.
 /// </summary>
 /// <param name="gfx">The XGraphics object to do measurements on.</param>
 /// <param name="pageBreak">The page break.</param>
 /// <param name="fieldInfos">The field infos.</param>
 internal PageBreakRenderer(XGraphics gfx, PageBreak pageBreak, FieldInfos fieldInfos)
     : base(gfx, pageBreak, fieldInfos)
 {
     _pageBreak = pageBreak;
 }
Ejemplo n.º 34
0
    /// <summary>
    /// Initializes a ParagraphRenderer object for formatting.
    /// </summary>
    /// <param name="gfx">The XGraphics object to do measurements on.</param>
    /// <param name="paragraph">The paragraph to format.</param>
    /// <param name="fieldInfos">The field infos.</param>
    internal ParagraphRenderer(XGraphics gfx, Paragraph paragraph, FieldInfos fieldInfos)
      : base(gfx, paragraph, fieldInfos)
    {
      this.paragraph = paragraph;

      ParagraphRenderInfo parRenderInfo = new ParagraphRenderInfo();
      parRenderInfo.paragraph = this.paragraph;
      ((ParagraphFormatInfo)parRenderInfo.FormatInfo).widowControl = this.paragraph.Format.WidowControl;

      this.renderInfo = parRenderInfo;
    }
Ejemplo n.º 35
0
 internal ImageRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     _image = (Image)renderInfo.DocumentObject;
 }
Ejemplo n.º 36
0
 internal BarcodeRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     this.barcode = (Barcode)renderInfo.DocumentObject;
 }
Ejemplo n.º 37
0
 internal ChartRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     _chart = (Chart)renderInfo.DocumentObject;
 }
Ejemplo n.º 38
0
 internal FormattedHeaderFooter(HeaderFooter headerFooter, DocumentRenderer documentRenderer, FieldInfos fieldInfos)
 {
     this.headerFooter = headerFooter;
       this.fieldInfos = fieldInfos;
       this.documentRenderer = documentRenderer;
 }
Ejemplo n.º 39
0
 internal FormattedTextArea(DocumentRenderer documentRenderer, TextArea textArea, FieldInfos fieldInfos)
 {
     TextArea = textArea;
     _fieldInfos = fieldInfos;
     _documentRenderer = documentRenderer;
 }
Ejemplo n.º 40
0
 /// <summary>
 /// Initializes a ParagraphRenderer object for rendering.
 /// </summary>
 /// <param name="gfx">The XGraphics object to render on.</param>
 /// <param name="renderInfo">The render info object containing information necessary for rendering.</param>
 /// <param name="fieldInfos">The field infos.</param>
 internal PageBreakRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     _renderInfo = renderInfo;
 }
Ejemplo n.º 41
0
 internal TextFrameRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     _textframe = (TextFrame)renderInfo.DocumentObject;
 }