[gimp] app: translate the cr by allocation.x, y instead of doing this while drawing



commit 5af8cc1d4042774c9c1c58789d2a4bba9b86eced
Author: Michael Natterer <mitch gimp org>
Date:   Fri Oct 15 15:06:43 2010 +0200

    app: translate the cr by allocation.x,y instead of doing this while drawing

 app/widgets/gimppaletteview.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimppaletteview.c b/app/widgets/gimppaletteview.c
index 35fb7aa..5725501 100644
--- a/app/widgets/gimppaletteview.c
+++ b/app/widgets/gimppaletteview.c
@@ -189,9 +189,11 @@ gimp_palette_view_expose (GtkWidget      *widget,
       gdk_cairo_region (cr, eevent->region);
       cairo_clip (cr);
 
+      cairo_translate (cr, allocation.x, allocation.y);
+
       cairo_rectangle (cr,
-                       allocation.x + col * renderer->cell_width  + 0.5,
-                       allocation.y + row * renderer->cell_height + 0.5,
+                       col * renderer->cell_width  + 0.5,
+                       row * renderer->cell_height + 0.5,
                        renderer->cell_width,
                        renderer->cell_height);
 



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