Пример #1
0
 protected override bool OnExposeEvent(Gdk.EventExpose evnt)
 {
     Toolkit.Invoke(delegate {
         EventSink.OnDraw(null);
     });
     return(base.OnExposeEvent(evnt));
 }
Пример #2
0
 protected void OnDraw(Rectangle dirtyRect, CairoContextBackend context)
 {
     Backend.ApplicationContext.InvokeUserCode(delegate {
         using (context) {
             EventSink.OnDraw(context, dirtyRect);
         }
     });
 }
Пример #3
0
 protected override bool OnExposeEvent(Gdk.EventExpose evnt)
 {
     Toolkit.Invoke(delegate {
         var a = evnt.Area;
         EventSink.OnDraw(CreateContext(), new Rectangle(a.X, a.Y, a.Width, a.Height));
     });
     return(base.OnExposeEvent(evnt));
 }
Пример #4
0
 protected void OnDraw(Rectangle dirtyRect, CairoContextBackend context)
 {
     Backend.ApplicationContext.InvokeUserCode(delegate {
         using (context) {
             var r = new Rectangle(dirtyRect.X - context.Origin.X, dirtyRect.Y - context.Origin.Y, dirtyRect.Width, dirtyRect.Height);
             EventSink.OnDraw(context, r);
         }
     });
 }
Пример #5
0
 protected override bool OnExposeEvent(Gdk.EventExpose evnt)
 {
     Backend.ApplicationContext.InvokeUserCode(delegate {
         using (var context = CreateContext()) {
             var a = evnt.Area;
             EventSink.OnDraw(context, new Rectangle(a.X, a.Y, a.Width, a.Height));
         }
     });
     return(base.OnExposeEvent(evnt));
 }
Пример #6
0
 protected override bool OnExposeEvent(Gdk.EventExpose evnt)
 {
     Backend.ApplicationContext.InvokeUserCode(delegate {
         using (var context = CreateContext()) {
             var a = evnt.Area;
             // offset exposed area by CanvasBackend origin
             var r = new Rectangle(a.X - context.Origin.X, a.Y - context.Origin.Y, a.Width, a.Height);
             EventSink.OnDraw(context, r);
         }
     });
     return(base.OnExposeEvent(evnt));
 }
Пример #7
0
        public override void DrawRect(System.Drawing.RectangleF dirtyRect)
        {
            context.InvokeUserCode(delegate {
                CGContext ctx = NSGraphicsContext.CurrentContext.GraphicsPort;

                //fill BackgroundColor
                ctx.SetFillColor(Backend.Frontend.BackgroundColor.ToCGColor());
                ctx.FillRect(Bounds);

                var backend = new CGContextBackend {
                    Context = ctx,
                    InverseViewTransform = ctx.GetCTM().Invert()
                };
                eventSink.OnDraw(backend, new Rectangle(dirtyRect.X, dirtyRect.Y, dirtyRect.Width, dirtyRect.Height));
            });
        }
Пример #8
0
 public override void DrawRect(System.Drawing.RectangleF dirtyRect)
 {
     Toolkit.Invoke(delegate {
         eventSink.OnDraw(new ContextInfo(), new Rectangle(dirtyRect.X, dirtyRect.Y, dirtyRect.Width, dirtyRect.Height));
     });
 }
Пример #9
0
 protected override bool OnExposeEvent(Gdk.EventExpose evnt)
 {
     EventSink.OnDraw(null);
     return(base.OnExposeEvent(evnt));
 }
Пример #10
0
 public override void DrawRect(System.Drawing.RectangleF dirtyRect)
 {
     Toolkit.Invoke(delegate {
         eventSink.OnDraw(null);
     });
 }
Пример #11
0
 public override void DrawRect(System.Drawing.RectangleF dirtyRect)
 {
     eventSink.OnDraw(null);
 }