Esempio n. 1
0
 internal Renderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
 {
     this.documentObject = renderInfo.DocumentObject;
     this.gfx = gfx;
     this.renderInfo = renderInfo;
     this.fieldInfos = fieldInfos;
 }
Esempio 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);
 }
Esempio n. 3
0
 internal Renderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
 {
     _documentObject = renderInfo.DocumentObject;
     _gfx = gfx;
     _renderInfo = renderInfo;
     _fieldInfos = fieldInfos;
 }
Esempio 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;
 }
Esempio 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;
 }
Esempio 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;
 }
Esempio 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;
 }
Esempio 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;
 }
Esempio 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;
 }
Esempio 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;
 }
Esempio 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;
 }
Esempio 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);
 }
Esempio 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;
 }
Esempio n. 14
0
 internal Renderer(XGraphics gfx, DocumentObject documentObject, FieldInfos fieldInfos)
 {
     this.documentObject = documentObject;
     this.gfx = gfx;
     this.fieldInfos = fieldInfos;
 }
Esempio 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;
        }
Esempio n. 16
0
 internal ChartRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     _chart = (Chart)renderInfo.DocumentObject;
 }
Esempio n. 17
0
 public TableRenderer(XGraphics gfx, Table documentObject, FieldInfos fieldInfos)
     : base(gfx, documentObject, fieldInfos)
 {
     _table = documentObject;
 }
Esempio n. 18
0
 public TableRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     _table = (Table)_renderInfo.DocumentObject;
 }
Esempio n. 19
0
 internal FormattedTextArea(DocumentRenderer documentRenderer, TextArea textArea, FieldInfos fieldInfos)
 {
     TextArea          = textArea;
     _fieldInfos       = fieldInfos;
     _documentRenderer = documentRenderer;
 }
Esempio 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;
 }
Esempio 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;
        }
Esempio n. 22
0
 internal Renderer(XGraphics gfx, DocumentObject documentObject, FieldInfos fieldInfos)
 {
     _documentObject = documentObject;
     _gfx = gfx;
     _fieldInfos = fieldInfos;
 }
Esempio n. 23
0
 internal TableRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
   :
   base(gfx, renderInfo, fieldInfos)
 {
   this.table = (Table)this.renderInfo.DocumentObject;
 }
Esempio 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);
        }
Esempio 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;
 }
Esempio n. 28
0
 internal TableRenderer(XGraphics gfx, Table documentObject, FieldInfos fieldInfos)
   :
   base(gfx, documentObject, fieldInfos)
 {
   this.table = (Table)documentObject;
 }
Esempio n. 29
0
 internal FormattedHeaderFooter(HeaderFooter headerFooter, DocumentRenderer documentRenderer, FieldInfos fieldInfos)
 {
     _headerFooter = headerFooter;
     _fieldInfos = fieldInfos;
     _documentRenderer = documentRenderer;
 }
Esempio 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;
        }
Esempio n. 31
0
 internal ImageRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     this.image = (Image)renderInfo.DocumentObject;
 }
Esempio 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);
        }
Esempio 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;
 }
Esempio 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;
    }
Esempio n. 35
0
 internal ImageRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     _image = (Image)renderInfo.DocumentObject;
 }
Esempio n. 36
0
 internal BarcodeRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     this.barcode = (Barcode)renderInfo.DocumentObject;
 }
Esempio n. 37
0
 internal ChartRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     _chart = (Chart)renderInfo.DocumentObject;
 }
Esempio n. 38
0
 internal FormattedHeaderFooter(HeaderFooter headerFooter, DocumentRenderer documentRenderer, FieldInfos fieldInfos)
 {
     this.headerFooter = headerFooter;
       this.fieldInfos = fieldInfos;
       this.documentRenderer = documentRenderer;
 }
Esempio n. 39
0
 internal FormattedTextArea(DocumentRenderer documentRenderer, TextArea textArea, FieldInfos fieldInfos)
 {
     TextArea = textArea;
     _fieldInfos = fieldInfos;
     _documentRenderer = documentRenderer;
 }
Esempio 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;
 }
Esempio n. 41
0
 internal TextFrameRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     _textframe = (TextFrame)renderInfo.DocumentObject;
 }