[gimp] app: simplify GimpOverlayFrame drawing a lot



commit c3a4825a8a365a93347478feb34b0937e00dc1af
Author: Michael Natterer <mitch gimp org>
Date:   Tue Jul 27 17:26:40 2010 +0200

    app: simplify GimpOverlayFrame drawing a lot
    
    Thanks to Benjamin Otte for some tips.

 app/widgets/gimpoverlayframe.c |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/app/widgets/gimpoverlayframe.c b/app/widgets/gimpoverlayframe.c
index 2d99fdf..7ba1ada 100644
--- a/app/widgets/gimpoverlayframe.c
+++ b/app/widgets/gimpoverlayframe.c
@@ -178,10 +178,8 @@ gimp_overlay_frame_expose (GtkWidget      *widget,
                  DEG_TO_RAD (90),
                  DEG_TO_RAD (180));
       cairo_close_path (cr);
-    }
-  else
-    {
-      gdk_cairo_region (cr, eevent->region);
+
+      cairo_clip (cr);
     }
 
 /* #define BLING 1 */
@@ -238,17 +236,11 @@ gimp_overlay_frame_expose (GtkWidget      *widget,
     cairo_set_source (cr, gradient);
 
     cairo_pattern_destroy (gradient);
-
-    cairo_clip (cr);
   }
 
-  cairo_paint (cr);
-
-#else
+#endif /* BLING */
 
-  cairo_fill (cr);
-
-#endif
+  cairo_paint (cr);
 
   cairo_destroy (cr);
 



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