[chronojump] Cairo method to blank a DrawingArea



commit 522d1de59a4e0354f8709c58fffcd775c4c8ac3e
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Sep 15 15:40:27 2020 +0200

    Cairo method to blank a DrawingArea

 src/gui/cairo/util.cs | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/src/gui/cairo/util.cs b/src/gui/cairo/util.cs
index 49cbc333..f23e2530 100644
--- a/src/gui/cairo/util.cs
+++ b/src/gui/cairo/util.cs
@@ -58,6 +58,18 @@ public static class CairoUtil
                }
        }
 
+       public static void Blank (
+               Gtk.DrawingArea darea)
+       {
+               using (Cairo.Context g = Gdk.CairoHelper.Create (darea.GdkWindow))
+               {
+                       g.SetSourceRGBA(1, 1, 1, 1);
+                       g.Paint();
+                       g.Stroke();
+                       g.GetTarget ().Dispose ();
+               }
+       }
+
        /*
         * private methods
         */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]