[gimp] app: fix transformation in GimpCanvasPath
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix transformation in GimpCanvasPath
- Date: Mon, 4 Apr 2011 19:42:06 +0000 (UTC)
commit 46819a05da14ab89755ec6fa45f00a9c5f5cd8f7
Author: Michael Natterer <mitch gimp org>
Date: Mon Apr 4 21:41:46 2011 +0200
app: fix transformation in GimpCanvasPath
app/display/gimpcanvaspath.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/app/display/gimpcanvaspath.c b/app/display/gimpcanvaspath.c
index 389c30e..293405d 100644
--- a/app/display/gimpcanvaspath.c
+++ b/app/display/gimpcanvaspath.c
@@ -232,10 +232,9 @@ gimp_canvas_path_draw (GimpCanvasItem *item,
if (private->path)
{
cairo_save (cr);
- cairo_translate (cr,
- - shell->offset_x + private->x,
- - shell->offset_y + private->y);
+ cairo_translate (cr, -shell->offset_x, -shell->offset_y);
cairo_scale (cr, shell->scale_x, shell->scale_y);
+ cairo_translate (cr, private->x, private->y);
cairo_append_path (cr, private->path);
cairo_restore (cr);
@@ -262,10 +261,9 @@ gimp_canvas_path_get_extents (GimpCanvasItem *item,
cr = gdk_cairo_create (gtk_widget_get_window (shell->canvas));
cairo_save (cr);
- cairo_translate (cr,
- - shell->offset_x + private->x,
- - shell->offset_y + private->y);
+ cairo_translate (cr, -shell->offset_x, -shell->offset_y);
cairo_scale (cr, shell->scale_x, shell->scale_y);
+ cairo_translate (cr, private->x, private->y);
cairo_append_path (cr, private->path);
cairo_restore (cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]