[gimp] app: port the splash's background pixmap drawing to cairo



commit 154eb3d307873c54939b9f996f858c007a9a4f91
Author: Michael Natterer <mitch gimp org>
Date:   Thu Sep 9 03:32:45 2010 +0200

    app: port the splash's background pixmap drawing to cairo

 app/gui/splash.c |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/app/gui/splash.c b/app/gui/splash.c
index 20c9a23..8be54b8 100644
--- a/app/gui/splash.c
+++ b/app/gui/splash.c
@@ -170,13 +170,18 @@ splash_create (gboolean be_verbose)
 
   if (gdk_pixbuf_animation_is_static_image (pixbuf))
     {
-      GdkPixmap *pixmap = gdk_pixmap_new (gtk_widget_get_window (splash->area),
-					  splash->width, splash->height, -1);
+      GdkPixbuf *static_pixbuf = gdk_pixbuf_animation_get_static_image (pixbuf);
+      GdkPixmap *pixmap;
+      cairo_t   *cr;
+
+      pixmap = gdk_pixmap_new (gtk_widget_get_window (splash->area),
+                               splash->width, splash->height, -1);
+
+      cr = gdk_cairo_create (pixmap);
+      gdk_cairo_set_source_pixbuf (cr, static_pixbuf, 0.0, 0.0);
+      cairo_paint (cr);
+      cairo_destroy (cr);
 
-      gdk_draw_pixbuf (pixmap, gtk_widget_get_style (splash->area)->black_gc,
-		       gdk_pixbuf_animation_get_static_image (pixbuf),
-		       0, 0, 0, 0, splash->width, splash->height,
-		       GDK_RGB_DITHER_NORMAL, 0, 0);
       gdk_window_set_back_pixmap (gtk_widget_get_window (splash->area),
                                   pixmap, FALSE);
       g_object_unref (pixmap);



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