[gimp] app: remove GimpDisplayShell parameters from all GimpCanvasItem vfuncs



commit 0add37a6cc68dac431884715a812d9b24bcac273
Author: Michael Natterer <mitch gimp org>
Date:   Thu Apr 18 15:45:08 2013 +0200

    app: remove GimpDisplayShell parameters from all GimpCanvasItem vfuncs
    
    and get the shell from gimp_canvas_item_get_shell() if needed.  Remove
    some cairo_translate() that didn't have any effect and were leftovers
    from a very early canvas item code.

 app/display/gimpcanvasarc.c              |  32 ++++-----
 app/display/gimpcanvasboundary.c         |  34 ++++-----
 app/display/gimpcanvascorner.c           |  32 ++++-----
 app/display/gimpcanvascursor.c           |  32 ++++-----
 app/display/gimpcanvasgrid.c             |  51 ++++++--------
 app/display/gimpcanvasgroup.c            |  56 +++++++--------
 app/display/gimpcanvasguide.c            |  55 +++++++--------
 app/display/gimpcanvashandle.c           |  48 ++++++-------
 app/display/gimpcanvasitem.c             | 117 +++++++++++++++++--------------
 app/display/gimpcanvasitem.h             |  10 ++-
 app/display/gimpcanvaslayerboundary.c    |  47 ++++++-------
 app/display/gimpcanvasline.c             |  32 ++++-----
 app/display/gimpcanvaspassepartout.c     |  37 ++++------
 app/display/gimpcanvaspath.c             |  52 ++++++--------
 app/display/gimpcanvaspen.c              |  34 ++++-----
 app/display/gimpcanvaspolygon.c          |  34 ++++-----
 app/display/gimpcanvasprogress.c         |  12 ++--
 app/display/gimpcanvasrectangle.c        |  32 ++++-----
 app/display/gimpcanvasrectangleguides.c  |  32 ++++-----
 app/display/gimpcanvassamplepoint.c      |  56 +++++++--------
 app/display/gimpcanvastextcursor.c       |  32 ++++-----
 app/display/gimpcanvastransformguides.c  |  32 ++++-----
 app/display/gimpcanvastransformpreview.c |  34 ++++-----
 23 files changed, 419 insertions(+), 514 deletions(-)
---
diff --git a/app/display/gimpcanvasarc.c b/app/display/gimpcanvasarc.c
index 9d81d86..2ff5104 100644
--- a/app/display/gimpcanvasarc.c
+++ b/app/display/gimpcanvasarc.c
@@ -68,19 +68,17 @@ struct _GimpCanvasArcPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_arc_set_property (GObject          *object,
-                                                      guint             property_id,
-                                                      const GValue     *value,
-                                                      GParamSpec       *pspec);
-static void             gimp_canvas_arc_get_property (GObject          *object,
-                                                      guint             property_id,
-                                                      GValue           *value,
-                                                      GParamSpec       *pspec);
-static void             gimp_canvas_arc_draw         (GimpCanvasItem   *item,
-                                                      GimpDisplayShell *shell,
-                                                      cairo_t          *cr);
-static cairo_region_t * gimp_canvas_arc_get_extents  (GimpCanvasItem   *item,
-                                                      GimpDisplayShell *shell);
+static void             gimp_canvas_arc_set_property (GObject        *object,
+                                                      guint           property_id,
+                                                      const GValue   *value,
+                                                      GParamSpec     *pspec);
+static void             gimp_canvas_arc_get_property (GObject        *object,
+                                                      guint           property_id,
+                                                      GValue         *value,
+                                                      GParamSpec     *pspec);
+static void             gimp_canvas_arc_draw         (GimpCanvasItem *item,
+                                                      cairo_t        *cr);
+static cairo_region_t * gimp_canvas_arc_get_extents  (GimpCanvasItem *item);
 
 
 G_DEFINE_TYPE (GimpCanvasArc, gimp_canvas_arc,
@@ -261,9 +259,8 @@ gimp_canvas_arc_transform (GimpCanvasItem *item,
 }
 
 static void
-gimp_canvas_arc_draw (GimpCanvasItem   *item,
-                      GimpDisplayShell *shell,
-                      cairo_t          *cr)
+gimp_canvas_arc_draw (GimpCanvasItem *item,
+                      cairo_t        *cr)
 {
   GimpCanvasArcPrivate *private = GET_PRIVATE (item);
   gdouble               center_x, center_y;
@@ -287,8 +284,7 @@ gimp_canvas_arc_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_arc_get_extents (GimpCanvasItem   *item,
-                             GimpDisplayShell *shell)
+gimp_canvas_arc_get_extents (GimpCanvasItem *item)
 {
   GimpCanvasArcPrivate  *private = GET_PRIVATE (item);
   cairo_region_t        *region;
diff --git a/app/display/gimpcanvasboundary.c b/app/display/gimpcanvasboundary.c
index ff19bb1..46077f1 100644
--- a/app/display/gimpcanvasboundary.c
+++ b/app/display/gimpcanvasboundary.c
@@ -65,20 +65,18 @@ struct _GimpCanvasBoundaryPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_boundary_finalize     (GObject          *object);
-static void             gimp_canvas_boundary_set_property (GObject          *object,
-                                                           guint             property_id,
-                                                           const GValue     *value,
-                                                           GParamSpec       *pspec);
-static void             gimp_canvas_boundary_get_property (GObject          *object,
-                                                           guint             property_id,
-                                                           GValue           *value,
-                                                           GParamSpec       *pspec);
-static void             gimp_canvas_boundary_draw         (GimpCanvasItem   *item,
-                                                           GimpDisplayShell *shell,
-                                                           cairo_t          *cr);
-static cairo_region_t * gimp_canvas_boundary_get_extents  (GimpCanvasItem   *item,
-                                                           GimpDisplayShell *shell);
+static void             gimp_canvas_boundary_finalize     (GObject        *object);
+static void             gimp_canvas_boundary_set_property (GObject        *object,
+                                                           guint           property_id,
+                                                           const GValue   *value,
+                                                           GParamSpec     *pspec);
+static void             gimp_canvas_boundary_get_property (GObject        *object,
+                                                           guint           property_id,
+                                                           GValue         *value,
+                                                           GParamSpec     *pspec);
+static void             gimp_canvas_boundary_draw         (GimpCanvasItem *item,
+                                                           cairo_t        *cr);
+static cairo_region_t * gimp_canvas_boundary_get_extents  (GimpCanvasItem *item);
 
 
 G_DEFINE_TYPE (GimpCanvasBoundary, gimp_canvas_boundary,
@@ -286,9 +284,8 @@ gimp_canvas_boundary_transform (GimpCanvasItem *item,
 }
 
 static void
-gimp_canvas_boundary_draw (GimpCanvasItem   *item,
-                           GimpDisplayShell *shell,
-                           cairo_t          *cr)
+gimp_canvas_boundary_draw (GimpCanvasItem *item,
+                           cairo_t        *cr)
 {
   GimpCanvasBoundaryPrivate *private = GET_PRIVATE (item);
   GimpSegment               *segs;
@@ -305,8 +302,7 @@ gimp_canvas_boundary_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_boundary_get_extents (GimpCanvasItem   *item,
-                                  GimpDisplayShell *shell)
+gimp_canvas_boundary_get_extents (GimpCanvasItem *item)
 {
   GimpCanvasBoundaryPrivate *private = GET_PRIVATE (item);
   cairo_rectangle_int_t      rectangle;
diff --git a/app/display/gimpcanvascorner.c b/app/display/gimpcanvascorner.c
index 166f171..1d02a4e 100644
--- a/app/display/gimpcanvascorner.c
+++ b/app/display/gimpcanvascorner.c
@@ -68,19 +68,17 @@ struct _GimpCanvasCornerPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_corner_set_property (GObject          *object,
-                                                         guint             property_id,
-                                                         const GValue     *value,
-                                                         GParamSpec       *pspec);
-static void             gimp_canvas_corner_get_property (GObject          *object,
-                                                         guint             property_id,
-                                                         GValue           *value,
-                                                         GParamSpec       *pspec);
-static void             gimp_canvas_corner_draw         (GimpCanvasItem   *item,
-                                                         GimpDisplayShell *shell,
-                                                         cairo_t          *cr);
-static cairo_region_t * gimp_canvas_corner_get_extents  (GimpCanvasItem   *item,
-                                                         GimpDisplayShell *shell);
+static void             gimp_canvas_corner_set_property (GObject        *object,
+                                                         guint           property_id,
+                                                         const GValue   *value,
+                                                         GParamSpec     *pspec);
+static void             gimp_canvas_corner_get_property (GObject        *object,
+                                                         guint           property_id,
+                                                         GValue         *value,
+                                                         GParamSpec     *pspec);
+static void             gimp_canvas_corner_draw         (GimpCanvasItem *item,
+                                                         cairo_t        *cr);
+static cairo_region_t * gimp_canvas_corner_get_extents  (GimpCanvasItem *item);
 
 
 G_DEFINE_TYPE (GimpCanvasCorner, gimp_canvas_corner,
@@ -392,9 +390,8 @@ gimp_canvas_corner_transform (GimpCanvasItem *item,
 }
 
 static void
-gimp_canvas_corner_draw (GimpCanvasItem   *item,
-                         GimpDisplayShell *shell,
-                         cairo_t          *cr)
+gimp_canvas_corner_draw (GimpCanvasItem *item,
+                         cairo_t        *cr)
 {
   gdouble x, y;
   gdouble w, h;
@@ -407,8 +404,7 @@ gimp_canvas_corner_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_corner_get_extents (GimpCanvasItem   *item,
-                                GimpDisplayShell *shell)
+gimp_canvas_corner_get_extents (GimpCanvasItem *item)
 {
   cairo_rectangle_int_t rectangle;
   gdouble               x, y;
diff --git a/app/display/gimpcanvascursor.c b/app/display/gimpcanvascursor.c
index 43f4fd8..bc81611 100644
--- a/app/display/gimpcanvascursor.c
+++ b/app/display/gimpcanvascursor.c
@@ -61,19 +61,17 @@ struct _GimpCanvasCursorPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_cursor_set_property (GObject          *object,
-                                                         guint             property_id,
-                                                         const GValue     *value,
-                                                         GParamSpec       *pspec);
-static void             gimp_canvas_cursor_get_property (GObject          *object,
-                                                         guint             property_id,
-                                                         GValue           *value,
-                                                         GParamSpec       *pspec);
-static void             gimp_canvas_cursor_draw         (GimpCanvasItem   *item,
-                                                         GimpDisplayShell *shell,
-                                                         cairo_t          *cr);
-static cairo_region_t * gimp_canvas_cursor_get_extents  (GimpCanvasItem   *item,
-                                                         GimpDisplayShell *shell);
+static void             gimp_canvas_cursor_set_property (GObject        *object,
+                                                         guint           property_id,
+                                                         const GValue   *value,
+                                                         GParamSpec     *pspec);
+static void             gimp_canvas_cursor_get_property (GObject        *object,
+                                                         guint           property_id,
+                                                         GValue         *value,
+                                                         GParamSpec     *pspec);
+static void             gimp_canvas_cursor_draw         (GimpCanvasItem *item,
+                                                         cairo_t        *cr);
+static cairo_region_t * gimp_canvas_cursor_get_extents  (GimpCanvasItem *item);
 
 
 G_DEFINE_TYPE (GimpCanvasCursor, gimp_canvas_cursor,
@@ -163,9 +161,8 @@ gimp_canvas_cursor_get_property (GObject    *object,
 }
 
 static void
-gimp_canvas_cursor_draw (GimpCanvasItem   *item,
-                         GimpDisplayShell *shell,
-                         cairo_t          *cr)
+gimp_canvas_cursor_draw (GimpCanvasItem *item,
+                         cairo_t        *cr)
 {
   GimpCanvasCursorPrivate *private = GET_PRIVATE (item);
   gdouble                  x, y;
@@ -183,8 +180,7 @@ gimp_canvas_cursor_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_cursor_get_extents (GimpCanvasItem   *item,
-                                GimpDisplayShell *shell)
+gimp_canvas_cursor_get_extents (GimpCanvasItem *item)
 {
   GimpCanvasCursorPrivate *private = GET_PRIVATE (item);
   cairo_rectangle_int_t    rectangle;
diff --git a/app/display/gimpcanvasgrid.c b/app/display/gimpcanvasgrid.c
index 8b033ae..f6c89fc 100644
--- a/app/display/gimpcanvasgrid.c
+++ b/app/display/gimpcanvasgrid.c
@@ -61,23 +61,20 @@ struct _GimpCanvasGridPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_grid_finalize     (GObject          *object);
-static void             gimp_canvas_grid_set_property (GObject          *object,
-                                                       guint             property_id,
-                                                       const GValue     *value,
-                                                       GParamSpec       *pspec);
-static void             gimp_canvas_grid_get_property (GObject          *object,
-                                                       guint             property_id,
-                                                       GValue           *value,
-                                                       GParamSpec       *pspec);
-static void             gimp_canvas_grid_draw         (GimpCanvasItem   *item,
-                                                       GimpDisplayShell *shell,
-                                                       cairo_t          *cr);
-static cairo_region_t * gimp_canvas_grid_get_extents  (GimpCanvasItem   *item,
-                                                       GimpDisplayShell *shell);
-static void             gimp_canvas_grid_stroke       (GimpCanvasItem   *item,
-                                                       GimpDisplayShell *shell,
-                                                       cairo_t          *cr);
+static void             gimp_canvas_grid_finalize     (GObject        *object);
+static void             gimp_canvas_grid_set_property (GObject        *object,
+                                                       guint           property_id,
+                                                       const GValue   *value,
+                                                       GParamSpec     *pspec);
+static void             gimp_canvas_grid_get_property (GObject        *object,
+                                                       guint           property_id,
+                                                       GValue         *value,
+                                                       GParamSpec     *pspec);
+static void             gimp_canvas_grid_draw         (GimpCanvasItem *item,
+                                                       cairo_t        *cr);
+static cairo_region_t * gimp_canvas_grid_get_extents  (GimpCanvasItem *item);
+static void             gimp_canvas_grid_stroke       (GimpCanvasItem *item,
+                                                       cairo_t        *cr);
 
 
 G_DEFINE_TYPE (GimpCanvasGrid, gimp_canvas_grid, GIMP_TYPE_CANVAS_ITEM)
@@ -186,11 +183,11 @@ gimp_canvas_grid_get_property (GObject    *object,
 }
 
 static void
-gimp_canvas_grid_draw (GimpCanvasItem   *item,
-                       GimpDisplayShell *shell,
-                       cairo_t          *cr)
+gimp_canvas_grid_draw (GimpCanvasItem *item,
+                       cairo_t        *cr)
 {
   GimpCanvasGridPrivate *private = GET_PRIVATE (item);
+  GimpDisplayShell      *shell   = gimp_canvas_item_get_shell (item);
   GimpImage             *image   = gimp_canvas_item_get_image (item);
   gdouble                x, y;
   gdouble                dx1, dy1, dx2, dy2;
@@ -202,7 +199,8 @@ gimp_canvas_grid_draw (GimpCanvasItem   *item,
 
 #define CROSSHAIR 2
 
-  g_return_if_fail (private->grid->xspacing > 0 && private->grid->yspacing > 0);
+  g_return_if_fail (private->grid->xspacing > 0 &&
+                    private->grid->yspacing > 0);
 
   /*  skip grid drawing when the space between grid lines starts
    *  disappearing, see bug #599267.
@@ -346,8 +344,7 @@ gimp_canvas_grid_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_grid_get_extents (GimpCanvasItem   *item,
-                              GimpDisplayShell *shell)
+gimp_canvas_grid_get_extents (GimpCanvasItem *item)
 {
   GimpImage             *image = gimp_canvas_item_get_image (item);
   cairo_rectangle_int_t  rectangle;
@@ -373,22 +370,20 @@ gimp_canvas_grid_get_extents (GimpCanvasItem   *item,
 }
 
 static void
-gimp_canvas_grid_stroke (GimpCanvasItem   *item,
-                         GimpDisplayShell *shell,
-                         cairo_t          *cr)
+gimp_canvas_grid_stroke (GimpCanvasItem *item,
+                         cairo_t        *cr)
 {
   GimpCanvasGridPrivate *private = GET_PRIVATE (item);
 
   if (private->grid_style)
     {
-      cairo_translate (cr, -shell->offset_x, -shell->offset_y);
       gimp_canvas_set_grid_style (gimp_canvas_item_get_canvas (item), cr,
                                   private->grid);
       cairo_stroke (cr);
     }
   else
     {
-      GIMP_CANVAS_ITEM_CLASS (parent_class)->stroke (item, shell, cr);
+      GIMP_CANVAS_ITEM_CLASS (parent_class)->stroke (item, cr);
     }
 }
 
diff --git a/app/display/gimpcanvasgroup.c b/app/display/gimpcanvasgroup.c
index 7eaf294..cfd0e51 100644
--- a/app/display/gimpcanvasgroup.c
+++ b/app/display/gimpcanvasgroup.c
@@ -57,28 +57,25 @@ struct _GimpCanvasGroupPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_group_dispose      (GObject          *object);
-static void             gimp_canvas_group_set_property (GObject          *object,
-                                                        guint             property_id,
-                                                        const GValue     *value,
-                                                        GParamSpec       *pspec);
-static void             gimp_canvas_group_get_property (GObject          *object,
-                                                        guint             property_id,
-                                                        GValue           *value,
-                                                        GParamSpec       *pspec);
-static void             gimp_canvas_group_draw         (GimpCanvasItem   *item,
-                                                        GimpDisplayShell *shell,
-                                                        cairo_t          *cr);
-static cairo_region_t * gimp_canvas_group_get_extents  (GimpCanvasItem   *item,
-                                                        GimpDisplayShell *shell);
-static gboolean         gimp_canvas_group_hit          (GimpCanvasItem   *item,
-                                                        GimpDisplayShell *shell,
-                                                        gdouble           x,
-                                                        gdouble           y);
-
-static void             gimp_canvas_group_child_update (GimpCanvasItem   *item,
-                                                        cairo_region_t   *region,
-                                                        GimpCanvasGroup  *group);
+static void             gimp_canvas_group_dispose      (GObject         *object);
+static void             gimp_canvas_group_set_property (GObject         *object,
+                                                        guint            property_id,
+                                                        const GValue    *value,
+                                                        GParamSpec      *pspec);
+static void             gimp_canvas_group_get_property (GObject         *object,
+                                                        guint            property_id,
+                                                        GValue          *value,
+                                                        GParamSpec      *pspec);
+static void             gimp_canvas_group_draw         (GimpCanvasItem  *item,
+                                                        cairo_t         *cr);
+static cairo_region_t * gimp_canvas_group_get_extents  (GimpCanvasItem  *item);
+static gboolean         gimp_canvas_group_hit          (GimpCanvasItem  *item,
+                                                        gdouble          x,
+                                                        gdouble          y);
+
+static void             gimp_canvas_group_child_update (GimpCanvasItem  *item,
+                                                        cairo_region_t  *region,
+                                                        GimpCanvasGroup *group);
 
 
 G_DEFINE_TYPE (GimpCanvasGroup, gimp_canvas_group, GIMP_TYPE_CANVAS_ITEM)
@@ -181,9 +178,8 @@ gimp_canvas_group_get_property (GObject    *object,
 }
 
 static void
-gimp_canvas_group_draw (GimpCanvasItem   *item,
-                        GimpDisplayShell *shell,
-                        cairo_t          *cr)
+gimp_canvas_group_draw (GimpCanvasItem *item,
+                        cairo_t        *cr)
 {
   GimpCanvasGroupPrivate *private = GET_PRIVATE (item);
   GList                  *list;
@@ -203,8 +199,7 @@ gimp_canvas_group_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_group_get_extents (GimpCanvasItem   *item,
-                               GimpDisplayShell *shell)
+gimp_canvas_group_get_extents (GimpCanvasItem *item)
 {
   GimpCanvasGroupPrivate *private = GET_PRIVATE (item);
   cairo_region_t         *region  = NULL;
@@ -230,10 +225,9 @@ gimp_canvas_group_get_extents (GimpCanvasItem   *item,
 }
 
 static gboolean
-gimp_canvas_group_hit (GimpCanvasItem   *item,
-                       GimpDisplayShell *shell,
-                       gdouble           x,
-                       gdouble           y)
+gimp_canvas_group_hit (GimpCanvasItem *item,
+                       gdouble         x,
+                       gdouble         y)
 {
   GimpCanvasGroupPrivate *private = GET_PRIVATE (item);
   GList                  *list;
diff --git a/app/display/gimpcanvasguide.c b/app/display/gimpcanvasguide.c
index 7ba9977..07c003b 100644
--- a/app/display/gimpcanvasguide.c
+++ b/app/display/gimpcanvasguide.c
@@ -59,22 +59,19 @@ struct _GimpCanvasGuidePrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_guide_set_property (GObject          *object,
-                                                        guint             property_id,
-                                                        const GValue     *value,
-                                                        GParamSpec       *pspec);
-static void             gimp_canvas_guide_get_property (GObject          *object,
-                                                        guint             property_id,
-                                                        GValue           *value,
-                                                        GParamSpec       *pspec);
-static void             gimp_canvas_guide_draw         (GimpCanvasItem   *item,
-                                                        GimpDisplayShell *shell,
-                                                        cairo_t          *cr);
-static cairo_region_t * gimp_canvas_guide_get_extents  (GimpCanvasItem   *item,
-                                                        GimpDisplayShell *shell);
-static void             gimp_canvas_guide_stroke       (GimpCanvasItem   *item,
-                                                        GimpDisplayShell *shell,
-                                                        cairo_t          *cr);
+static void             gimp_canvas_guide_set_property (GObject        *object,
+                                                        guint           property_id,
+                                                        const GValue   *value,
+                                                        GParamSpec     *pspec);
+static void             gimp_canvas_guide_get_property (GObject        *object,
+                                                        guint           property_id,
+                                                        GValue         *value,
+                                                        GParamSpec     *pspec);
+static void             gimp_canvas_guide_draw         (GimpCanvasItem *item,
+                                                        cairo_t        *cr);
+static cairo_region_t * gimp_canvas_guide_get_extents  (GimpCanvasItem *item);
+static void             gimp_canvas_guide_stroke       (GimpCanvasItem *item,
+                                                        cairo_t        *cr);
 
 
 G_DEFINE_TYPE (GimpCanvasGuide, gimp_canvas_guide, GIMP_TYPE_CANVAS_ITEM)
@@ -174,11 +171,11 @@ gimp_canvas_guide_get_property (GObject    *object,
 }
 
 static void
-gimp_canvas_guide_transform (GimpCanvasItem   *item,
-                             gdouble          *x1,
-                             gdouble          *y1,
-                             gdouble          *x2,
-                             gdouble          *y2)
+gimp_canvas_guide_transform (GimpCanvasItem *item,
+                             gdouble        *x1,
+                             gdouble        *y1,
+                             gdouble        *x2,
+                             gdouble        *y2)
 {
   GimpCanvasGuidePrivate *private = GET_PRIVATE (item);
   GtkWidget              *canvas  = gimp_canvas_item_get_canvas (item);
@@ -210,9 +207,8 @@ gimp_canvas_guide_transform (GimpCanvasItem   *item,
 }
 
 static void
-gimp_canvas_guide_draw (GimpCanvasItem   *item,
-                        GimpDisplayShell *shell,
-                        cairo_t          *cr)
+gimp_canvas_guide_draw (GimpCanvasItem *item,
+                        cairo_t        *cr)
 {
   gdouble x1, y1;
   gdouble x2, y2;
@@ -226,8 +222,7 @@ gimp_canvas_guide_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_guide_get_extents (GimpCanvasItem   *item,
-                               GimpDisplayShell *shell)
+gimp_canvas_guide_get_extents (GimpCanvasItem *item)
 {
   cairo_rectangle_int_t rectangle;
   gdouble               x1, y1;
@@ -244,22 +239,20 @@ gimp_canvas_guide_get_extents (GimpCanvasItem   *item,
 }
 
 static void
-gimp_canvas_guide_stroke (GimpCanvasItem   *item,
-                          GimpDisplayShell *shell,
-                          cairo_t          *cr)
+gimp_canvas_guide_stroke (GimpCanvasItem *item,
+                          cairo_t        *cr)
 {
   GimpCanvasGuidePrivate *private = GET_PRIVATE (item);
 
   if (private->guide_style)
     {
-      cairo_translate (cr, -shell->offset_x, -shell->offset_y);
       gimp_canvas_set_guide_style (gimp_canvas_item_get_canvas (item), cr,
                                    gimp_canvas_item_get_highlight (item));
       cairo_stroke (cr);
     }
   else
     {
-      GIMP_CANVAS_ITEM_CLASS (parent_class)->stroke (item, shell, cr);
+      GIMP_CANVAS_ITEM_CLASS (parent_class)->stroke (item, cr);
     }
 }
 
diff --git a/app/display/gimpcanvashandle.c b/app/display/gimpcanvashandle.c
index 167b164..da027b5 100644
--- a/app/display/gimpcanvashandle.c
+++ b/app/display/gimpcanvashandle.c
@@ -71,23 +71,20 @@ struct _GimpCanvasHandlePrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_handle_set_property (GObject          *object,
-                                                         guint             property_id,
-                                                         const GValue     *value,
-                                                         GParamSpec       *pspec);
-static void             gimp_canvas_handle_get_property (GObject          *object,
-                                                         guint             property_id,
-                                                         GValue           *value,
-                                                         GParamSpec       *pspec);
-static void             gimp_canvas_handle_draw         (GimpCanvasItem   *item,
-                                                         GimpDisplayShell *shell,
-                                                         cairo_t          *cr);
-static cairo_region_t * gimp_canvas_handle_get_extents  (GimpCanvasItem   *item,
-                                                         GimpDisplayShell *shell);
-static gboolean         gimp_canvas_handle_hit          (GimpCanvasItem   *item,
-                                                         GimpDisplayShell *shell,
-                                                         gdouble           x,
-                                                         gdouble           y);
+static void             gimp_canvas_handle_set_property (GObject        *object,
+                                                         guint           property_id,
+                                                         const GValue   *value,
+                                                         GParamSpec     *pspec);
+static void             gimp_canvas_handle_get_property (GObject        *object,
+                                                         guint           property_id,
+                                                         GValue         *value,
+                                                         GParamSpec     *pspec);
+static void             gimp_canvas_handle_draw         (GimpCanvasItem *item,
+                                                         cairo_t        *cr);
+static cairo_region_t * gimp_canvas_handle_get_extents  (GimpCanvasItem *item);
+static gboolean         gimp_canvas_handle_hit          (GimpCanvasItem *item,
+                                                         gdouble         x,
+                                                         gdouble         y);
 
 
 G_DEFINE_TYPE (GimpCanvasHandle, gimp_canvas_handle,
@@ -293,9 +290,8 @@ gimp_canvas_handle_transform (GimpCanvasItem *item,
 }
 
 static void
-gimp_canvas_handle_draw (GimpCanvasItem   *item,
-                         GimpDisplayShell *shell,
-                         cairo_t          *cr)
+gimp_canvas_handle_draw (GimpCanvasItem *item,
+                         cairo_t        *cr)
 {
   GimpCanvasHandlePrivate *private = GET_PRIVATE (item);
   gdouble                  x, y, tx, ty;
@@ -379,8 +375,7 @@ gimp_canvas_handle_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_handle_get_extents (GimpCanvasItem   *item,
-                                GimpDisplayShell *shell)
+gimp_canvas_handle_get_extents (GimpCanvasItem *item)
 {
   GimpCanvasHandlePrivate *private = GET_PRIVATE (item);
   cairo_rectangle_int_t    rectangle;
@@ -420,17 +415,16 @@ gimp_canvas_handle_get_extents (GimpCanvasItem   *item,
 }
 
 static gboolean
-gimp_canvas_handle_hit (GimpCanvasItem   *item,
-                        GimpDisplayShell *shell,
-                        gdouble           x,
-                        gdouble           y)
+gimp_canvas_handle_hit (GimpCanvasItem *item,
+                        gdouble         x,
+                        gdouble         y)
 {
   GimpCanvasHandlePrivate *private = GET_PRIVATE (item);
   gdouble                  handle_tx, handle_ty;
   gdouble                  mx, my, tx, ty, mmx, mmy;
   gdouble                  diamond_offset_x = 0.0;
   gdouble                  diamond_offset_y = 0.0;
-  gdouble                  angle = -private->start_angle;
+  gdouble                  angle            = -private->start_angle;
 
   gimp_canvas_handle_transform (item, &handle_tx, &handle_ty);
 
diff --git a/app/display/gimpcanvasitem.c b/app/display/gimpcanvasitem.c
index ed17753..093eaf3 100644
--- a/app/display/gimpcanvasitem.c
+++ b/app/display/gimpcanvasitem.c
@@ -74,34 +74,29 @@ struct _GimpCanvasItemPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_item_constructed      (GObject          *object);
-static void             gimp_canvas_item_set_property     (GObject          *object,
-                                                           guint             property_id,
-                                                           const GValue     *value,
-                                                           GParamSpec       *pspec);
-static void             gimp_canvas_item_get_property     (GObject          *object,
-                                                           guint             property_id,
-                                                           GValue           *value,
-                                                           GParamSpec       *pspec);
-static void  gimp_canvas_item_dispatch_properties_changed (GObject          *object,
-                                                           guint             n_pspecs,
-                                                           GParamSpec      **pspecs);
-
-static void             gimp_canvas_item_real_draw        (GimpCanvasItem   *item,
-                                                           GimpDisplayShell *shell,
-                                                           cairo_t          *cr);
-static cairo_region_t * gimp_canvas_item_real_get_extents (GimpCanvasItem   *item,
-                                                           GimpDisplayShell *shell);
-static void             gimp_canvas_item_real_stroke      (GimpCanvasItem   *item,
-                                                           GimpDisplayShell *shell,
-                                                           cairo_t          *cr);
-static void             gimp_canvas_item_real_fill        (GimpCanvasItem   *item,
-                                                           GimpDisplayShell *shell,
-                                                           cairo_t          *cr);
-static gboolean         gimp_canvas_item_real_hit         (GimpCanvasItem   *item,
-                                                           GimpDisplayShell *shell,
-                                                           gdouble           x,
-                                                           gdouble           y);
+static void             gimp_canvas_item_constructed      (GObject         *object);
+static void             gimp_canvas_item_set_property     (GObject         *object,
+                                                           guint            property_id,
+                                                           const GValue    *value,
+                                                           GParamSpec      *pspec);
+static void             gimp_canvas_item_get_property     (GObject         *object,
+                                                           guint            property_id,
+                                                           GValue          *value,
+                                                           GParamSpec      *pspec);
+static void  gimp_canvas_item_dispatch_properties_changed (GObject         *object,
+                                                           guint            n_pspecs,
+                                                           GParamSpec     **pspecs);
+
+static void             gimp_canvas_item_real_draw        (GimpCanvasItem  *item,
+                                                           cairo_t         *cr);
+static cairo_region_t * gimp_canvas_item_real_get_extents (GimpCanvasItem  *item);
+static void             gimp_canvas_item_real_stroke      (GimpCanvasItem  *item,
+                                                           cairo_t         *cr);
+static void             gimp_canvas_item_real_fill        (GimpCanvasItem  *item,
+                                                           cairo_t         *cr);
+static gboolean         gimp_canvas_item_real_hit         (GimpCanvasItem  *item,
+                                                           gdouble          x,
+                                                           gdouble          y);
 
 
 G_DEFINE_TYPE (GimpCanvasItem, gimp_canvas_item,
@@ -279,24 +274,21 @@ gimp_canvas_item_dispatch_properties_changed (GObject     *object,
 }
 
 static void
-gimp_canvas_item_real_draw (GimpCanvasItem   *item,
-                            GimpDisplayShell *shell,
-                            cairo_t          *cr)
+gimp_canvas_item_real_draw (GimpCanvasItem *item,
+                            cairo_t        *cr)
 {
   g_warn_if_reached ();
 }
 
 static cairo_region_t *
-gimp_canvas_item_real_get_extents (GimpCanvasItem   *item,
-                                   GimpDisplayShell *shell)
+gimp_canvas_item_real_get_extents (GimpCanvasItem *item)
 {
   return NULL;
 }
 
 static void
-gimp_canvas_item_real_stroke (GimpCanvasItem   *item,
-                              GimpDisplayShell *shell,
-                              cairo_t          *cr)
+gimp_canvas_item_real_stroke (GimpCanvasItem *item,
+                              cairo_t        *cr)
 {
   GimpCanvasItemPrivate *private = GET_PRIVATE (item);
 
@@ -311,9 +303,8 @@ gimp_canvas_item_real_stroke (GimpCanvasItem   *item,
 }
 
 static void
-gimp_canvas_item_real_fill (GimpCanvasItem   *item,
-                            GimpDisplayShell *shell,
-                            cairo_t          *cr)
+gimp_canvas_item_real_fill (GimpCanvasItem *item,
+                            cairo_t        *cr)
 {
   GimpCanvasItemPrivate *private = GET_PRIVATE (item);
 
@@ -327,10 +318,9 @@ gimp_canvas_item_real_fill (GimpCanvasItem   *item,
 }
 
 static gboolean
-gimp_canvas_item_real_hit (GimpCanvasItem   *item,
-                           GimpDisplayShell *shell,
-                           gdouble           x,
-                           gdouble           y)
+gimp_canvas_item_real_hit (GimpCanvasItem *item,
+                           gdouble         x,
+                           gdouble         y)
 {
   return FALSE;
 }
@@ -338,6 +328,18 @@ gimp_canvas_item_real_hit (GimpCanvasItem   *item,
 
 /*  public functions  */
 
+GimpDisplayShell *
+gimp_canvas_item_get_shell (GimpCanvasItem *item)
+{
+  GimpCanvasItemPrivate *private;
+
+  g_return_val_if_fail (GIMP_IS_CANVAS_ITEM (item), NULL);
+
+  private = GET_PRIVATE (item);
+
+  return private->shell;
+}
+
 GimpImage *
 gimp_canvas_item_get_image (GimpCanvasItem *item)
 {
@@ -376,7 +378,7 @@ gimp_canvas_item_draw (GimpCanvasItem *item,
   if (private->visible)
     {
       cairo_save (cr);
-      GIMP_CANVAS_ITEM_GET_CLASS (item)->draw (item, private->shell, cr);
+      GIMP_CANVAS_ITEM_GET_CLASS (item)->draw (item, cr);
       cairo_restore (cr);
     }
 }
@@ -391,7 +393,7 @@ gimp_canvas_item_get_extents (GimpCanvasItem *item)
   private = GET_PRIVATE (item);
 
   if (private->visible)
-    return GIMP_CANVAS_ITEM_GET_CLASS (item)->get_extents (item, private->shell);
+    return GIMP_CANVAS_ITEM_GET_CLASS (item)->get_extents (item);
 
   return NULL;
 }
@@ -401,13 +403,9 @@ gimp_canvas_item_hit (GimpCanvasItem   *item,
                       gdouble           x,
                       gdouble           y)
 {
-  GimpCanvasItemPrivate *private;
-
   g_return_val_if_fail (GIMP_IS_CANVAS_ITEM (item), FALSE);
 
-  private = GET_PRIVATE (item);
-
-  return GIMP_CANVAS_ITEM_GET_CLASS (item)->hit (item, private->shell, x, y);
+  return GIMP_CANVAS_ITEM_GET_CLASS (item)->hit (item, x, y);
 }
 
 void
@@ -609,6 +607,21 @@ gimp_canvas_item_resume_filling (GimpCanvasItem *item)
 }
 
 void
+gimp_canvas_item_transform (GimpCanvasItem *item,
+                            cairo_t        *cr)
+{
+  GimpCanvasItemPrivate *private;
+
+  g_return_if_fail (GIMP_IS_CANVAS_ITEM (item));
+  g_return_if_fail (cr != NULL);
+
+  private = GET_PRIVATE (item);
+
+  cairo_translate (cr, -private->shell->offset_x, -private->shell->offset_y);
+  cairo_scale (cr, private->shell->scale_x, private->shell->scale_y);
+}
+
+void
 gimp_canvas_item_transform_xy (GimpCanvasItem *item,
                                gdouble         x,
                                gdouble         y,
@@ -671,7 +684,7 @@ _gimp_canvas_item_stroke (GimpCanvasItem *item,
 
   if (private->suspend_stroking == 0)
     {
-      GIMP_CANVAS_ITEM_GET_CLASS (item)->stroke (item, private->shell, cr);
+      GIMP_CANVAS_ITEM_GET_CLASS (item)->stroke (item, cr);
     }
   else
     {
@@ -690,7 +703,7 @@ _gimp_canvas_item_fill (GimpCanvasItem   *item,
 
   if (private->suspend_filling == 0)
     {
-      GIMP_CANVAS_ITEM_GET_CLASS (item)->fill (item, private->shell, cr);
+      GIMP_CANVAS_ITEM_GET_CLASS (item)->fill (item, cr);
     }
   else
     {
diff --git a/app/display/gimpcanvasitem.h b/app/display/gimpcanvasitem.h
index 4bfd5eb..9f9db01 100644
--- a/app/display/gimpcanvasitem.h
+++ b/app/display/gimpcanvasitem.h
@@ -50,20 +50,15 @@ struct _GimpCanvasItemClass
 
   /*  virtual functions  */
   void             (* draw)        (GimpCanvasItem   *item,
-                                    GimpDisplayShell *shell,
                                     cairo_t          *cr);
-  cairo_region_t * (* get_extents) (GimpCanvasItem   *item,
-                                    GimpDisplayShell *shell);
+  cairo_region_t * (* get_extents) (GimpCanvasItem   *item);
 
   void             (* stroke)      (GimpCanvasItem   *item,
-                                    GimpDisplayShell *shell,
                                     cairo_t          *cr);
   void             (* fill)        (GimpCanvasItem   *item,
-                                    GimpDisplayShell *shell,
                                     cairo_t          *cr);
 
   gboolean         (* hit)         (GimpCanvasItem   *item,
-                                    GimpDisplayShell *shell,
                                     gdouble           x,
                                     gdouble           y);
 };
@@ -71,6 +66,7 @@ struct _GimpCanvasItemClass
 
 GType            gimp_canvas_item_get_type         (void) G_GNUC_CONST;
 
+GimpDisplayShell * gimp_canvas_item_get_shell      (GimpCanvasItem   *item);
 GimpImage      * gimp_canvas_item_get_image        (GimpCanvasItem   *item);
 GtkWidget      * gimp_canvas_item_get_canvas       (GimpCanvasItem   *item);
 
@@ -102,6 +98,8 @@ void             gimp_canvas_item_resume_stroking  (GimpCanvasItem   *item);
 void             gimp_canvas_item_suspend_filling  (GimpCanvasItem   *item);
 void             gimp_canvas_item_resume_filling   (GimpCanvasItem   *item);
 
+void             gimp_canvas_item_transform        (GimpCanvasItem   *item,
+                                                    cairo_t          *cr);
 void             gimp_canvas_item_transform_xy     (GimpCanvasItem   *item,
                                                     gdouble           x,
                                                     gdouble           y,
diff --git a/app/display/gimpcanvaslayerboundary.c b/app/display/gimpcanvaslayerboundary.c
index 3e29058..f34284e 100644
--- a/app/display/gimpcanvaslayerboundary.c
+++ b/app/display/gimpcanvaslayerboundary.c
@@ -61,22 +61,19 @@ struct _GimpCanvasLayerBoundaryPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_layer_boundary_set_property (GObject          *object,
-                                                                 guint             property_id,
-                                                                 const GValue     *value,
-                                                                 GParamSpec       *pspec);
-static void             gimp_canvas_layer_boundary_get_property (GObject          *object,
-                                                                 guint             property_id,
-                                                                 GValue           *value,
-                                                                 GParamSpec       *pspec);
-static void             gimp_canvas_layer_boundary_draw         (GimpCanvasItem   *item,
-                                                                 GimpDisplayShell *shell,
-                                                                 cairo_t          *cr);
-static cairo_region_t * gimp_canvas_layer_boundary_get_extents  (GimpCanvasItem   *item,
-                                                                 GimpDisplayShell *shell);
-static void             gimp_canvas_layer_boundary_stroke       (GimpCanvasItem   *item,
-                                                                 GimpDisplayShell *shell,
-                                                                 cairo_t          *cr);
+static void             gimp_canvas_layer_boundary_set_property (GObject        *object,
+                                                                 guint           property_id,
+                                                                 const GValue   *value,
+                                                                 GParamSpec     *pspec);
+static void             gimp_canvas_layer_boundary_get_property (GObject        *object,
+                                                                 guint           property_id,
+                                                                 GValue         *value,
+                                                                 GParamSpec     *pspec);
+static void             gimp_canvas_layer_boundary_draw         (GimpCanvasItem *item,
+                                                                 cairo_t        *cr);
+static cairo_region_t * gimp_canvas_layer_boundary_get_extents  (GimpCanvasItem *item);
+static void             gimp_canvas_layer_boundary_stroke       (GimpCanvasItem *item,
+                                                                 cairo_t        *cr);
 
 
 G_DEFINE_TYPE (GimpCanvasLayerBoundary, gimp_canvas_layer_boundary,
@@ -163,36 +160,32 @@ gimp_canvas_layer_boundary_get_property (GObject    *object,
 }
 
 static void
-gimp_canvas_layer_boundary_draw (GimpCanvasItem   *item,
-                                 GimpDisplayShell *shell,
-                                 cairo_t          *cr)
+gimp_canvas_layer_boundary_draw (GimpCanvasItem *item,
+                                 cairo_t        *cr)
 {
   GimpCanvasLayerBoundaryPrivate *private = GET_PRIVATE (item);
 
   if (private->layer)
-    GIMP_CANVAS_ITEM_CLASS (parent_class)->draw (item, shell, cr);
+    GIMP_CANVAS_ITEM_CLASS (parent_class)->draw (item, cr);
 }
 
 static cairo_region_t *
-gimp_canvas_layer_boundary_get_extents (GimpCanvasItem   *item,
-                                        GimpDisplayShell *shell)
+gimp_canvas_layer_boundary_get_extents (GimpCanvasItem *item)
 {
   GimpCanvasLayerBoundaryPrivate *private = GET_PRIVATE (item);
 
   if (private->layer)
-    return GIMP_CANVAS_ITEM_CLASS (parent_class)->get_extents (item, shell);
+    return GIMP_CANVAS_ITEM_CLASS (parent_class)->get_extents (item);
 
   return NULL;
 }
 
 static void
-gimp_canvas_layer_boundary_stroke (GimpCanvasItem   *item,
-                                   GimpDisplayShell *shell,
-                                   cairo_t          *cr)
+gimp_canvas_layer_boundary_stroke (GimpCanvasItem *item,
+                                   cairo_t        *cr)
 {
   GimpCanvasLayerBoundaryPrivate *private = GET_PRIVATE (item);
 
-  cairo_translate (cr, -shell->offset_x, -shell->offset_y);
   gimp_canvas_set_layer_style (gimp_canvas_item_get_canvas (item), cr,
                                private->layer);
   cairo_stroke (cr);
diff --git a/app/display/gimpcanvasline.c b/app/display/gimpcanvasline.c
index 4bf0630..edf41a3 100644
--- a/app/display/gimpcanvasline.c
+++ b/app/display/gimpcanvasline.c
@@ -60,19 +60,17 @@ struct _GimpCanvasLinePrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_line_set_property (GObject          *object,
-                                                       guint             property_id,
-                                                       const GValue     *value,
-                                                       GParamSpec       *pspec);
-static void             gimp_canvas_line_get_property (GObject          *object,
-                                                       guint             property_id,
-                                                       GValue           *value,
-                                                       GParamSpec       *pspec);
-static void             gimp_canvas_line_draw         (GimpCanvasItem   *item,
-                                                       GimpDisplayShell *shell,
-                                                       cairo_t          *cr);
-static cairo_region_t * gimp_canvas_line_get_extents  (GimpCanvasItem   *item,
-                                                       GimpDisplayShell *shell);
+static void             gimp_canvas_line_set_property (GObject        *object,
+                                                       guint           property_id,
+                                                       const GValue   *value,
+                                                       GParamSpec     *pspec);
+static void             gimp_canvas_line_get_property (GObject        *object,
+                                                       guint           property_id,
+                                                       GValue         *value,
+                                                       GParamSpec     *pspec);
+static void             gimp_canvas_line_draw         (GimpCanvasItem *item,
+                                                       cairo_t        *cr);
+static cairo_region_t * gimp_canvas_line_get_extents  (GimpCanvasItem *item);
 
 
 G_DEFINE_TYPE (GimpCanvasLine, gimp_canvas_line, GIMP_TYPE_CANVAS_ITEM)
@@ -205,9 +203,8 @@ gimp_canvas_line_transform (GimpCanvasItem *item,
 }
 
 static void
-gimp_canvas_line_draw (GimpCanvasItem   *item,
-                       GimpDisplayShell *shell,
-                       cairo_t          *cr)
+gimp_canvas_line_draw (GimpCanvasItem *item,
+                       cairo_t        *cr)
 {
   gdouble x1, y1;
   gdouble x2, y2;
@@ -221,8 +218,7 @@ gimp_canvas_line_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_line_get_extents (GimpCanvasItem   *item,
-                              GimpDisplayShell *shell)
+gimp_canvas_line_get_extents (GimpCanvasItem *item)
 {
   cairo_rectangle_int_t rectangle;
   gdouble               x1, y1;
diff --git a/app/display/gimpcanvaspassepartout.c b/app/display/gimpcanvaspassepartout.c
index 5c83b24..0774e6f 100644
--- a/app/display/gimpcanvaspassepartout.c
+++ b/app/display/gimpcanvaspassepartout.c
@@ -33,14 +33,11 @@
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_passe_partout_draw        (GimpCanvasItem   *item,
-                                                               GimpDisplayShell *shell,
-                                                               cairo_t          *cr);
-static cairo_region_t * gimp_canvas_passe_partout_get_extents (GimpCanvasItem   *item,
-                                                               GimpDisplayShell *shell);
-static void             gimp_canvas_passe_partout_fill        (GimpCanvasItem   *item,
-                                                               GimpDisplayShell *shell,
-                                                               cairo_t          *cr);
+static void             gimp_canvas_passe_partout_draw        (GimpCanvasItem *item,
+                                                               cairo_t        *cr);
+static cairo_region_t * gimp_canvas_passe_partout_get_extents (GimpCanvasItem *item);
+static void             gimp_canvas_passe_partout_fill        (GimpCanvasItem *item,
+                                                               cairo_t        *cr);
 
 
 G_DEFINE_TYPE (GimpCanvasPassePartout, gimp_canvas_passe_partout,
@@ -65,23 +62,22 @@ gimp_canvas_passe_partout_init (GimpCanvasPassePartout *passe_partout)
 }
 
 static void
-gimp_canvas_passe_partout_draw (GimpCanvasItem   *item,
-                                GimpDisplayShell *shell,
-                                cairo_t          *cr)
+gimp_canvas_passe_partout_draw (GimpCanvasItem *item,
+                                cairo_t        *cr)
 {
-  gint w, h;
+  GimpDisplayShell *shell = gimp_canvas_item_get_shell (item);
+  gint              w, h;
 
   gimp_display_shell_draw_get_scaled_image_size (shell, &w, &h);
-
   cairo_rectangle (cr, - shell->offset_x, - shell->offset_y, w, h);
 
-  GIMP_CANVAS_ITEM_CLASS (parent_class)->draw (item, shell, cr);
+  GIMP_CANVAS_ITEM_CLASS (parent_class)->draw (item, cr);
 }
 
 static cairo_region_t *
-gimp_canvas_passe_partout_get_extents (GimpCanvasItem   *item,
-                                       GimpDisplayShell *shell)
+gimp_canvas_passe_partout_get_extents (GimpCanvasItem *item)
 {
+  GimpDisplayShell      *shell = gimp_canvas_item_get_shell (item);
   cairo_rectangle_int_t  rectangle;
   cairo_region_t        *inner;
   cairo_region_t        *outer;
@@ -94,7 +90,7 @@ gimp_canvas_passe_partout_get_extents (GimpCanvasItem   *item,
 
   outer = cairo_region_create_rectangle (&rectangle);
 
-  inner = GIMP_CANVAS_ITEM_CLASS (parent_class)->get_extents (item, shell);
+  inner = GIMP_CANVAS_ITEM_CLASS (parent_class)->get_extents (item);
 
   cairo_region_subtract (outer, inner);
 
@@ -102,12 +98,9 @@ gimp_canvas_passe_partout_get_extents (GimpCanvasItem   *item,
 }
 
 static void
-gimp_canvas_passe_partout_fill (GimpCanvasItem   *item,
-                                GimpDisplayShell *shell,
-                                cairo_t          *cr)
+gimp_canvas_passe_partout_fill (GimpCanvasItem *item,
+                                cairo_t        *cr)
 {
-  cairo_translate (cr, -shell->offset_x, -shell->offset_y);
-
   cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
   cairo_clip (cr);
 
diff --git a/app/display/gimpcanvaspath.c b/app/display/gimpcanvaspath.c
index b487429..ea82018 100644
--- a/app/display/gimpcanvaspath.c
+++ b/app/display/gimpcanvaspath.c
@@ -65,23 +65,20 @@ struct _GimpCanvasPathPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_path_finalize     (GObject          *object);
-static void             gimp_canvas_path_set_property (GObject          *object,
-                                                       guint             property_id,
-                                                       const GValue     *value,
-                                                       GParamSpec       *pspec);
-static void             gimp_canvas_path_get_property (GObject          *object,
-                                                       guint             property_id,
-                                                       GValue           *value,
-                                                       GParamSpec       *pspec);
-static void             gimp_canvas_path_draw         (GimpCanvasItem   *item,
-                                                       GimpDisplayShell *shell,
-                                                       cairo_t          *cr);
-static cairo_region_t * gimp_canvas_path_get_extents  (GimpCanvasItem   *item,
-                                                       GimpDisplayShell *shell);
-static void             gimp_canvas_path_stroke       (GimpCanvasItem   *item,
-                                                       GimpDisplayShell *shell,
-                                                       cairo_t          *cr);
+static void             gimp_canvas_path_finalize     (GObject        *object);
+static void             gimp_canvas_path_set_property (GObject        *object,
+                                                       guint           property_id,
+                                                       const GValue   *value,
+                                                       GParamSpec     *pspec);
+static void             gimp_canvas_path_get_property (GObject        *object,
+                                                       guint           property_id,
+                                                       GValue         *value,
+                                                       GParamSpec     *pspec);
+static void             gimp_canvas_path_draw         (GimpCanvasItem *item,
+                                                       cairo_t        *cr);
+static cairo_region_t * gimp_canvas_path_get_extents  (GimpCanvasItem *item);
+static void             gimp_canvas_path_stroke       (GimpCanvasItem *item,
+                                                       cairo_t        *cr);
 
 
 G_DEFINE_TYPE (GimpCanvasPath, gimp_canvas_path,
@@ -222,17 +219,15 @@ gimp_canvas_path_get_property (GObject    *object,
 }
 
 static void
-gimp_canvas_path_draw (GimpCanvasItem   *item,
-                       GimpDisplayShell *shell,
-                       cairo_t          *cr)
+gimp_canvas_path_draw (GimpCanvasItem *item,
+                       cairo_t        *cr)
 {
   GimpCanvasPathPrivate *private = GET_PRIVATE (item);
 
   if (private->path)
     {
       cairo_save (cr);
-      cairo_translate (cr, -shell->offset_x, -shell->offset_y);
-      cairo_scale (cr, shell->scale_x, shell->scale_y);
+      gimp_canvas_item_transform (item, cr);
       cairo_translate (cr, private->x, private->y);
 
       cairo_append_path (cr, private->path);
@@ -246,8 +241,7 @@ gimp_canvas_path_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_path_get_extents (GimpCanvasItem   *item,
-                              GimpDisplayShell *shell)
+gimp_canvas_path_get_extents (GimpCanvasItem *item)
 {
   GimpCanvasPathPrivate *private = GET_PRIVATE (item);
   GtkWidget             *canvas  = gimp_canvas_item_get_canvas (item);
@@ -261,8 +255,7 @@ gimp_canvas_path_get_extents (GimpCanvasItem   *item,
       cr = gdk_cairo_create (gtk_widget_get_window (canvas));
 
       cairo_save (cr);
-      cairo_translate (cr, -shell->offset_x, -shell->offset_y);
-      cairo_scale (cr, shell->scale_x, shell->scale_y);
+      gimp_canvas_item_transform (item, cr);
       cairo_translate (cr, private->x, private->y);
 
       cairo_append_path (cr, private->path);
@@ -294,9 +287,8 @@ gimp_canvas_path_get_extents (GimpCanvasItem   *item,
 }
 
 static void
-gimp_canvas_path_stroke (GimpCanvasItem   *item,
-                         GimpDisplayShell *shell,
-                         cairo_t          *cr)
+gimp_canvas_path_stroke (GimpCanvasItem *item,
+                         cairo_t        *cr)
 {
   GimpCanvasPathPrivate *private = GET_PRIVATE (item);
   GtkWidget             *canvas  = gimp_canvas_item_get_canvas (item);
@@ -323,7 +315,7 @@ gimp_canvas_path_stroke (GimpCanvasItem   *item,
       break;
 
     case GIMP_PATH_STYLE_DEFAULT:
-      GIMP_CANVAS_ITEM_CLASS (parent_class)->stroke (item, shell, cr);
+      GIMP_CANVAS_ITEM_CLASS (parent_class)->stroke (item, cr);
       break;
     }
 }
diff --git a/app/display/gimpcanvaspen.c b/app/display/gimpcanvaspen.c
index f619fed..cc6ebdc 100644
--- a/app/display/gimpcanvaspen.c
+++ b/app/display/gimpcanvaspen.c
@@ -61,19 +61,17 @@ struct _GimpCanvasPenPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_pen_set_property (GObject          *object,
-                                                      guint             property_id,
-                                                      const GValue     *value,
-                                                      GParamSpec       *pspec);
-static void             gimp_canvas_pen_get_property (GObject          *object,
-                                                      guint             property_id,
-                                                      GValue           *value,
-                                                      GParamSpec       *pspec);
-static cairo_region_t * gimp_canvas_pen_get_extents  (GimpCanvasItem   *item,
-                                                      GimpDisplayShell *shell);
-static void             gimp_canvas_pen_stroke       (GimpCanvasItem   *item,
-                                                      GimpDisplayShell *shell,
-                                                      cairo_t          *cr);
+static void             gimp_canvas_pen_set_property (GObject        *object,
+                                                      guint           property_id,
+                                                      const GValue   *value,
+                                                      GParamSpec     *pspec);
+static void             gimp_canvas_pen_get_property (GObject        *object,
+                                                      guint           property_id,
+                                                      GValue         *value,
+                                                      GParamSpec     *pspec);
+static cairo_region_t * gimp_canvas_pen_get_extents  (GimpCanvasItem *item);
+static void             gimp_canvas_pen_stroke       (GimpCanvasItem *item,
+                                                      cairo_t        *cr);
 
 
 G_DEFINE_TYPE (GimpCanvasPen, gimp_canvas_pen,
@@ -159,13 +157,12 @@ gimp_canvas_pen_get_property (GObject    *object,
 }
 
 static cairo_region_t *
-gimp_canvas_pen_get_extents (GimpCanvasItem   *item,
-                             GimpDisplayShell *shell)
+gimp_canvas_pen_get_extents (GimpCanvasItem *item)
 {
   GimpCanvasPenPrivate *private = GET_PRIVATE (item);
   cairo_region_t       *region;
 
-  region = GIMP_CANVAS_ITEM_CLASS (parent_class)->get_extents (item, shell);
+  region = GIMP_CANVAS_ITEM_CLASS (parent_class)->get_extents (item);
 
   if (region)
     {
@@ -185,9 +182,8 @@ gimp_canvas_pen_get_extents (GimpCanvasItem   *item,
 }
 
 static void
-gimp_canvas_pen_stroke (GimpCanvasItem   *item,
-                        GimpDisplayShell *shell,
-                        cairo_t          *cr)
+gimp_canvas_pen_stroke (GimpCanvasItem *item,
+                        cairo_t        *cr)
 {
   GimpCanvasPenPrivate *private = GET_PRIVATE (item);
 
diff --git a/app/display/gimpcanvaspolygon.c b/app/display/gimpcanvaspolygon.c
index 65c218b..69deb96 100644
--- a/app/display/gimpcanvaspolygon.c
+++ b/app/display/gimpcanvaspolygon.c
@@ -59,20 +59,18 @@ struct _GimpCanvasPolygonPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_polygon_finalize     (GObject          *object);
-static void             gimp_canvas_polygon_set_property (GObject          *object,
-                                                          guint             property_id,
-                                                          const GValue     *value,
-                                                          GParamSpec       *pspec);
-static void             gimp_canvas_polygon_get_property (GObject          *object,
-                                                          guint             property_id,
-                                                          GValue           *value,
-                                                          GParamSpec       *pspec);
-static void             gimp_canvas_polygon_draw         (GimpCanvasItem   *item,
-                                                          GimpDisplayShell *shell,
-                                                          cairo_t          *cr);
-static cairo_region_t * gimp_canvas_polygon_get_extents  (GimpCanvasItem   *item,
-                                                          GimpDisplayShell *shell);
+static void             gimp_canvas_polygon_finalize     (GObject        *object);
+static void             gimp_canvas_polygon_set_property (GObject        *object,
+                                                          guint           property_id,
+                                                          const GValue   *value,
+                                                          GParamSpec     *pspec);
+static void             gimp_canvas_polygon_get_property (GObject        *object,
+                                                          guint           property_id,
+                                                          GValue         *value,
+                                                          GParamSpec     *pspec);
+static void             gimp_canvas_polygon_draw         (GimpCanvasItem *item,
+                                                          cairo_t        *cr);
+static cairo_region_t * gimp_canvas_polygon_get_extents  (GimpCanvasItem *item);
 
 
 G_DEFINE_TYPE (GimpCanvasPolygon, gimp_canvas_polygon,
@@ -217,9 +215,8 @@ gimp_canvas_polygon_transform (GimpCanvasItem *item,
 }
 
 static void
-gimp_canvas_polygon_draw (GimpCanvasItem   *item,
-                          GimpDisplayShell *shell,
-                          cairo_t          *cr)
+gimp_canvas_polygon_draw (GimpCanvasItem *item,
+                          cairo_t        *cr)
 {
   GimpCanvasPolygonPrivate *private = GET_PRIVATE (item);
   GimpVector2              *points;
@@ -245,8 +242,7 @@ gimp_canvas_polygon_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_polygon_get_extents (GimpCanvasItem   *item,
-                                 GimpDisplayShell *shell)
+gimp_canvas_polygon_get_extents (GimpCanvasItem *item)
 {
   GimpCanvasPolygonPrivate *private = GET_PRIVATE (item);
   cairo_rectangle_int_t     rectangle;
diff --git a/app/display/gimpcanvasprogress.c b/app/display/gimpcanvasprogress.c
index 6798055..adf52b5 100644
--- a/app/display/gimpcanvasprogress.c
+++ b/app/display/gimpcanvasprogress.c
@@ -82,10 +82,8 @@ static void             gimp_canvas_progress_get_property (GObject          *obj
                                                            GValue           *value,
                                                            GParamSpec       *pspec);
 static void             gimp_canvas_progress_draw         (GimpCanvasItem   *item,
-                                                           GimpDisplayShell *shell,
                                                            cairo_t          *cr);
-static cairo_region_t * gimp_canvas_progress_get_extents  (GimpCanvasItem   *item,
-                                                           GimpDisplayShell *shell);
+static cairo_region_t * gimp_canvas_progress_get_extents  (GimpCanvasItem   *item);
 
 static GimpProgress   * gimp_canvas_progress_start        (GimpProgress      *progress,
                                                            const gchar       *message,
@@ -267,9 +265,8 @@ gimp_canvas_progress_transform (GimpCanvasItem *item,
 }
 
 static void
-gimp_canvas_progress_draw (GimpCanvasItem   *item,
-                           GimpDisplayShell *shell,
-                           cairo_t          *cr)
+gimp_canvas_progress_draw (GimpCanvasItem *item,
+                           cairo_t        *cr)
 {
   GimpCanvasProgressPrivate *private = GET_PRIVATE (item);
   GtkWidget                 *canvas  = gimp_canvas_item_get_canvas (item);
@@ -307,8 +304,7 @@ gimp_canvas_progress_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_progress_get_extents (GimpCanvasItem   *item,
-                                  GimpDisplayShell *shell)
+gimp_canvas_progress_get_extents (GimpCanvasItem *item)
 {
   cairo_rectangle_int_t rectangle;
   gdouble               x, y;
diff --git a/app/display/gimpcanvasrectangle.c b/app/display/gimpcanvasrectangle.c
index 5000e6d..89c3628 100644
--- a/app/display/gimpcanvasrectangle.c
+++ b/app/display/gimpcanvasrectangle.c
@@ -62,19 +62,17 @@ struct _GimpCanvasRectanglePrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_rectangle_set_property (GObject          *object,
-                                                            guint             property_id,
-                                                            const GValue     *value,
-                                                            GParamSpec       *pspec);
-static void             gimp_canvas_rectangle_get_property (GObject          *object,
-                                                            guint             property_id,
-                                                            GValue           *value,
-                                                            GParamSpec       *pspec);
-static void             gimp_canvas_rectangle_draw         (GimpCanvasItem   *item,
-                                                            GimpDisplayShell *shell,
-                                                            cairo_t          *cr);
-static cairo_region_t * gimp_canvas_rectangle_get_extents  (GimpCanvasItem   *item,
-                                                            GimpDisplayShell *shell);
+static void             gimp_canvas_rectangle_set_property (GObject        *object,
+                                                            guint           property_id,
+                                                            const GValue   *value,
+                                                            GParamSpec     *pspec);
+static void             gimp_canvas_rectangle_get_property (GObject        *object,
+                                                            guint           property_id,
+                                                            GValue         *value,
+                                                            GParamSpec     *pspec);
+static void             gimp_canvas_rectangle_draw         (GimpCanvasItem *item,
+                                                            cairo_t        *cr);
+static cairo_region_t * gimp_canvas_rectangle_get_extents  (GimpCanvasItem *item);
 
 
 G_DEFINE_TYPE (GimpCanvasRectangle, gimp_canvas_rectangle,
@@ -245,9 +243,8 @@ gimp_canvas_rectangle_transform (GimpCanvasItem *item,
 }
 
 static void
-gimp_canvas_rectangle_draw (GimpCanvasItem   *item,
-                            GimpDisplayShell *shell,
-                            cairo_t          *cr)
+gimp_canvas_rectangle_draw (GimpCanvasItem *item,
+                            cairo_t        *cr)
 {
   GimpCanvasRectanglePrivate *private = GET_PRIVATE (item);
   gdouble                     x, y;
@@ -264,8 +261,7 @@ gimp_canvas_rectangle_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_rectangle_get_extents (GimpCanvasItem   *item,
-                                   GimpDisplayShell *shell)
+gimp_canvas_rectangle_get_extents (GimpCanvasItem *item)
 {
   GimpCanvasRectanglePrivate *private = GET_PRIVATE (item);
   cairo_rectangle_int_t       rectangle;
diff --git a/app/display/gimpcanvasrectangleguides.c b/app/display/gimpcanvasrectangleguides.c
index cca5ac6..fcae861 100644
--- a/app/display/gimpcanvasrectangleguides.c
+++ b/app/display/gimpcanvasrectangleguides.c
@@ -67,19 +67,17 @@ struct _GimpCanvasRectangleGuidesPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_rectangle_guides_set_property (GObject          *object,
-                                                                   guint             property_id,
-                                                                   const GValue     *value,
-                                                                   GParamSpec       *pspec);
-static void             gimp_canvas_rectangle_guides_get_property (GObject          *object,
-                                                                   guint             property_id,
-                                                                   GValue           *value,
-                                                                   GParamSpec       *pspec);
-static void             gimp_canvas_rectangle_guides_draw         (GimpCanvasItem   *item,
-                                                                   GimpDisplayShell *shell,
-                                                                   cairo_t          *cr);
-static cairo_region_t * gimp_canvas_rectangle_guides_get_extents  (GimpCanvasItem   *item,
-                                                                   GimpDisplayShell *shell);
+static void             gimp_canvas_rectangle_guides_set_property (GObject        *object,
+                                                                   guint           property_id,
+                                                                   const GValue   *value,
+                                                                   GParamSpec     *pspec);
+static void             gimp_canvas_rectangle_guides_get_property (GObject        *object,
+                                                                   guint           property_id,
+                                                                   GValue         *value,
+                                                                   GParamSpec     *pspec);
+static void             gimp_canvas_rectangle_guides_draw         (GimpCanvasItem *item,
+                                                                   cairo_t        *cr);
+static cairo_region_t * gimp_canvas_rectangle_guides_get_extents  (GimpCanvasItem *item);
 
 
 G_DEFINE_TYPE (GimpCanvasRectangleGuides, gimp_canvas_rectangle_guides,
@@ -269,9 +267,8 @@ draw_vline (cairo_t *cr,
 }
 
 static void
-gimp_canvas_rectangle_guides_draw (GimpCanvasItem   *item,
-                                   GimpDisplayShell *shell,
-                                   cairo_t          *cr)
+gimp_canvas_rectangle_guides_draw (GimpCanvasItem *item,
+                                   cairo_t        *cr)
 {
   GimpCanvasRectangleGuidesPrivate *private = GET_PRIVATE (item);
   gdouble                           x1, y1;
@@ -358,8 +355,7 @@ gimp_canvas_rectangle_guides_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_rectangle_guides_get_extents (GimpCanvasItem   *item,
-                                          GimpDisplayShell *shell)
+gimp_canvas_rectangle_guides_get_extents (GimpCanvasItem *item)
 {
   GimpCanvasRectangleGuidesPrivate *private = GET_PRIVATE (item);
 
diff --git a/app/display/gimpcanvassamplepoint.c b/app/display/gimpcanvassamplepoint.c
index 7682c90..3490063 100644
--- a/app/display/gimpcanvassamplepoint.c
+++ b/app/display/gimpcanvassamplepoint.c
@@ -65,25 +65,21 @@ struct _GimpCanvasSamplePointPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_sample_point_set_property (GObject          *object,
-                                                               guint             property_id,
-                                                               const GValue     *value,
-                                                               GParamSpec       *pspec);
-static void             gimp_canvas_sample_point_get_property (GObject          *object,
-                                                               guint             property_id,
-                                                               GValue           *value,
-                                                               GParamSpec       *pspec);
-static void             gimp_canvas_sample_point_draw         (GimpCanvasItem   *item,
-                                                               GimpDisplayShell *shell,
-                                                               cairo_t          *cr);
-static cairo_region_t * gimp_canvas_sample_point_get_extents  (GimpCanvasItem   *item,
-                                                               GimpDisplayShell *shell);
-static void             gimp_canvas_sample_point_stroke       (GimpCanvasItem   *item,
-                                                               GimpDisplayShell *shell,
-                                                               cairo_t          *cr);
-static void             gimp_canvas_sample_point_fill         (GimpCanvasItem   *item,
-                                                               GimpDisplayShell *shell,
-                                                               cairo_t          *cr);
+static void             gimp_canvas_sample_point_set_property (GObject        *object,
+                                                               guint           property_id,
+                                                               const GValue   *value,
+                                                               GParamSpec     *pspec);
+static void             gimp_canvas_sample_point_get_property (GObject        *object,
+                                                               guint           property_id,
+                                                               GValue         *value,
+                                                               GParamSpec     *pspec);
+static void             gimp_canvas_sample_point_draw         (GimpCanvasItem *item,
+                                                               cairo_t        *cr);
+static cairo_region_t * gimp_canvas_sample_point_get_extents  (GimpCanvasItem *item);
+static void             gimp_canvas_sample_point_stroke       (GimpCanvasItem *item,
+                                                               cairo_t        *cr);
+static void             gimp_canvas_sample_point_fill         (GimpCanvasItem *item,
+                                                               cairo_t        *cr);
 
 
 G_DEFINE_TYPE (GimpCanvasSamplePoint, gimp_canvas_sample_point,
@@ -214,9 +210,8 @@ gimp_canvas_sample_point_transform (GimpCanvasItem *item,
 #define HALF_SIZE (GIMP_SAMPLE_POINT_DRAW_SIZE / 2)
 
 static void
-gimp_canvas_sample_point_draw (GimpCanvasItem   *item,
-                               GimpDisplayShell *shell,
-                               cairo_t          *cr)
+gimp_canvas_sample_point_draw (GimpCanvasItem *item,
+                               cairo_t        *cr)
 {
   GimpCanvasSamplePointPrivate *private = GET_PRIVATE (item);
   GtkWidget                    *canvas  = gimp_canvas_item_get_canvas (item);
@@ -257,8 +252,7 @@ gimp_canvas_sample_point_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_sample_point_get_extents (GimpCanvasItem   *item,
-                                      GimpDisplayShell *shell)
+gimp_canvas_sample_point_get_extents (GimpCanvasItem *item)
 {
   cairo_rectangle_int_t rectangle;
   gdouble               x, y;
@@ -284,9 +278,8 @@ gimp_canvas_sample_point_get_extents (GimpCanvasItem   *item,
 }
 
 static void
-gimp_canvas_sample_point_stroke (GimpCanvasItem   *item,
-                                 GimpDisplayShell *shell,
-                                 cairo_t          *cr)
+gimp_canvas_sample_point_stroke (GimpCanvasItem *item,
+                                 cairo_t        *cr)
 {
   GimpCanvasSamplePointPrivate *private = GET_PRIVATE (item);
 
@@ -298,14 +291,13 @@ gimp_canvas_sample_point_stroke (GimpCanvasItem   *item,
     }
   else
     {
-      GIMP_CANVAS_ITEM_CLASS (parent_class)->stroke (item, shell, cr);
+      GIMP_CANVAS_ITEM_CLASS (parent_class)->stroke (item, cr);
     }
 }
 
 static void
-gimp_canvas_sample_point_fill (GimpCanvasItem   *item,
-                               GimpDisplayShell *shell,
-                               cairo_t          *cr)
+gimp_canvas_sample_point_fill (GimpCanvasItem *item,
+                               cairo_t        *cr)
 {
   GimpCanvasSamplePointPrivate *private = GET_PRIVATE (item);
 
@@ -317,7 +309,7 @@ gimp_canvas_sample_point_fill (GimpCanvasItem   *item,
     }
   else
     {
-      GIMP_CANVAS_ITEM_CLASS (parent_class)->fill (item, shell, cr);
+      GIMP_CANVAS_ITEM_CLASS (parent_class)->fill (item, cr);
     }
 }
 
diff --git a/app/display/gimpcanvastextcursor.c b/app/display/gimpcanvastextcursor.c
index 8e02981..f27a956 100644
--- a/app/display/gimpcanvastextcursor.c
+++ b/app/display/gimpcanvastextcursor.c
@@ -62,19 +62,17 @@ struct _GimpCanvasTextCursorPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_text_cursor_set_property (GObject          *object,
-                                                              guint             property_id,
-                                                              const GValue     *value,
-                                                              GParamSpec       *pspec);
-static void             gimp_canvas_text_cursor_get_property (GObject          *object,
-                                                              guint             property_id,
-                                                              GValue           *value,
-                                                              GParamSpec       *pspec);
-static void             gimp_canvas_text_cursor_draw         (GimpCanvasItem   *item,
-                                                              GimpDisplayShell *shell,
-                                                              cairo_t          *cr);
-static cairo_region_t * gimp_canvas_text_cursor_get_extents  (GimpCanvasItem   *item,
-                                                              GimpDisplayShell *shell);
+static void             gimp_canvas_text_cursor_set_property (GObject        *object,
+                                                              guint           property_id,
+                                                              const GValue   *value,
+                                                              GParamSpec     *pspec);
+static void             gimp_canvas_text_cursor_get_property (GObject        *object,
+                                                              guint           property_id,
+                                                              GValue         *value,
+                                                              GParamSpec     *pspec);
+static void             gimp_canvas_text_cursor_draw         (GimpCanvasItem *item,
+                                                              cairo_t        *cr);
+static cairo_region_t * gimp_canvas_text_cursor_get_extents  (GimpCanvasItem *item);
 
 
 G_DEFINE_TYPE (GimpCanvasTextCursor, gimp_canvas_text_cursor,
@@ -237,9 +235,8 @@ gimp_canvas_text_cursor_transform (GimpCanvasItem *item,
 }
 
 static void
-gimp_canvas_text_cursor_draw (GimpCanvasItem   *item,
-                              GimpDisplayShell *shell,
-                              cairo_t          *cr)
+gimp_canvas_text_cursor_draw (GimpCanvasItem *item,
+                              cairo_t        *cr)
 {
   GimpCanvasTextCursorPrivate *private = GET_PRIVATE (item);
   gdouble                      x, y;
@@ -267,8 +264,7 @@ gimp_canvas_text_cursor_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_text_cursor_get_extents (GimpCanvasItem   *item,
-                                     GimpDisplayShell *shell)
+gimp_canvas_text_cursor_get_extents (GimpCanvasItem *item)
 {
   GimpCanvasTextCursorPrivate *private = GET_PRIVATE (item);
   cairo_rectangle_int_t        rectangle;
diff --git a/app/display/gimpcanvastransformguides.c b/app/display/gimpcanvastransformguides.c
index f2389e0..8a13fdf 100644
--- a/app/display/gimpcanvastransformguides.c
+++ b/app/display/gimpcanvastransformguides.c
@@ -70,19 +70,17 @@ struct _GimpCanvasTransformGuidesPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_transform_guides_set_property (GObject          *object,
-                                                                   guint             property_id,
-                                                                   const GValue     *value,
-                                                                   GParamSpec       *pspec);
-static void             gimp_canvas_transform_guides_get_property (GObject          *object,
-                                                                   guint             property_id,
-                                                                   GValue           *value,
-                                                                   GParamSpec       *pspec);
-static void             gimp_canvas_transform_guides_draw         (GimpCanvasItem   *item,
-                                                                   GimpDisplayShell *shell,
-                                                                   cairo_t          *cr);
-static cairo_region_t * gimp_canvas_transform_guides_get_extents  (GimpCanvasItem   *item,
-                                                                   GimpDisplayShell *shell);
+static void             gimp_canvas_transform_guides_set_property (GObject        *object,
+                                                                   guint           property_id,
+                                                                   const GValue   *value,
+                                                                   GParamSpec     *pspec);
+static void             gimp_canvas_transform_guides_get_property (GObject        *object,
+                                                                   guint           property_id,
+                                                                   GValue         *value,
+                                                                   GParamSpec     *pspec);
+static void             gimp_canvas_transform_guides_draw         (GimpCanvasItem *item,
+                                                                   cairo_t        *cr);
+static cairo_region_t * gimp_canvas_transform_guides_get_extents  (GimpCanvasItem *item);
 
 
 G_DEFINE_TYPE (GimpCanvasTransformGuides, gimp_canvas_transform_guides,
@@ -334,9 +332,8 @@ draw_vline (cairo_t        *cr,
 }
 
 static void
-gimp_canvas_transform_guides_draw (GimpCanvasItem   *item,
-                                   GimpDisplayShell *shell,
-                                   cairo_t          *cr)
+gimp_canvas_transform_guides_draw (GimpCanvasItem *item,
+                                   cairo_t        *cr)
 {
   GimpCanvasTransformGuidesPrivate *private = GET_PRIVATE (item);
   gdouble                           x1, y1;
@@ -523,8 +520,7 @@ gimp_canvas_transform_guides_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_transform_guides_get_extents (GimpCanvasItem   *item,
-                                          GimpDisplayShell *shell)
+gimp_canvas_transform_guides_get_extents (GimpCanvasItem *item)
 {
   gdouble               x1, y1;
   gdouble               x2, y2;
diff --git a/app/display/gimpcanvastransformpreview.c b/app/display/gimpcanvastransformpreview.c
index 517c09c..b209a27 100644
--- a/app/display/gimpcanvastransformpreview.c
+++ b/app/display/gimpcanvastransformpreview.c
@@ -82,20 +82,18 @@ struct _GimpCanvasTransformPreviewPrivate
 
 /*  local function prototypes  */
 
-static void             gimp_canvas_transform_preview_set_property (GObject          *object,
-                                                                    guint             property_id,
-                                                                    const GValue     *value,
-                                                                    GParamSpec       *pspec);
-static void             gimp_canvas_transform_preview_get_property (GObject          *object,
-                                                                    guint             property_id,
-                                                                    GValue           *value,
-                                                                    GParamSpec       *pspec);
-
-static void             gimp_canvas_transform_preview_draw         (GimpCanvasItem   *item,
-                                                                    GimpDisplayShell *shell,
-                                                                    cairo_t          *cr);
-static cairo_region_t * gimp_canvas_transform_preview_get_extents  (GimpCanvasItem   *item,
-                                                                    GimpDisplayShell *shell);
+static void             gimp_canvas_transform_preview_set_property (GObject        *object,
+                                                                    guint           property_id,
+                                                                    const GValue   *value,
+                                                                    GParamSpec     *pspec);
+static void             gimp_canvas_transform_preview_get_property (GObject        *object,
+                                                                    guint           property_id,
+                                                                    GValue         *value,
+                                                                    GParamSpec     *pspec);
+
+static void             gimp_canvas_transform_preview_draw         (GimpCanvasItem *item,
+                                                                    cairo_t        *cr);
+static cairo_region_t * gimp_canvas_transform_preview_get_extents  (GimpCanvasItem *item);
 
 static void   gimp_canvas_transform_preview_draw_quad         (GimpDrawable    *texture,
                                                                cairo_t         *cr,
@@ -403,9 +401,8 @@ gimp_canvas_transform_preview_transform (GimpCanvasItem        *item,
 }
 
 static void
-gimp_canvas_transform_preview_draw (GimpCanvasItem   *item,
-                                    GimpDisplayShell *shell,
-                                    cairo_t          *cr)
+gimp_canvas_transform_preview_draw (GimpCanvasItem *item,
+                                    cairo_t        *cr)
 {
   GimpCanvasTransformPreviewPrivate *private = GET_PRIVATE (item);
   GimpChannel                       *mask;
@@ -561,8 +558,7 @@ gimp_canvas_transform_preview_draw (GimpCanvasItem   *item,
 }
 
 static cairo_region_t *
-gimp_canvas_transform_preview_get_extents (GimpCanvasItem   *item,
-                                           GimpDisplayShell *shell)
+gimp_canvas_transform_preview_get_extents (GimpCanvasItem *item)
 {
   cairo_rectangle_int_t rectangle;
 



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