GetSharedPainter() static private method

static private GetSharedPainter ( HtmlContainer htmlCont, Canvas canvas ) : PaintVisitor
htmlCont HtmlContainer
canvas PixelFarm.Drawing.Canvas
return PaintVisitor
示例#1
0
        protected override void DrawBoxContent(Canvas canvas, Rectangle updateArea)
        {
            myHtmlCont.CheckDocUpdate();

            var painter = PainterStock.GetSharedPainter(this.myHtmlCont, canvas);

            painter.SetViewportSize(this.Width, this.Height);
#if DEBUG
            painter.dbugDrawDiagonalBox(Color.Blue, this.X, this.Y, this.Width, this.Height);
#endif

            myHtmlCont.PerformPaint(painter);

            PainterStock.ReleaseSharedPainter(painter);
        }
示例#2
0
        protected override void DrawBoxContent(DrawBoard canvas, Rectangle updateArea)
        {
            //TODO: review here,
            //
            if (myHtmlCont == null)
            {
                return;
            }

            myHtmlCont.CheckDocUpdate();
            PaintVisitor painter = PainterStock.GetSharedPainter(this.myHtmlCont, canvas);

            painter.SetViewportSize(this.Width, this.Height);
#if DEBUG
            painter.dbugDrawDiagonalBox(Color.Blue, this.X, this.Y, this.Width, this.Height);
#endif

            myHtmlCont.PerformPaint(painter);
            PainterStock.ReleaseSharedPainter(painter);
        }