protected override bool OnExposeEvent(Gdk.EventExpose evnt) { Toolkit.Invoke(delegate { EventSink.OnDraw(null); }); return(base.OnExposeEvent(evnt)); }
protected void OnDraw(Rectangle dirtyRect, CairoContextBackend context) { Backend.ApplicationContext.InvokeUserCode(delegate { using (context) { EventSink.OnDraw(context, dirtyRect); } }); }
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)); }
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); } }); }
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)); }
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)); }
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)); }); }
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)); }); }
protected override bool OnExposeEvent(Gdk.EventExpose evnt) { EventSink.OnDraw(null); return(base.OnExposeEvent(evnt)); }
public override void DrawRect(System.Drawing.RectangleF dirtyRect) { Toolkit.Invoke(delegate { eventSink.OnDraw(null); }); }
public override void DrawRect(System.Drawing.RectangleF dirtyRect) { eventSink.OnDraw(null); }