private void Render (System.Windows.Media.DrawingContext dc) { if (BackgroundColorSet) { SolidColorBrush mySolidColorBrush = new SolidColorBrush (); mySolidColorBrush.Color = BackgroundColor.ToWpfColor (); Rect myRect = new Rect (0, 0, Widget.ActualWidth, Widget.ActualHeight); dc.DrawRectangle (mySolidColorBrush, null, myRect); } var ctx = new Xwt.WPFBackend.DrawingContext (dc, Widget.GetScaleFactor ()); ctx.Context.PushClip(new RectangleGeometry(new Rect(0, 0, Widget.ActualWidth, Widget.ActualHeight))); CanvasEventSink.OnDraw(ctx, new Rectangle(0, 0, Widget.ActualWidth, Widget.ActualHeight)); }
private void Render(System.Windows.Media.DrawingContext dc) { if (BackgroundColorSet) { SolidColorBrush mySolidColorBrush = new SolidColorBrush(); mySolidColorBrush.Color = BackgroundColor.ToWpfColor(); Rect myRect = new Rect(0, 0, Widget.ActualWidth, Widget.ActualHeight); dc.DrawRectangle(mySolidColorBrush, null, myRect); } var ctx = new Xwt.WPFBackend.DrawingContext(dc, Widget.GetScaleFactor()); CanvasEventSink.OnDraw(ctx, new Rectangle(0, 0, Widget.ActualWidth, Widget.ActualHeight)); }
private void Render(System.Windows.Media.DrawingContext dc) { // delay drawing until all parents are registered and we can // get a window which is required for many drawing operations if (Frontend.ParentWindow == null) { QueueDraw(); return; } if (BackgroundColorSet) { SolidColorBrush mySolidColorBrush = new SolidColorBrush(); mySolidColorBrush.Color = BackgroundColor.ToWpfColor(); Rect myRect = new Rect(0, 0, Widget.ActualWidth, Widget.ActualHeight); dc.DrawRectangle(mySolidColorBrush, null, myRect); } var ctx = new Xwt.WPFBackend.DrawingContext(dc, Widget.GetScaleFactor()); ctx.Context.PushClip(new RectangleGeometry(new Rect(0, 0, Widget.ActualWidth, Widget.ActualHeight))); CanvasEventSink.OnDraw(ctx, new Rectangle(0, 0, Widget.ActualWidth, Widget.ActualHeight)); }
private void Render(System.Windows.Media.DrawingContext dc) { var dirtyRectangle = queueRect; queueRect = Rectangle.Zero; // disabled! queueRect allways zero! if (queueRect == Rectangle.Zero) { dirtyRectangle = new Rectangle(0, 0, Widget.ActualWidth, Widget.ActualHeight); } var dirtyRect = dirtyRectangle.ToWpfRect(); if (BackgroundColorSet) { SolidColorBrush mySolidColorBrush = new SolidColorBrush(); mySolidColorBrush.Color = BackgroundColor.ToWpfColor(); dc.DrawRectangle(mySolidColorBrush, null, dirtyRect); } var ctx = new Xwt.WPFBackend.DrawingContext(dc, Widget.GetScaleFactor()); ctx.Context.PushClip(new RectangleGeometry(dirtyRect)); CanvasEventSink.OnDraw(ctx, dirtyRectangle); }
private void Render(System.Windows.Media.DrawingContext dc) { // delay drawing until all parents are registered and we can // get a window which is required for many drawing operations if (Frontend.ParentWindow == null) { QueueDraw (); return; } if (BackgroundColorSet) { SolidColorBrush mySolidColorBrush = new SolidColorBrush (); mySolidColorBrush.Color = BackgroundColor.ToWpfColor (); Rect myRect = new Rect (0, 0, Widget.ActualWidth, Widget.ActualHeight); dc.DrawRectangle (mySolidColorBrush, null, myRect); } var ctx = new Xwt.WPFBackend.DrawingContext (dc, Widget.GetScaleFactor ()); ctx.Context.PushClip(new RectangleGeometry(new Rect(0, 0, Widget.ActualWidth, Widget.ActualHeight))); CanvasEventSink.OnDraw(ctx, new Rectangle(0, 0, Widget.ActualWidth, Widget.ActualHeight)); }