diff --git a/ChangeLog b/ChangeLog index 35a8e61546..8629ec48e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,34 @@ +2008-11-03 Michael Natterer + + * app/core/gimpitem.[ch]: renamed + gimp_item_offsets() to gimp_item_get_offset() and + gimp_item_set_offsets() to gimp_item_set_offset(). + + * app/actions/drawable-commands.c + * app/actions/layers-commands.c + * app/core/.c + * app/display/gimpdisplayshell-dnd.c + * app/display/gimpdisplayshell-preview.c + * app/display/gimpdisplayshell-transform.c + * app/display/gimpdisplayshell.c + * app/paint/gimppaintcore-stroke.c + * app/paint/gimppaintcore.c + * app/paint/gimpsourcecore.c + * app/text/gimptextlayer-xcf.c + * app/tools/.c + * app/widgets/gimptoolbox-dnd.c + * tools/pdbgen/pdb/drawable.pdb + * tools/pdbgen/pdb/drawable_transform.pdb + * tools/pdbgen/pdb/selection.pdb + * tools/pdbgen/pdb/transform_tools.pdb + * tools/pdbgen/pdb/vectors.pdb: changed accordingly. + + * app/pdb/drawable-cmds.c + * app/pdb/drawable-transform-cmds.c + * app/pdb/selection-cmds.c + * app/pdb/vectors-cmds.c + * app/pdb/transform-tools-cmds.c: regenerated. + 2008-11-02 Martin Nordholts * app/core/gimpitem.c (gimp_item_set_offsets): New function that diff --git a/app/actions/drawable-commands.c b/app/actions/drawable-commands.c index fdfd16fa59..c78fd7f956 100644 --- a/app/actions/drawable-commands.c +++ b/app/actions/drawable-commands.c @@ -210,7 +210,7 @@ drawable_flip_cmd_callback (GtkAction *action, item = GIMP_ITEM (drawable); - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); switch ((GimpOrientationType) value) { @@ -260,7 +260,7 @@ drawable_rotate_cmd_callback (GtkAction *action, item = GIMP_ITEM (drawable); - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); center_x = ((gdouble) off_x + (gdouble) gimp_item_width (item) / 2.0); center_y = ((gdouble) off_y + (gdouble) gimp_item_height (item) / 2.0); diff --git a/app/actions/layers-commands.c b/app/actions/layers-commands.c index 7c65753532..8f1d1e4000 100644 --- a/app/actions/layers-commands.c +++ b/app/actions/layers-commands.c @@ -300,7 +300,7 @@ layers_new_last_vals_cmd_callback (GtkAction *action, { GimpLayer *template = GIMP_LAYER (GIMP_ACTION (action)->viewable); - gimp_item_offsets (GIMP_ITEM (template), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (template), &off_x, &off_y); width = gimp_item_width (GIMP_ITEM (template)); height = gimp_item_height (GIMP_ITEM (template)); opacity = gimp_layer_get_opacity (template); @@ -515,7 +515,7 @@ layers_text_to_vectors_cmd_callback (GtkAction *action, vectors = gimp_text_vectors_new (image, GIMP_TEXT_LAYER (layer)->text); - gimp_item_offsets (GIMP_ITEM (layer), &x, &y); + gimp_item_get_offset (GIMP_ITEM (layer), &x, &y); gimp_item_translate (GIMP_ITEM (vectors), x, y, FALSE); gimp_image_add_vectors (image, vectors, -1, TRUE); @@ -641,7 +641,7 @@ layers_crop_cmd_callback (GtkAction *action, return; } - gimp_item_offsets (GIMP_ITEM (layer), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (layer), &off_x, &off_y); off_x -= x1; off_y -= y1; @@ -783,7 +783,7 @@ layers_mask_to_selection_cmd_callback (GtkAction *action, { gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (mask), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (mask), &off_x, &off_y); gimp_channel_select_channel (gimp_image_get_mask (image), _("Layer Mask to Selection"), diff --git a/app/core/gimp-edit.c b/app/core/gimp-edit.c index 7830a83b9f..dc3f40cbba 100644 --- a/app/core/gimp-edit.c +++ b/app/core/gimp-edit.c @@ -203,7 +203,7 @@ gimp_edit_paste (GimpImage *image, gint paste_width, paste_height; gboolean have_mask; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); have_mask = gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2); if (! have_mask && diff --git a/app/core/gimpchannel-select.c b/app/core/gimpchannel-select.c index a5bea2f24b..5fa9d152eb 100644 --- a/app/core/gimpchannel-select.c +++ b/app/core/gimpchannel-select.c @@ -429,7 +429,7 @@ gimp_channel_select_alpha (GimpChannel *channel, gimp_channel_all (add_on, FALSE); } - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); gimp_channel_select_channel (channel, _("Alpha to Selection"), add_on, off_x, off_y, @@ -515,7 +515,7 @@ gimp_channel_select_fuzzy (GimpChannel *channel, x, y); if (! sample_merged) - gimp_item_offsets (GIMP_ITEM (drawable), &add_on_x, &add_on_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &add_on_x, &add_on_y); gimp_channel_select_channel (channel, C_("command", "Fuzzy Select"), add_on, add_on_x, add_on_y, @@ -562,7 +562,7 @@ gimp_channel_select_by_color (GimpChannel *channel, color); if (! sample_merged) - gimp_item_offsets (GIMP_ITEM (drawable), &add_on_x, &add_on_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &add_on_x, &add_on_y); gimp_channel_select_channel (channel, C_("command", "Select by Color"), add_on, add_on_x, add_on_y, diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c index 4f0b008dc3..0fad3d7a48 100644 --- a/app/core/gimpchannel.c +++ b/app/core/gimpchannel.c @@ -721,7 +721,7 @@ gimp_channel_stroke (GimpItem *item, return FALSE; } - gimp_item_offsets (GIMP_ITEM (channel), &offset_x, &offset_y); + gimp_item_get_offset (GIMP_ITEM (channel), &offset_x, &offset_y); switch (stroke_options->method) { diff --git a/app/core/gimpdrawable-blend.c b/app/core/gimpdrawable-blend.c index b8d4e7a072..b33f27afea 100644 --- a/app/core/gimpdrawable-blend.c +++ b/app/core/gimpdrawable-blend.c @@ -592,7 +592,7 @@ gradient_precalc_shapeburst (GimpImage *image, gint offx, offy; gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2); - gimp_item_offsets (GIMP_ITEM (drawable), &offx, &offy); + gimp_item_get_offset (GIMP_ITEM (drawable), &offx, &offy); pixel_region_init (&maskR, gimp_drawable_get_tiles (GIMP_DRAWABLE (mask)), x1 + offx, y1 + offy, (x2 - x1), (y2 - y1), FALSE); diff --git a/app/core/gimpdrawable-bucket-fill.c b/app/core/gimpdrawable-bucket-fill.c index 68cf431079..b1ce11b7ba 100644 --- a/app/core/gimpdrawable-bucket-fill.c +++ b/app/core/gimpdrawable-bucket-fill.c @@ -200,7 +200,7 @@ gimp_drawable_bucket_fill_full (GimpDrawable *drawable, gint off_y = 0; if (! sample_merged) - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); gimp_channel_combine_mask (mask, gimp_image_get_mask (image), GIMP_CHANNEL_OP_INTERSECT, @@ -218,7 +218,7 @@ gimp_drawable_bucket_fill_full (GimpDrawable *drawable, item = GIMP_ITEM (drawable); /* Limit the channel bounds to the drawable's extents */ - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); x1 = CLAMP (x1, off_x, (off_x + gimp_item_width (item))); y1 = CLAMP (y1, off_y, (off_y + gimp_item_height (item))); diff --git a/app/core/gimpdrawable-combine.c b/app/core/gimpdrawable-combine.c index a35a16a40f..fa6ed395eb 100644 --- a/app/core/gimpdrawable-combine.c +++ b/app/core/gimpdrawable-combine.c @@ -79,7 +79,7 @@ gimp_drawable_real_apply_region (GimpDrawable *drawable, } /* get the layer offsets */ - gimp_item_offsets (item, &offset_x, &offset_y); + gimp_item_get_offset (item, &offset_x, &offset_y); /* make sure the image application coordinates are within drawable bounds */ x1 = CLAMP (x, 0, gimp_item_width (item)); @@ -228,7 +228,7 @@ gimp_drawable_real_replace_region (GimpDrawable *drawable, } /* get the layer offsets */ - gimp_item_offsets (item, &offset_x, &offset_y); + gimp_item_get_offset (item, &offset_x, &offset_y); /* make sure the image application coordinates are within drawable bounds */ x1 = CLAMP (x, 0, gimp_item_width (item)); diff --git a/app/core/gimpdrawable-foreground-extract.c b/app/core/gimpdrawable-foreground-extract.c index 8d5a033027..4e35d0791e 100644 --- a/app/core/gimpdrawable-foreground-extract.c +++ b/app/core/gimpdrawable-foreground-extract.c @@ -94,7 +94,7 @@ gimp_drawable_foreground_extract_siox_init (GimpDrawable *drawable, if (gimp_image_base_type (image) == GIMP_INDEXED) colormap = gimp_image_get_colormap (image); - gimp_item_offsets (GIMP_ITEM (drawable), &offset_x, &offset_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &offset_x, &offset_y); intersect = gimp_rectangle_intersect (offset_x, offset_y, gimp_item_width (GIMP_ITEM (drawable)), diff --git a/app/core/gimpdrawable-histogram.c b/app/core/gimpdrawable-histogram.c index 83bb8baa92..507db9974a 100644 --- a/app/core/gimpdrawable-histogram.c +++ b/app/core/gimpdrawable-histogram.c @@ -62,7 +62,7 @@ gimp_drawable_calculate_histogram (GimpDrawable *drawable, image = gimp_item_get_image (GIMP_ITEM (drawable)); sel_mask = gimp_image_get_mask (image); - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); pixel_region_init (&mask, gimp_drawable_get_tiles (GIMP_DRAWABLE (sel_mask)), x1 + off_x, y1 + off_y, (x2 - x1), (y2 - y1), FALSE); diff --git a/app/core/gimpdrawable-stroke.c b/app/core/gimpdrawable-stroke.c index 0baedca1ad..3edf8e868e 100644 --- a/app/core/gimpdrawable-stroke.c +++ b/app/core/gimpdrawable-stroke.c @@ -379,7 +379,7 @@ gimp_drawable_stroke_scan_convert (GimpDrawable *drawable, color_region (&maskPR, bg); /* render the stroke into it */ - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); gimp_scan_convert_render (scan_convert, mask, x + off_x, y + off_y, diff --git a/app/core/gimpdrawable.c b/app/core/gimpdrawable.c index c768b869d2..3717a8d972 100644 --- a/app/core/gimpdrawable.c +++ b/app/core/gimpdrawable.c @@ -555,7 +555,7 @@ gimp_drawable_flip (GimpItem *item, gint off_x, off_y; gint old_off_x, old_off_y; - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); tile_manager_get_offsets (gimp_drawable_get_tiles (drawable), &old_off_x, &old_off_y); @@ -590,7 +590,7 @@ gimp_drawable_rotate (GimpItem *item, gint off_x, off_y; gint old_off_x, old_off_y; - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); tile_manager_get_offsets (gimp_drawable_get_tiles (drawable), &old_off_x, &old_off_y); @@ -627,7 +627,7 @@ gimp_drawable_transform (GimpItem *item, gint off_x, off_y; gint old_off_x, old_off_y; - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); tile_manager_get_offsets (gimp_drawable_get_tiles (drawable), &old_off_x, &old_off_y); @@ -1057,7 +1057,7 @@ gimp_drawable_set_tiles (GimpDrawable *drawable, if (! gimp_item_is_attached (GIMP_ITEM (drawable))) push_undo = FALSE; - gimp_item_offsets (GIMP_ITEM (drawable), &offset_x, &offset_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &offset_x, &offset_y); gimp_drawable_set_tiles_full (drawable, push_undo, undo_desc, tiles, gimp_drawable_type (drawable), @@ -1340,7 +1340,7 @@ gimp_drawable_mask_bounds (GimpDrawable *drawable, { gint off_x, off_y; - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); tmp_x1 = CLAMP (tmp_x1 - off_x, 0, gimp_item_width (item)); tmp_y1 = CLAMP (tmp_y1 - off_y, 0, gimp_item_height (item)); @@ -1395,7 +1395,7 @@ gimp_drawable_mask_intersect (GimpDrawable *drawable, { gint off_x, off_y; - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); retval = gimp_rectangle_intersect (tmp_x - off_x, tmp_y - off_y, tmp_width - tmp_x, tmp_height - tmp_y, diff --git a/app/core/gimpdrawablestack.c b/app/core/gimpdrawablestack.c index 98ee8f363f..198e00e57a 100644 --- a/app/core/gimpdrawablestack.c +++ b/app/core/gimpdrawablestack.c @@ -396,7 +396,7 @@ gimp_drawable_stack_drawable_update (GimpItem *item, gint offset_x; gint offset_y; - gimp_item_offsets (item, &offset_x, &offset_y); + gimp_item_get_offset (item, &offset_x, &offset_y); gimp_drawable_stack_update (stack, x + offset_x, y + offset_y, @@ -411,7 +411,7 @@ gimp_drawable_stack_drawable_visible (GimpItem *item, gint offset_x; gint offset_y; - gimp_item_offsets (item, &offset_x, &offset_y); + gimp_item_get_offset (item, &offset_x, &offset_y); gimp_drawable_stack_update (stack, offset_x, offset_y, diff --git a/app/core/gimpimage-arrange.c b/app/core/gimpimage-arrange.c index 7088e26a8a..fb14f0def2 100644 --- a/app/core/gimpimage-arrange.c +++ b/app/core/gimpimage-arrange.c @@ -259,7 +259,7 @@ compute_offset (GObject *object, /* fall back on using the offsets instead */ GimpItem *item = GIMP_ITEM (object); - gimp_item_offsets (item, &object_offset_x, &object_offset_y); + gimp_item_get_offset (item, &object_offset_x, &object_offset_y); object_height = gimp_item_height (item); object_width = gimp_item_width (item); } @@ -293,7 +293,7 @@ compute_offset (GObject *object, } else { - gimp_item_offsets (item, &object_offset_x, &object_offset_y); + gimp_item_get_offset (item, &object_offset_x, &object_offset_y); object_height = gimp_item_height (item); object_width = gimp_item_width (item); } diff --git a/app/core/gimpimage-convert.c b/app/core/gimpimage-convert.c index a713d879d7..05bcbc06f6 100644 --- a/app/core/gimpimage-convert.c +++ b/app/core/gimpimage-convert.c @@ -1173,7 +1173,7 @@ generate_histogram_rgb (CFHistogram histogram, gint count = 0; gboolean has_alpha = gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)); - gimp_item_offsets (GIMP_ITEM (layer), &offsetx, &offsety); + gimp_item_get_offset (GIMP_ITEM (layer), &offsetx, &offsety); /* g_printerr ("col_limit = %d, nfc = %d\n", col_limit, num_found_cols); */ @@ -2770,7 +2770,7 @@ median_cut_pass2_no_dither_gray (QuantizeObj *quantobj, gint offsetx, offsety; gpointer pr; - gimp_item_offsets (GIMP_ITEM (layer), &offsetx, &offsety); + gimp_item_get_offset (GIMP_ITEM (layer), &offsetx, &offsety); has_alpha = gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)); @@ -2867,7 +2867,7 @@ median_cut_pass2_fixed_dither_gray (QuantizeObj *quantobj, gint offsetx, offsety; gpointer pr; - gimp_item_offsets (GIMP_ITEM (layer), &offsetx, &offsety); + gimp_item_get_offset (GIMP_ITEM (layer), &offsetx, &offsety); has_alpha = gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)); @@ -3018,7 +3018,7 @@ median_cut_pass2_no_dither_rgb (QuantizeObj *quantobj, gint nth_layer = quantobj->nth_layer; gint n_layers = quantobj->n_layers; - gimp_item_offsets (GIMP_ITEM (layer), &offsetx, &offsety); + gimp_item_get_offset (GIMP_ITEM (layer), &offsetx, &offsety); /* In the case of web/mono palettes, we actually force * grayscale drawables through the rgb pass2 functions @@ -3143,7 +3143,7 @@ median_cut_pass2_fixed_dither_rgb (QuantizeObj *quantobj, gint nth_layer = quantobj->nth_layer; gint n_layers = quantobj->n_layers; - gimp_item_offsets (GIMP_ITEM (layer), &offsetx, &offsety); + gimp_item_get_offset (GIMP_ITEM (layer), &offsetx, &offsety); /* In the case of web/mono palettes, we actually force * grayscale drawables through the rgb pass2 functions @@ -3346,7 +3346,7 @@ median_cut_pass2_nodestruct_dither_rgb (QuantizeObj *quantobj, gint lastblue = -1; gint offsetx, offsety; - gimp_item_offsets (GIMP_ITEM (layer), &offsetx, &offsety); + gimp_item_get_offset (GIMP_ITEM (layer), &offsetx, &offsety); has_alpha = gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)); @@ -3560,7 +3560,7 @@ median_cut_pass2_fs_dither_gray (QuantizeObj *quantobj, gint width, height; gulong *index_used_count = quantobj->index_used_count; - gimp_item_offsets (GIMP_ITEM (layer), &offsetx, &offsety); + gimp_item_get_offset (GIMP_ITEM (layer), &offsetx, &offsety); has_alpha = gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)); @@ -3820,7 +3820,7 @@ median_cut_pass2_fs_dither_rgb (QuantizeObj *quantobj, gint nth_layer = quantobj->nth_layer; gint n_layers = quantobj->n_layers; - gimp_item_offsets (GIMP_ITEM (layer), &offsetx, &offsety); + gimp_item_get_offset (GIMP_ITEM (layer), &offsetx, &offsety); /* In the case of web/mono palettes, we actually force * grayscale drawables through the rgb pass2 functions diff --git a/app/core/gimpimage-crop.c b/app/core/gimpimage-crop.c index 9e75c26c13..33fdc0f292 100644 --- a/app/core/gimpimage-crop.c +++ b/app/core/gimpimage-crop.c @@ -110,7 +110,7 @@ gimp_image_crop (GimpImage *image, layer = gimp_image_get_active_layer (image); - gimp_item_offsets (GIMP_ITEM (layer), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (layer), &off_x, &off_y); off_x -= x1; off_y -= y1; @@ -185,7 +185,7 @@ gimp_image_crop (GimpImage *image, gint off_x, off_y; gint lx1, ly1, lx2, ly2; - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); lx1 = CLAMP (off_x, 0, gimp_image_get_width (image)); ly1 = CLAMP (off_y, 0, gimp_image_get_height (image)); diff --git a/app/core/gimpimage-merge.c b/app/core/gimpimage-merge.c index 1a321ce2ee..a06e940cdc 100644 --- a/app/core/gimpimage-merge.c +++ b/app/core/gimpimage-merge.c @@ -344,7 +344,7 @@ gimp_image_merge_layers (GimpImage *image, { layer = merge_list->data; - gimp_item_offsets (GIMP_ITEM (layer), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (layer), &off_x, &off_y); switch (merge_type) { @@ -525,7 +525,7 @@ gimp_image_merge_layers (GimpImage *image, return NULL; } - gimp_item_offsets (GIMP_ITEM (layer), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (layer), &off_x, &off_y); x3 = CLAMP (off_x, x1, x2); y3 = CLAMP (off_y, y1, y2); diff --git a/app/core/gimpimage-pick-color.c b/app/core/gimpimage-pick-color.c index 1f750cf788..bbaacc1448 100644 --- a/app/core/gimpimage-pick-color.c +++ b/app/core/gimpimage-pick-color.c @@ -65,7 +65,7 @@ gimp_image_pick_color (GimpImage *image, { gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x -= off_x; y -= off_y; diff --git a/app/core/gimpimage-resize.c b/app/core/gimpimage-resize.c index 5705c00b45..9ab20a851b 100644 --- a/app/core/gimpimage-resize.c +++ b/app/core/gimpimage-resize.c @@ -154,7 +154,7 @@ gimp_image_resize_with_layers (GimpImage *image, gint old_offset_x; gint old_offset_y; - gimp_item_offsets (item, &old_offset_x, &old_offset_y); + gimp_item_get_offset (item, &old_offset_x, &old_offset_y); gimp_item_translate (item, offset_x, offset_y, TRUE); diff --git a/app/core/gimpimage-rotate.c b/app/core/gimpimage-rotate.c index a8ede35a23..61b3ced56a 100644 --- a/app/core/gimpimage-rotate.c +++ b/app/core/gimpimage-rotate.c @@ -175,7 +175,7 @@ gimp_image_rotate (GimpImage *image, gint off_x; gint off_y; - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); gimp_item_rotate (item, context, rotate_type, center_x, center_y, FALSE); @@ -256,7 +256,7 @@ gimp_image_rotate_item_offset (GimpImage *image, return; } - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); x -= off_x; y -= off_y; diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c index 930cb5f7b4..2402de2eda 100644 --- a/app/core/gimpimage.c +++ b/app/core/gimpimage.c @@ -3065,7 +3065,7 @@ gimp_image_add_layers (GimpImage *image, GimpItem *item = GIMP_ITEM (list->data); gint off_x, off_y; - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); layers_x = MIN (layers_x, off_x); layers_y = MIN (layers_y, off_y); @@ -3687,7 +3687,7 @@ gimp_image_pick_correlate_layer (const GimpImage *image, GimpLayer *layer = list->data; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (layer), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (layer), &off_x, &off_y); if (gimp_pickable_get_opacity_at (GIMP_PICKABLE (layer), x - off_x, y - off_y) > 63) @@ -3729,7 +3729,7 @@ gimp_image_coords_in_active_pickable (GimpImage *image, gint off_x, off_y; gint d_x, d_y; - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); d_x = x - off_x; d_y = y - off_y; diff --git a/app/core/gimpitem.c b/app/core/gimpitem.c index 4fa8831412..4bbf6c8d43 100644 --- a/app/core/gimpitem.c +++ b/app/core/gimpitem.c @@ -693,7 +693,7 @@ gimp_item_height (const GimpItem *item) } /** - * gimp_item_offsets: + * gimp_item_get_offsets: * @item: The #GimpItem to check. * @offset_x: Return location for the item's X offset. * @offset_y: Return location for the item's Y offset. @@ -701,9 +701,9 @@ gimp_item_height (const GimpItem *item) * Reveals the X and Y offsets of the item. */ void -gimp_item_offsets (const GimpItem *item, - gint *offset_x, - gint *offset_y) +gimp_item_get_offset (const GimpItem *item, + gint *offset_x, + gint *offset_y) { g_return_if_fail (GIMP_IS_ITEM (item)); @@ -712,9 +712,9 @@ gimp_item_offsets (const GimpItem *item, } void -gimp_item_set_offsets (GimpItem *item, - gint offset_x, - gint offset_y) +gimp_item_set_offset (GimpItem *item, + gint offset_x, + gint offset_y) { g_return_if_fail (GIMP_IS_ITEM (item)); diff --git a/app/core/gimpitem.h b/app/core/gimpitem.h index 5817a62d98..ecb356ae56 100644 --- a/app/core/gimpitem.h +++ b/app/core/gimpitem.h @@ -159,10 +159,11 @@ gboolean gimp_item_rename (GimpItem *item, gint gimp_item_width (const GimpItem *item); gint gimp_item_height (const GimpItem *item); -void gimp_item_offsets (const GimpItem *item, + +void gimp_item_get_offset (const GimpItem *item, gint *offset_x, gint *offset_y); -void gimp_item_set_offsets (GimpItem *item, +void gimp_item_set_offset (GimpItem *item, gint offset_x, gint offset_y); diff --git a/app/core/gimpitempropundo.c b/app/core/gimpitempropundo.c index c90a491e26..ecf11b7f10 100644 --- a/app/core/gimpitempropundo.c +++ b/app/core/gimpitempropundo.c @@ -115,9 +115,9 @@ gimp_item_prop_undo_constructor (GType type, break; case GIMP_UNDO_ITEM_DISPLACE: - gimp_item_offsets (item, - &item_prop_undo->offset_x, - &item_prop_undo->offset_y); + gimp_item_get_offset (item, + &item_prop_undo->offset_x, + &item_prop_undo->offset_y); break; case GIMP_UNDO_ITEM_VISIBILITY: @@ -225,7 +225,7 @@ gimp_item_prop_undo_pop (GimpUndo *undo, gint offset_x; gint offset_y; - gimp_item_offsets (item, &offset_x, &offset_y); + gimp_item_get_offset (item, &offset_x, &offset_y); gimp_item_translate (item, item_prop_undo->offset_x - offset_x, diff --git a/app/core/gimplayer-floating-sel.c b/app/core/gimplayer-floating-sel.c index 52f3ec04c8..a4ab62c7b0 100644 --- a/app/core/gimplayer-floating-sel.c +++ b/app/core/gimplayer-floating-sel.c @@ -278,7 +278,7 @@ floating_sel_store (GimpLayer *layer, * drawable that this floating selection obscures. We do this so * that it will be possible to subsequently restore the drawable's area */ - gimp_item_offsets (GIMP_ITEM (layer->fs.drawable), &offx, &offy); + gimp_item_get_offset (GIMP_ITEM (layer->fs.drawable), &offx, &offy); /* Find the minimum area we need to uncover -- in image space */ x1 = MAX (GIMP_ITEM (layer)->offset_x, offx); @@ -328,7 +328,7 @@ floating_sel_restore (GimpLayer *layer, */ /* Find the minimum area we need to uncover -- in image space */ - gimp_item_offsets (GIMP_ITEM (layer->fs.drawable), &offx, &offy); + gimp_item_get_offset (GIMP_ITEM (layer->fs.drawable), &offx, &offy); x1 = MAX (GIMP_ITEM (layer)->offset_x, offx); y1 = MAX (GIMP_ITEM (layer)->offset_y, offy); @@ -437,7 +437,7 @@ floating_sel_composite (GimpLayer *layer, gint x1, y1, x2, y2; /* Find the minimum area we need to composite -- in image space */ - gimp_item_offsets (GIMP_ITEM (layer->fs.drawable), &offx, &offy); + gimp_item_get_offset (GIMP_ITEM (layer->fs.drawable), &offx, &offy); x1 = MAX (GIMP_ITEM (layer)->offset_x, offx); y1 = MAX (GIMP_ITEM (layer)->offset_y, offy); @@ -514,7 +514,7 @@ floating_sel_boundary (GimpLayer *layer, width = gimp_item_width (GIMP_ITEM (layer)); height = gimp_item_height (GIMP_ITEM (layer)); - gimp_item_offsets (GIMP_ITEM (layer), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (layer), &off_x, &off_y); if (layer->fs.segs) g_free (layer->fs.segs); diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c index 26fb9f98df..677bbc1385 100644 --- a/app/core/gimplayer.c +++ b/app/core/gimplayer.c @@ -1825,7 +1825,7 @@ gimp_layer_resize_to_image (GimpLayer *layer, gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_ITEM_RESIZE, _("Layer to Image Size")); - gimp_item_offsets (GIMP_ITEM (layer), &offset_x, &offset_y); + gimp_item_get_offset (GIMP_ITEM (layer), &offset_x, &offset_y); gimp_item_resize (GIMP_ITEM (layer), context, gimp_image_get_width (image), gimp_image_get_height (image), diff --git a/app/core/gimppalette-import.c b/app/core/gimppalette-import.c index 8a0ac3e84c..62878fd0ef 100644 --- a/app/core/gimppalette-import.c +++ b/app/core/gimppalette-import.c @@ -473,7 +473,7 @@ gimp_palette_import_from_drawable (GimpDrawable *drawable, height = gimp_item_height (GIMP_ITEM (drawable)); } - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); colors = gimp_palette_import_extract (gimp_item_get_image (GIMP_ITEM (drawable)), diff --git a/app/core/gimpprojection-construct.c b/app/core/gimpprojection-construct.c index c1ea78a93b..6746d38aae 100644 --- a/app/core/gimpprojection-construct.c +++ b/app/core/gimpprojection-construct.c @@ -117,7 +117,7 @@ gimp_projection_construct (GimpProjection *proj, gint xoff; gint yoff; - gimp_item_offsets (GIMP_ITEM (layer), &xoff, &yoff); + gimp_item_get_offset (GIMP_ITEM (layer), &xoff, &yoff); if (xoff == 0 && yoff == 0) { @@ -239,7 +239,7 @@ gimp_projection_construct_layers (GimpProjection *proj, layer = list->data; mask = gimp_layer_get_mask (layer); - gimp_item_offsets (GIMP_ITEM (layer), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (layer), &off_x, &off_y); x1 = CLAMP (off_x, x, x + w); y1 = CLAMP (off_y, y, y + h); @@ -393,7 +393,7 @@ gimp_projection_initialize (GimpProjection *proj, GimpItem *item = list->data; gint off_x, off_y; - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); if (gimp_item_get_visible (item) && ! gimp_drawable_has_alpha (GIMP_DRAWABLE (item)) && diff --git a/app/core/gimpselection.c b/app/core/gimpselection.c index 5cd03fc833..bfce63c4c6 100644 --- a/app/core/gimpselection.c +++ b/app/core/gimpselection.c @@ -376,7 +376,7 @@ gimp_selection_boundary (GimpChannel *channel, gint x2, y2; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (layer), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (layer), &off_x, &off_y); x1 = CLAMP (off_x, 0, gimp_image_get_width (image)); y1 = CLAMP (off_y, 0, gimp_image_get_height (image)); @@ -717,7 +717,7 @@ gimp_selection_extract (GimpChannel *selection, gimp_drawable_push_undo (GIMP_DRAWABLE (pickable), NULL, x1, y1, x2, y2, NULL, FALSE); - gimp_item_offsets (GIMP_ITEM (pickable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (pickable), &off_x, &off_y); colormap = gimp_drawable_get_colormap (GIMP_DRAWABLE (pickable)); } else diff --git a/app/display/gimpdisplayshell-dnd.c b/app/display/gimpdisplayshell-dnd.c index 1d60091e12..072b4d698d 100644 --- a/app/display/gimpdisplayshell-dnd.c +++ b/app/display/gimpdisplayshell-dnd.c @@ -171,7 +171,7 @@ gimp_display_shell_dnd_position_item (GimpDisplayShell *shell, gimp_display_shell_untransform_viewport (shell, &x, &y, &width, &height); - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); off_x = x + (width - gimp_item_width (item)) / 2 - off_x; off_y = y + (height - gimp_item_height (item)) / 2 - off_y; diff --git a/app/display/gimpdisplayshell-preview.c b/app/display/gimpdisplayshell-preview.c index c5d43ae3eb..e36af6645c 100644 --- a/app/display/gimpdisplayshell-preview.c +++ b/app/display/gimpdisplayshell-preview.c @@ -207,7 +207,7 @@ gimp_display_shell_preview_transform (GimpDisplayShell *shell) { mask = gimp_image_get_mask (shell->display->image); - gimp_item_offsets (GIMP_ITEM (tool->drawable), + gimp_item_get_offset (GIMP_ITEM (tool->drawable), &mask_offx, &mask_offy); } diff --git a/app/display/gimpdisplayshell-transform.c b/app/display/gimpdisplayshell-transform.c index d2976f0abd..53808b8b17 100644 --- a/app/display/gimpdisplayshell-transform.c +++ b/app/display/gimpdisplayshell-transform.c @@ -128,7 +128,7 @@ gimp_display_shell_transform_xy (const GimpDisplayShell *shell, GimpItem *item; item = GIMP_ITEM (gimp_image_get_active_drawable (shell->display->image)); - gimp_item_offsets (item, &offset_x, &offset_y); + gimp_item_get_offset (item, &offset_x, &offset_y); x += offset_x; y += offset_y; @@ -190,7 +190,7 @@ gimp_display_shell_untransform_xy (const GimpDisplayShell *shell, GimpItem *item; item = GIMP_ITEM (gimp_image_get_active_drawable (shell->display->image)); - gimp_item_offsets (item, &offset_x, &offset_y); + gimp_item_get_offset (item, &offset_x, &offset_y); } gimp_display_shell_scroll_get_scaled_viewport_offset (shell, @@ -247,7 +247,7 @@ gimp_display_shell_transform_xy_f (const GimpDisplayShell *shell, GimpItem *item; item = GIMP_ITEM (gimp_image_get_active_drawable (shell->display->image)); - gimp_item_offsets (item, &offset_x, &offset_y); + gimp_item_get_offset (item, &offset_x, &offset_y); } gimp_display_shell_scroll_get_scaled_viewport_offset (shell, @@ -294,7 +294,7 @@ gimp_display_shell_untransform_xy_f (const GimpDisplayShell *shell, GimpItem *item; item = GIMP_ITEM (gimp_image_get_active_drawable (shell->display->image)); - gimp_item_offsets (item, &offset_x, &offset_y); + gimp_item_get_offset (item, &offset_x, &offset_y); } gimp_display_shell_scroll_get_scaled_viewport_offset (shell, @@ -335,7 +335,7 @@ gimp_display_shell_transform_points (const GimpDisplayShell *shell, GimpItem *item; item = GIMP_ITEM (gimp_image_get_active_drawable (shell->display->image)); - gimp_item_offsets (item, &offset_x, &offset_y); + gimp_item_get_offset (item, &offset_x, &offset_y); } for (i = 0; i < n_points ; i++) @@ -389,7 +389,7 @@ gimp_display_shell_transform_coords (const GimpDisplayShell *shell, GimpItem *item; item = GIMP_ITEM (gimp_image_get_active_drawable (shell->display->image)); - gimp_item_offsets (item, &offset_x, &offset_y); + gimp_item_get_offset (item, &offset_x, &offset_y); } for (i = 0; i < n_coords ; i++) @@ -443,7 +443,7 @@ gimp_display_shell_transform_segments (const GimpDisplayShell *shell, GimpItem *item; item = GIMP_ITEM (gimp_image_get_active_drawable (shell->display->image)); - gimp_item_offsets (item, &offset_x, &offset_y); + gimp_item_get_offset (item, &offset_x, &offset_y); } for (i = 0; i < n_segs ; i++) diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c index db948e14ce..08819f7964 100644 --- a/app/display/gimpdisplayshell.c +++ b/app/display/gimpdisplayshell.c @@ -1631,7 +1631,7 @@ gimp_display_shell_mask_bounds (GimpDisplayShell *shell, gint off_x; gint off_y; - gimp_item_offsets (GIMP_ITEM (layer), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (layer), &off_x, &off_y); if (! gimp_channel_bounds (gimp_image_get_mask (shell->display->image), x1, y1, x2, y2)) diff --git a/app/paint/gimppaintcore-stroke.c b/app/paint/gimppaintcore-stroke.c index 3c04ffe57f..d1b1007c33 100644 --- a/app/paint/gimppaintcore-stroke.c +++ b/app/paint/gimppaintcore-stroke.c @@ -128,7 +128,7 @@ gimp_paint_core_stroke_boundary (GimpPaintCore *core, if (n_stroke_segs == 0) return TRUE; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); off_x -= offset_x; off_y -= offset_y; @@ -246,8 +246,8 @@ gimp_paint_core_stroke_vectors (GimpPaintCore *core, g_return_val_if_fail (GIMP_IS_VECTORS (vectors), FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE); - gimp_item_offsets (GIMP_ITEM (vectors), &vectors_off_x, &vectors_off_y); - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (vectors), &vectors_off_x, &vectors_off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); off_x -= vectors_off_x; off_y -= vectors_off_y; diff --git a/app/paint/gimppaintcore.c b/app/paint/gimppaintcore.c index b290e3760c..08517aa976 100644 --- a/app/paint/gimppaintcore.c +++ b/app/paint/gimppaintcore.c @@ -805,7 +805,7 @@ gimp_paint_core_paste (GimpPaintCore *core, gint off_x; gint off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); gimp_paint_core_validate_saved_proj_tiles (core, GIMP_PICKABLE (projection), diff --git a/app/paint/gimpsourcecore.c b/app/paint/gimpsourcecore.c index a4b3a7bbd0..d643f538ca 100644 --- a/app/paint/gimpsourcecore.c +++ b/app/paint/gimpsourcecore.c @@ -370,7 +370,7 @@ gimp_source_core_motion (GimpSourceCore *source_core, src_pickable = GIMP_PICKABLE (gimp_image_get_projection (src_image)); - gimp_item_offsets (GIMP_ITEM (source_core->src_drawable), + gimp_item_get_offset (GIMP_ITEM (source_core->src_drawable), &off_x, &off_y); src_offset_x += off_x; diff --git a/app/pdb/drawable-cmds.c b/app/pdb/drawable-cmds.c index 05772bb3a3..03e3b0476a 100644 --- a/app/pdb/drawable-cmds.c +++ b/app/pdb/drawable-cmds.c @@ -469,7 +469,7 @@ drawable_offsets_invoker (GimpProcedure *procedure, if (success) { - gimp_item_offsets (GIMP_ITEM (drawable), &offset_x, &offset_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &offset_x, &offset_y); } return_vals = gimp_procedure_get_return_values (procedure, success, diff --git a/app/pdb/drawable-transform-cmds.c b/app/pdb/drawable-transform-cmds.c index 0efa8f1143..5cd17fed78 100644 --- a/app/pdb/drawable-transform-cmds.c +++ b/app/pdb/drawable-transform-cmds.c @@ -134,7 +134,7 @@ drawable_transform_flip_invoker (GimpProcedure *procedure, GimpMatrix3 matrix; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -206,7 +206,7 @@ drawable_transform_flip_default_invoker (GimpProcedure *procedure, GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -294,7 +294,7 @@ drawable_transform_perspective_invoker (GimpProcedure *procedure, GimpMatrix3 matrix; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -376,7 +376,7 @@ drawable_transform_perspective_default_invoker (GimpProcedure *procedure, GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -507,7 +507,7 @@ drawable_transform_rotate_invoker (GimpProcedure *procedure, GimpMatrix3 matrix; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -583,7 +583,7 @@ drawable_transform_rotate_default_invoker (GimpProcedure *procedure, GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -667,7 +667,7 @@ drawable_transform_scale_invoker (GimpProcedure *procedure, GimpMatrix3 matrix; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -740,7 +740,7 @@ drawable_transform_scale_default_invoker (GimpProcedure *procedure, GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -817,7 +817,7 @@ drawable_transform_shear_invoker (GimpProcedure *procedure, GimpMatrix3 matrix; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -886,7 +886,7 @@ drawable_transform_shear_default_invoker (GimpProcedure *procedure, GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -973,7 +973,7 @@ drawable_transform_2d_invoker (GimpProcedure *procedure, GimpMatrix3 matrix; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -1053,7 +1053,7 @@ drawable_transform_2d_default_invoker (GimpProcedure *procedure, GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -1145,7 +1145,7 @@ drawable_transform_matrix_invoker (GimpProcedure *procedure, GimpMatrix3 matrix; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -1233,7 +1233,7 @@ drawable_transform_matrix_default_invoker (GimpProcedure *procedure, GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; diff --git a/app/pdb/selection-cmds.c b/app/pdb/selection-cmds.c index 8ae713272c..72070cbac5 100644 --- a/app/pdb/selection-cmds.c +++ b/app/pdb/selection-cmds.c @@ -448,7 +448,7 @@ selection_load_invoker (GimpProcedure *procedure, gint off_x, off_y; image = gimp_item_get_image (GIMP_ITEM (channel)); - gimp_item_offsets (GIMP_ITEM (channel), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (channel), &off_x, &off_y); gimp_channel_select_channel (gimp_image_get_mask (image), _("Channel to Selection"), @@ -515,7 +515,7 @@ selection_combine_invoker (GimpProcedure *procedure, gint off_x, off_y; image = gimp_item_get_image (GIMP_ITEM (channel)); - gimp_item_offsets (GIMP_ITEM (channel), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (channel), &off_x, &off_y); gimp_channel_select_channel (gimp_image_get_mask (image), _("Channel to Selection"), diff --git a/app/pdb/transform-tools-cmds.c b/app/pdb/transform-tools-cmds.c index abe194185c..a94ced8037 100644 --- a/app/pdb/transform-tools-cmds.c +++ b/app/pdb/transform-tools-cmds.c @@ -127,7 +127,7 @@ perspective_invoker (GimpProcedure *procedure, GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -197,7 +197,7 @@ rotate_invoker (GimpProcedure *procedure, GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -273,7 +273,7 @@ scale_invoker (GimpProcedure *procedure, GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -344,7 +344,7 @@ shear_invoker (GimpProcedure *procedure, GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; diff --git a/app/pdb/vectors-cmds.c b/app/pdb/vectors-cmds.c index 6770b9b042..8aba0f7223 100644 --- a/app/pdb/vectors-cmds.c +++ b/app/pdb/vectors-cmds.c @@ -128,7 +128,7 @@ vectors_new_from_text_layer_invoker (GimpProcedure *procedure, vectors = gimp_text_vectors_new (image, gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer))); - gimp_item_offsets (GIMP_ITEM (layer), &x, &y); + gimp_item_get_offset (GIMP_ITEM (layer), &x, &y); gimp_item_translate (GIMP_ITEM (vectors), x, y, FALSE); } else diff --git a/app/text/gimptextlayer-xcf.c b/app/text/gimptextlayer-xcf.c index aebb61aa4c..e862acecf2 100644 --- a/app/text/gimptextlayer-xcf.c +++ b/app/text/gimptextlayer-xcf.c @@ -205,7 +205,7 @@ gimp_text_layer_from_layer (GimpLayer *layer, item->width = gimp_item_width (GIMP_ITEM (layer)); item->height = gimp_item_height (GIMP_ITEM (layer)); - gimp_item_offsets (GIMP_ITEM (layer), &item->offset_x, &item->offset_y); + gimp_item_get_offset (GIMP_ITEM (layer), &item->offset_x, &item->offset_y); gimp_item_set_visible (item, gimp_item_get_visible (GIMP_ITEM (layer)), FALSE); gimp_item_set_linked (item, gimp_item_get_linked (GIMP_ITEM (layer)), FALSE); diff --git a/app/tools/gimpaligntool.c b/app/tools/gimpaligntool.c index 6e25e5a824..8051c2c65e 100644 --- a/app/tools/gimpaligntool.c +++ b/app/tools/gimpaligntool.c @@ -409,7 +409,7 @@ gimp_align_tool_button_release (GimpTool *tool, if (! gimp_item_get_visible (GIMP_ITEM (layer))) continue; - gimp_item_offsets (GIMP_ITEM (layer), &x0, &y0); + gimp_item_get_offset (GIMP_ITEM (layer), &x0, &y0); x1 = x0 + gimp_item_width (GIMP_ITEM (layer)); y1 = y0 + gimp_item_height (GIMP_ITEM (layer)); @@ -679,7 +679,7 @@ gimp_align_tool_draw (GimpDrawTool *draw_tool) } else { - gimp_item_offsets (item, &x, &y); + gimp_item_get_offset (item, &x, &y); w = gimp_item_width (item); h = gimp_item_height (item); @@ -1131,7 +1131,7 @@ select_layer_by_coords (GimpImage *image, if (! gimp_item_get_visible (GIMP_ITEM (layer))) continue; - gimp_item_offsets (GIMP_ITEM (layer), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (layer), &off_x, &off_y); width = gimp_item_width (GIMP_ITEM (layer)); height = gimp_item_height (GIMP_ITEM (layer)); diff --git a/app/tools/gimpblendtool.c b/app/tools/gimpblendtool.c index 47a38104a9..3b4847213c 100644 --- a/app/tools/gimpblendtool.c +++ b/app/tools/gimpblendtool.c @@ -223,7 +223,7 @@ gimp_blend_tool_button_release (GimpTool *tool, progress = gimp_progress_start (GIMP_PROGRESS (display), _("Blending"), FALSE); - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); gimp_drawable_blend (drawable, context, diff --git a/app/tools/gimpbucketfilltool.c b/app/tools/gimpbucketfilltool.c index b2cc75f0e8..c0ad7bb53f 100644 --- a/app/tools/gimpbucketfilltool.c +++ b/app/tools/gimpbucketfilltool.c @@ -139,7 +139,7 @@ gimp_bucket_fill_tool_button_release (GimpTool *tool, { gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x -= off_x; y -= off_y; diff --git a/app/tools/gimpbycolorselecttool.c b/app/tools/gimpbycolorselecttool.c index e534afd058..ae4bb4fd8a 100644 --- a/app/tools/gimpbycolorselecttool.c +++ b/app/tools/gimpbycolorselecttool.c @@ -113,7 +113,7 @@ gimp_by_color_select_tool_get_mask (GimpRegionSelectTool *region_select, { gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x -= off_x; y -= off_y; diff --git a/app/tools/gimpcolortool.c b/app/tools/gimpcolortool.c index b7fff1d3ae..b9d5647a08 100644 --- a/app/tools/gimpcolortool.c +++ b/app/tools/gimpcolortool.c @@ -267,7 +267,7 @@ gimp_color_tool_button_press (GimpTool *tool, gint off_x, off_y; /* Keep the coordinates of the target */ - gimp_item_offsets (GIMP_ITEM (tool->drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (tool->drawable), &off_x, &off_y); color_tool->center_x = coords->x - off_x; color_tool->center_y = coords->y - off_y; @@ -449,7 +449,7 @@ gimp_color_tool_motion (GimpTool *tool, gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool)); - gimp_item_offsets (GIMP_ITEM (tool->drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (tool->drawable), &off_x, &off_y); color_tool->center_x = coords->x - off_x; color_tool->center_y = coords->y - off_y; diff --git a/app/tools/gimpeditselectiontool.c b/app/tools/gimpeditselectiontool.c index fc02e6621c..35b99f939f 100644 --- a/app/tools/gimpeditselectiontool.c +++ b/app/tools/gimpeditselectiontool.c @@ -254,7 +254,7 @@ gimp_edit_selection_tool_start (GimpTool *parent_tool, GIMP_UNDO_GROUP_ITEM_DISPLACE, undo_desc); - gimp_item_offsets (active_item, &off_x, &off_y); + gimp_item_get_offset (active_item, &off_x, &off_y); edit_select->x = edit_select->origx = coords->x - off_x; edit_select->y = edit_select->origy = coords->y - off_y; @@ -369,7 +369,7 @@ gimp_edit_selection_tool_start (GimpTool *parent_tool, gint x3, y3; gint x4, y4; - gimp_item_offsets (item, &x3, &y3); + gimp_item_get_offset (item, &x3, &y3); x4 = x3 + gimp_item_width (item); y4 = y3 + gimp_item_height (item); @@ -599,7 +599,7 @@ gimp_edit_selection_tool_update_motion (GimpEditSelectionTool *edit_select, active_item = gimp_edit_selection_tool_get_active_item (edit_select, display->image); - gimp_item_offsets (active_item, &off_x, &off_y); + gimp_item_get_offset (active_item, &off_x, &off_y); if (edit_select->constrain) { @@ -804,7 +804,7 @@ gimp_edit_selection_tool_draw (GimpDrawTool *draw_tool) } else { - gimp_item_offsets (active_item, &off_x, &off_y); + gimp_item_get_offset (active_item, &off_x, &off_y); } if (! floating_sel && edit_select->segs_in) @@ -857,7 +857,7 @@ gimp_edit_selection_tool_draw (GimpDrawTool *draw_tool) active_item = GIMP_ITEM (gimp_image_get_active_layer (display->image)); - gimp_item_offsets (active_item, &x1, &y1); + gimp_item_get_offset (active_item, &x1, &y1); x2 = x1 + gimp_item_width (active_item); y2 = y1 + gimp_item_height (active_item); @@ -880,7 +880,7 @@ gimp_edit_selection_tool_draw (GimpDrawTool *draw_tool) gint x3, y3; gint x4, y4; - gimp_item_offsets (item, &x3, &y3); + gimp_item_get_offset (item, &x3, &y3); x4 = x3 + gimp_item_width (item); y4 = y3 + gimp_item_height (item); diff --git a/app/tools/gimpfuzzyselecttool.c b/app/tools/gimpfuzzyselecttool.c index bd6c3762ea..f37558062f 100644 --- a/app/tools/gimpfuzzyselecttool.c +++ b/app/tools/gimpfuzzyselecttool.c @@ -110,7 +110,7 @@ gimp_fuzzy_select_tool_get_mask (GimpRegionSelectTool *region_select, { gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x -= off_x; y -= off_y; diff --git a/app/tools/gimpimagemaptool.c b/app/tools/gimpimagemaptool.c index a442f7b189..d1a3377027 100644 --- a/app/tools/gimpimagemaptool.c +++ b/app/tools/gimpimagemaptool.c @@ -415,7 +415,7 @@ gimp_image_map_tool_pick_color (GimpColorTool *color_tool, GimpImageMapTool *tool = GIMP_IMAGE_MAP_TOOL (color_tool); gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (tool->drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (tool->drawable), &off_x, &off_y); *sample_type = gimp_drawable_type (tool->drawable); @@ -441,7 +441,7 @@ gimp_image_map_tool_map (GimpImageMapTool *tool) gimp_display_shell_untransform_viewport (shell, &x, &y, &w, &h); - gimp_item_offsets (item, &off_x, &off_y); + gimp_item_get_offset (item, &off_x, &off_y); gimp_rectangle_intersect (x, y, w, h, off_x, diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c index 0870a4ed3e..2bdb852f86 100644 --- a/app/tools/gimppainttool.c +++ b/app/tools/gimppainttool.c @@ -302,7 +302,7 @@ gimp_paint_tool_button_press (GimpTool *tool, curr_coords = *coords; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); curr_coords.x -= off_x; curr_coords.y -= off_y; @@ -454,7 +454,7 @@ gimp_paint_tool_motion (GimpTool *tool, core->cur_coords = *coords; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); core->cur_coords.x -= off_x; core->cur_coords.y -= off_y; @@ -589,7 +589,7 @@ gimp_paint_tool_oper_update (GimpTool *tool, core->cur_coords = *coords; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); core->cur_coords.x -= off_x; core->cur_coords.y -= off_y; diff --git a/app/tools/gimpperspectiveclonetool.c b/app/tools/gimpperspectiveclonetool.c index 4d3f8752b0..233bf504c4 100644 --- a/app/tools/gimpperspectiveclonetool.c +++ b/app/tools/gimpperspectiveclonetool.c @@ -788,8 +788,8 @@ gimp_perspective_clone_tool_draw (GimpDrawTool *draw_tool) gint off_x; gint off_y; - gimp_item_offsets (GIMP_ITEM (source_core->src_drawable), - &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (source_core->src_drawable), + &off_x, &off_y); tmp_display = draw_tool->display; draw_tool->display = clone_tool->src_display; diff --git a/app/tools/gimprectangletool.c b/app/tools/gimprectangletool.c index 36522c7629..a0ee55c97d 100644 --- a/app/tools/gimprectangletool.c +++ b/app/tools/gimprectangletool.c @@ -724,7 +724,7 @@ gimp_rectangle_tool_frame_item (GimpRectangleTool *rect_tool, width = gimp_item_width (item); height = gimp_item_height (item); - gimp_item_offsets (item, &offset_x, &offset_y); + gimp_item_get_offset (item, &offset_x, &offset_y); gimp_draw_tool_pause (GIMP_DRAW_TOOL (rect_tool)); @@ -4102,7 +4102,7 @@ gimp_rectangle_tool_get_constraints (GimpRectangleTool *rect_tool, { GimpItem *item = GIMP_ITEM (tool->drawable); - gimp_item_offsets (item, min_x, min_y); + gimp_item_get_offset (item, min_x, min_y); *max_x = *min_x + gimp_item_width (item); *max_y = *min_y + gimp_item_height (item); } diff --git a/app/tools/gimpregionselecttool.c b/app/tools/gimpregionselecttool.c index c17fb8dd6e..ebcc24bda5 100644 --- a/app/tools/gimpregionselecttool.c +++ b/app/tools/gimpregionselecttool.c @@ -220,7 +220,7 @@ gimp_region_select_tool_button_release (GimpTool *tool, drawable = gimp_image_get_active_drawable (display->image); - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); } gimp_channel_select_channel (gimp_image_get_mask (display->image), diff --git a/app/tools/gimpsourcetool.c b/app/tools/gimpsourcetool.c index 0eccd90d1c..c92336933b 100644 --- a/app/tools/gimpsourcetool.c +++ b/app/tools/gimpsourcetool.c @@ -375,7 +375,7 @@ gimp_source_tool_draw (GimpDrawTool *draw_tool) draw_tool->display = source_tool->src_display; - gimp_item_offsets (GIMP_ITEM (source->src_drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (source->src_drawable), &off_x, &off_y); if (source_tool->show_source_outline) gimp_brush_tool_draw_brush (GIMP_BRUSH_TOOL (source_tool), diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c index 47106a8b0f..d7363a6879 100644 --- a/app/tools/gimptexttool.c +++ b/app/tools/gimptexttool.c @@ -2396,7 +2396,7 @@ gimp_text_tool_create_vectors (GimpTextTool *text_tool) { gint x, y; - gimp_item_offsets (GIMP_ITEM (text_tool->layer), &x, &y); + gimp_item_get_offset (GIMP_ITEM (text_tool->layer), &x, &y); gimp_item_translate (GIMP_ITEM (vectors), x, y, FALSE); } diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c index 0aeb90e9b7..91df0d29f5 100644 --- a/app/tools/gimptransformtool.c +++ b/app/tools/gimptransformtool.c @@ -1500,7 +1500,7 @@ gimp_transform_tool_bounds (GimpTransformTool *tr_tool, drawable = gimp_image_get_active_drawable (display->image); - gimp_item_offsets (GIMP_ITEM (drawable), &offset_x, &offset_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &offset_x, &offset_y); gimp_drawable_mask_bounds (drawable, &tr_tool->x1, &tr_tool->y1, diff --git a/app/widgets/gimptoolbox-dnd.c b/app/widgets/gimptoolbox-dnd.c index 2602b84871..1c446f9b03 100644 --- a/app/widgets/gimptoolbox-dnd.c +++ b/app/widgets/gimptoolbox-dnd.c @@ -219,7 +219,7 @@ gimp_toolbox_drop_drawable (GtkWidget *widget, gimp_object_set_name (GIMP_OBJECT (new_layer), gimp_object_get_name (GIMP_OBJECT (drawable))); - gimp_item_offsets (GIMP_ITEM (new_layer), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (new_layer), &off_x, &off_y); gimp_item_translate (GIMP_ITEM (new_layer), -off_x, -off_y, FALSE); gimp_item_set_visible (GIMP_ITEM (new_layer), TRUE, FALSE); gimp_item_set_linked (GIMP_ITEM (new_layer), FALSE, FALSE); diff --git a/tools/pdbgen/pdb/drawable.pdb b/tools/pdbgen/pdb/drawable.pdb index 4b7cf41ba1..94e56a1dbd 100644 --- a/tools/pdbgen/pdb/drawable.pdb +++ b/tools/pdbgen/pdb/drawable.pdb @@ -596,7 +596,7 @@ HELP %invoke = ( code => <<'CODE' { - gimp_item_offsets (GIMP_ITEM (drawable), &offset_x, &offset_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &offset_x, &offset_y); } CODE ); diff --git a/tools/pdbgen/pdb/drawable_transform.pdb b/tools/pdbgen/pdb/drawable_transform.pdb index e50e69c361..eb9241363b 100644 --- a/tools/pdbgen/pdb/drawable_transform.pdb +++ b/tools/pdbgen/pdb/drawable_transform.pdb @@ -44,7 +44,7 @@ sub transform_invoke { GimpMatrix3 matrix; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -91,7 +91,7 @@ sub transform_default_invoke { GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; diff --git a/tools/pdbgen/pdb/selection.pdb b/tools/pdbgen/pdb/selection.pdb index 986c9e299d..9c7cf8f934 100644 --- a/tools/pdbgen/pdb/selection.pdb +++ b/tools/pdbgen/pdb/selection.pdb @@ -465,7 +465,7 @@ HELP gint off_x, off_y; image = gimp_item_get_image (GIMP_ITEM (channel)); - gimp_item_offsets (GIMP_ITEM (channel), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (channel), &off_x, &off_y); gimp_channel_select_channel (gimp_image_get_mask (image), _("Channel to Selection"), @@ -501,7 +501,7 @@ HELP gint off_x, off_y; image = gimp_item_get_image (GIMP_ITEM (channel)); - gimp_item_offsets (GIMP_ITEM (channel), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (channel), &off_x, &off_y); gimp_channel_select_channel (gimp_image_get_mask (image), _("Channel to Selection"), diff --git a/tools/pdbgen/pdb/transform_tools.pdb b/tools/pdbgen/pdb/transform_tools.pdb index 22fed64a8b..762758d744 100644 --- a/tools/pdbgen/pdb/transform_tools.pdb +++ b/tools/pdbgen/pdb/transform_tools.pdb @@ -104,7 +104,7 @@ sub perspective { GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -168,7 +168,7 @@ sub rotate { GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -242,7 +242,7 @@ sub scale { GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; @@ -308,7 +308,7 @@ sub shear { GimpInterpolationType interpolation_type = GIMP_INTERPOLATION_NONE; gint off_x, off_y; - gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); + gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y); x += off_x; y += off_y; diff --git a/tools/pdbgen/pdb/vectors.pdb b/tools/pdbgen/pdb/vectors.pdb index fb881501aa..cc6b5487c4 100644 --- a/tools/pdbgen/pdb/vectors.pdb +++ b/tools/pdbgen/pdb/vectors.pdb @@ -110,7 +110,7 @@ HELP vectors = gimp_text_vectors_new (image, gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer))); - gimp_item_offsets (GIMP_ITEM (layer), &x, &y); + gimp_item_get_offset (GIMP_ITEM (layer), &x, &y); gimp_item_translate (GIMP_ITEM (vectors), x, y, FALSE); } else