protected override void OnDraw(Xwt.Drawing.Context ctx, Xwt.Rectangle dirtyRect)
        {
            base.OnDraw(ctx, dirtyRect);

            if (pages == null)
            {
                return;
            }
            ctx.Save();

            //Xwt.Rectangle rep_r = new Xwt.Rectangle(1, 1, width - 1, height - 1);

            //RenderXwt render = new RenderXwt(ctx, Scale);
            //render.RunPage(pages);
            //ctx.Stroke();

            if (_defaultBackend == Backend.PureXwt)
            {
                RenderXwt render = new RenderXwt(ctx, this, 1f);
                render.RunPage(pages);
            }
            else
            {
                // Page Drawing using System.Drawing converted to Xwt Context
                PageDrawing render = new PageDrawing(ctx, 1f, Convert.ToInt32(this.MinWidth), Convert.ToInt32(this.MinHeight));
                render.RunPage(pages);
            }
            ctx.Stroke();
            ctx.Save();
        }
Beispiel #2
0
        protected override void OnDraw(Xwt.Drawing.Context ctx, Xwt.Rectangle dirtyRect)
        {
            base.OnDraw(ctx, dirtyRect);

            if (pages == null)
            {
                return;
            }
            ctx.Save();

            //Xwt.Rectangle rep_r = new Xwt.Rectangle(1, 1, width - 1, height - 1);

            //RenderXwt render = new RenderXwt(ctx, Scale);
            //render.RunPage(pages);
            //ctx.Stroke();

            if (_defaultBackend == Backend.PureXwt)
            {
                RenderXwt render = new RenderXwt(ctx, this, 1f);
                render.RunPage(pages);
            }
            else
            {
                // Page Drawing using System.Drawing converted to Xwt Context
                PageDrawing render = new PageDrawing(ctx, 1f, Convert.ToInt32(this.MinWidth), Convert.ToInt32(this.MinHeight));
                render.RunPage(pages);
            }
            ctx.Stroke();
            ctx.Save();
        }