[gtk+/rendering-cleanup: 85/124] gdk: Create solid mask with Cairo



commit aedec10cee28090de07a017253c8575ceeaef7af
Author: Benjamin Otte <otte redhat com>
Date:   Sat Jul 17 02:52:59 2010 +0200

    gdk: Create solid mask with Cairo

 gdk/gdkpixmap.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/gdk/gdkpixmap.c b/gdk/gdkpixmap.c
index e2ca656..3d51dad 100644
--- a/gdk/gdkpixmap.c
+++ b/gdk/gdkpixmap.c
@@ -301,18 +301,14 @@ static GdkBitmap *
 make_solid_mask (GdkScreen *screen, gint width, gint height)
 {
   GdkBitmap *bitmap;
-  GdkGC *gc;
-  GdkGCValues gc_values;
+  cairo_t *cr;
   
   bitmap = gdk_pixmap_new (gdk_screen_get_root_window (screen),
 			   width, height, 1);
 
-  gc_values.foreground.pixel = 1;
-  gc = gdk_gc_new_with_values (bitmap, &gc_values, GDK_GC_FOREGROUND);
-  
-  gdk_draw_rectangle (bitmap, gc, TRUE, 0, 0, width, height);
-  
-  g_object_unref (gc);
+  cr = gdk_cairo_create (bitmap);
+  cairo_paint (cr);
+  cairo_destroy (cr);
   
   return bitmap;
 }



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