Exemplo n.º 1
0
 void ICanvasCellViewFrontend.Draw(object ctxBackend, Rectangle cellArea)
 {
     using (var ctx = new Context (ctxBackend, Toolkit.CurrentEngine)) {
         ctx.Reset (null);
         OnDraw (ctx, cellArea);
     }
 }
Exemplo n.º 2
0
        void Draw(object ctx, Rectangle bounds)
        {
            var c = new Context(ctx, ToolkitEngine);

            c.Reset(null);
            OnDraw(c, bounds);
        }
Exemplo n.º 3
0
 public ImageBuilder(double width, double height)
 {
     backend = new VectorContextBackend ();
     ctx = new Context (backend, ToolkitEngine, vectorImageRecorderContextHandler);
     ctx.Reset (null);
     this.width = width;
     this.height = height;
 }
Exemplo n.º 4
0
 public ImageBuilder(double width, double height)
 {
     backend = new VectorContextBackend(ToolkitEngine, width, height);
     ctx     = new Context(backend, ToolkitEngine, ToolkitEngine.VectorImageRecorderContextHandler);
     ctx.Reset(null);
     this.width  = width;
     this.height = height;
 }
Exemplo n.º 5
0
 void Draw(object ctx, Rectangle bounds, ImageDescription idesc, Toolkit toolkit)
 {
     var c = new Context (ctx, toolkit);
     if (idesc.Styles != StyleSet.Empty)
         c.SetStyles (idesc.Styles);
     c.Reset (null);
     c.Save ();
     c.GlobalAlpha = idesc.Alpha;
     OnDraw (c, bounds);
     c.Restore ();
 }
Exemplo n.º 6
0
        public ImageBuilder(double width, double height)
        {
            backend = new VectorContextBackend (ToolkitEngine, width, height);

            // Don't set the global styles to the context. The global styles will be used when rendering the image
            ctx = new Context (backend, ToolkitEngine, ToolkitEngine.VectorImageRecorderContextHandler, false);

            ctx.Reset (null);
            this.width = width;
            this.height = height;
        }
        public ImageBuilder(double width, double height)
        {
            backend = new VectorContextBackend(ToolkitEngine, width, height);

            // Don't set the global styles to the context. The global styles will be used when rendering the image
            ctx = new Context(backend, ToolkitEngine, ToolkitEngine.VectorImageRecorderContextHandler, false);

            ctx.Reset(null);
            this.width  = width;
            this.height = height;
        }
Exemplo n.º 8
0
Arquivo: Canvas.cs Projeto: m13253/xwt
			public void OnDraw (object context, Rectangle dirtyRect)
			{
				Context ctx = null;
				try {
					ctx = new Context (context, ToolkitEngine);
					ctx.Reset (Parent);
					((Canvas)Parent).OnDraw (ctx, dirtyRect);
				}
				finally {
					ctx.Dispose ();
				}
			}
Exemplo n.º 9
0
        void Draw(object ctx, Rectangle bounds, ImageDescription idesc, Toolkit toolkit)
        {
            var c = new Context(ctx, toolkit);

            c.Reset(null);
            c.Save();
            if (idesc.Styles != StyleSet.Empty)
            {
                c.SetStyles(idesc.Styles);
            }
            c.GlobalAlpha = idesc.Alpha;
            OnDraw(c, bounds);
            c.Restore();
        }
Exemplo n.º 10
0
		void Draw (object ctx, Rectangle bounds)
		{
			var c = new Context (ctx, ToolkitEngine);
			c.Reset (null);
			OnDraw (c, bounds);
		}