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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user