Ejemplo n.º 1
0
        /// <summary>
        /// Render the html using the given device.
        /// </summary>
        /// <param name="g">the device to use to render</param>
        public void PerformPaint(Graphics g)
        {
            ArgChecker.AssertArgNotNull(g, "g");

            Region prevClip = null;

            if (MaxSize.Height > 0)
            {
                prevClip = g.Clip;
                g.SetClip(new RectangleF(_location, _maxSize));
            }

            if (_root != null)
            {
                using (var ig = new WinGraphics(g, _useGdiPlusTextRendering))
                {
                    _root.Paint(ig);
                }
            }

            if (prevClip != null)
            {
                g.SetClip(prevClip, CombineMode.Replace);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Render the html using the given device.
        /// </summary>
        /// <param name="g">the device to use to render</param>
        public void PerformPaint(RGraphics g)
        {
            ArgChecker.AssertArgNotNull(g, "g");

            if (MaxSize.Height > 0)
            {
                g.PushClip(new RRect(_location.X, _location.Y, Math.Min(_maxSize.Width, PageSize.Width), Math.Min(_maxSize.Height, PageSize.Height)));
            }
            else
            {
                g.PushClip(new RRect(MarginLeft, MarginTop, PageSize.Width, PageSize.Height));
            }

            if (_root != null)
            {
                _root.Paint(g);
            }

            g.PopClip();
        }
Ejemplo n.º 3
0
        public void PerformPaint(PaintVisitor p)
        {
            if (_rootBox == null)
            {
                return;
            }

            p.PushContaingBlock(_rootBox);
#if DEBUG
            p.dbugEnableLogRecord = false;
            p.dbugResetLogRecords();
            dbugPaintN++;
#endif
            CssBox.Paint(_rootBox, p);

            p.PopContainingBlock();
#if DEBUG
            if (p.dbugEnableLogRecord)
            {
            }
#endif
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Render the html using the given device.
        /// </summary>
        /// <param name="g">the device to use to render</param>
        public void PerformPaint(RGraphics g)
        {
            ArgChecker.AssertArgNotNull(g, "g");

            bool pushedClip = false;

            if (MaxSize.Height > 0)
            {
                pushedClip = true;
                g.PushClip(new RRect(_location, _maxSize));
            }

            if (_root != null)
            {
                _root.Paint(g);
            }

            if (pushedClip)
            {
                g.PopClip();
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Render the html using the given device.
        /// </summary>
        /// <param name="g">the device to use to render</param>
        public void PerformPaint(Graphics g)
        {
            ArgChecker.AssertArgNotNull(g, "g");

            Region prevClip = null;

            if (MaxSize.Height > 0)
            {
                prevClip = g.Clip;
                g.SetClip(new RectangleF(_location, _maxSize));
            }

            if (_root != null)
            {
                _root.Paint(g);
            }

            if (prevClip != null)
            {
                g.SetClip(prevClip, CombineMode.Replace);
            }
        }