diff --git a/app/pdb/drawable-cmds.c b/app/pdb/drawable-cmds.c index dd88710a03..5e20227b2f 100644 --- a/app/pdb/drawable-cmds.c +++ b/app/pdb/drawable-cmds.c @@ -294,12 +294,12 @@ drawable_is_indexed_invoker (GimpProcedure *procedure, } static GimpValueArray * -drawable_bpp_invoker (GimpProcedure *procedure, - Gimp *gimp, - GimpContext *context, - GimpProgress *progress, - const GimpValueArray *args, - GError **error) +drawable_get_bpp_invoker (GimpProcedure *procedure, + Gimp *gimp, + GimpContext *context, + GimpProgress *progress, + const GimpValueArray *args, + GError **error) { gboolean success = TRUE; GimpValueArray *return_vals; @@ -325,12 +325,12 @@ drawable_bpp_invoker (GimpProcedure *procedure, } static GimpValueArray * -drawable_width_invoker (GimpProcedure *procedure, - Gimp *gimp, - GimpContext *context, - GimpProgress *progress, - const GimpValueArray *args, - GError **error) +drawable_get_width_invoker (GimpProcedure *procedure, + Gimp *gimp, + GimpContext *context, + GimpProgress *progress, + const GimpValueArray *args, + GError **error) { gboolean success = TRUE; GimpValueArray *return_vals; @@ -354,12 +354,12 @@ drawable_width_invoker (GimpProcedure *procedure, } static GimpValueArray * -drawable_height_invoker (GimpProcedure *procedure, - Gimp *gimp, - GimpContext *context, - GimpProgress *progress, - const GimpValueArray *args, - GError **error) +drawable_get_height_invoker (GimpProcedure *procedure, + Gimp *gimp, + GimpContext *context, + GimpProgress *progress, + const GimpValueArray *args, + GError **error) { gboolean success = TRUE; GimpValueArray *return_vals; @@ -383,12 +383,12 @@ drawable_height_invoker (GimpProcedure *procedure, } static GimpValueArray * -drawable_offsets_invoker (GimpProcedure *procedure, - Gimp *gimp, - GimpContext *context, - GimpProgress *progress, - const GimpValueArray *args, - GError **error) +drawable_get_offsets_invoker (GimpProcedure *procedure, + Gimp *gimp, + GimpContext *context, + GimpProgress *progress, + const GimpValueArray *args, + GError **error) { gboolean success = TRUE; GimpValueArray *return_vals; @@ -1217,11 +1217,11 @@ register_drawable_procs (GimpPDB *pdb) g_object_unref (procedure); /* - * gimp-drawable-bpp + * gimp-drawable-get-bpp */ - procedure = gimp_procedure_new (drawable_bpp_invoker); + procedure = gimp_procedure_new (drawable_get_bpp_invoker); gimp_object_set_static_name (GIMP_OBJECT (procedure), - "gimp-drawable-bpp"); + "gimp-drawable-get-bpp"); gimp_procedure_set_static_help (procedure, "Returns the bytes per pixel.", "This procedure returns the number of bytes per pixel.", @@ -1246,11 +1246,11 @@ register_drawable_procs (GimpPDB *pdb) g_object_unref (procedure); /* - * gimp-drawable-width + * gimp-drawable-get-width */ - procedure = gimp_procedure_new (drawable_width_invoker); + procedure = gimp_procedure_new (drawable_get_width_invoker); gimp_object_set_static_name (GIMP_OBJECT (procedure), - "gimp-drawable-width"); + "gimp-drawable-get-width"); gimp_procedure_set_static_help (procedure, "Returns the width of the drawable.", "This procedure returns the specified drawable's width in pixels.", @@ -1275,11 +1275,11 @@ register_drawable_procs (GimpPDB *pdb) g_object_unref (procedure); /* - * gimp-drawable-height + * gimp-drawable-get-height */ - procedure = gimp_procedure_new (drawable_height_invoker); + procedure = gimp_procedure_new (drawable_get_height_invoker); gimp_object_set_static_name (GIMP_OBJECT (procedure), - "gimp-drawable-height"); + "gimp-drawable-get-height"); gimp_procedure_set_static_help (procedure, "Returns the height of the drawable.", "This procedure returns the specified drawable's height in pixels.", @@ -1304,11 +1304,11 @@ register_drawable_procs (GimpPDB *pdb) g_object_unref (procedure); /* - * gimp-drawable-offsets + * gimp-drawable-get-offsets */ - procedure = gimp_procedure_new (drawable_offsets_invoker); + procedure = gimp_procedure_new (drawable_get_offsets_invoker); gimp_object_set_static_name (GIMP_OBJECT (procedure), - "gimp-drawable-offsets"); + "gimp-drawable-get-offsets"); gimp_procedure_set_static_help (procedure, "Returns the offsets for the drawable.", "This procedure returns the specified drawable's offsets. This only makes sense if the drawable is a layer since channels are anchored. The offsets of a channel will be returned as 0.", diff --git a/libgimp/gimp.def b/libgimp/gimp.def index c8ab391faf..b8bf490214 100644 --- a/libgimp/gimp.def +++ b/libgimp/gimp.def @@ -188,7 +188,6 @@ EXPORTS gimp_displays_reconnect gimp_dodgeburn gimp_dodgeburn_default - gimp_drawable_bpp gimp_drawable_brightness_contrast gimp_drawable_color_balance gimp_drawable_colorize_hsl @@ -205,9 +204,12 @@ EXPORTS gimp_drawable_fill gimp_drawable_foreground_extract gimp_drawable_free_shadow + gimp_drawable_get_bpp gimp_drawable_get_buffer gimp_drawable_get_by_id gimp_drawable_get_format + gimp_drawable_get_height + gimp_drawable_get_offsets gimp_drawable_get_pixel gimp_drawable_get_shadow_buffer gimp_drawable_get_sub_thumbnail @@ -216,8 +218,8 @@ EXPORTS gimp_drawable_get_thumbnail_data gimp_drawable_get_thumbnail_format gimp_drawable_get_type + gimp_drawable_get_width gimp_drawable_has_alpha - gimp_drawable_height gimp_drawable_histogram gimp_drawable_hue_saturation gimp_drawable_invert @@ -230,14 +232,12 @@ EXPORTS gimp_drawable_mask_intersect gimp_drawable_merge_shadow gimp_drawable_offset - gimp_drawable_offsets gimp_drawable_posterize gimp_drawable_set_pixel gimp_drawable_threshold gimp_drawable_type gimp_drawable_type_with_alpha gimp_drawable_update - gimp_drawable_width gimp_dynamics_get_list gimp_dynamics_refresh gimp_edit_copy diff --git a/libgimp/gimpaspectpreview.c b/libgimp/gimpaspectpreview.c index 8b8e4de0e1..1312a1c698 100644 --- a/libgimp/gimpaspectpreview.c +++ b/libgimp/gimpaspectpreview.c @@ -249,8 +249,8 @@ gimp_aspect_preview_style_updated (GtkWidget *widget) gint preview_height; gint size; - width = gimp_drawable_width (priv->drawable); - height = gimp_drawable_height (priv->drawable); + width = gimp_drawable_get_width (priv->drawable); + height = gimp_drawable_get_height (priv->drawable); gtk_widget_style_get (widget, "size", &size, @@ -331,7 +331,7 @@ gimp_aspect_preview_draw_buffer (GimpPreview *preview, gimp_preview_area_mask (GIMP_PREVIEW_AREA (area), 0, 0, width, height, gimp_drawable_type (priv->drawable), - src, width * gimp_drawable_bpp (priv->drawable), + src, width * gimp_drawable_get_bpp (priv->drawable), buffer, rowstride, sel, width); @@ -353,8 +353,8 @@ gimp_aspect_preview_transform (GimpPreview *preview, gimp_preview_get_size (preview, &width, &height); - *dest_x = (gdouble) src_x * width / gimp_drawable_width (priv->drawable); - *dest_y = (gdouble) src_y * height / gimp_drawable_height (priv->drawable); + *dest_x = (gdouble) src_x * width / gimp_drawable_get_width (priv->drawable); + *dest_y = (gdouble) src_y * height / gimp_drawable_get_height (priv->drawable); } static void @@ -370,8 +370,8 @@ gimp_aspect_preview_untransform (GimpPreview *preview, gimp_preview_get_size (preview, &width, &height); - *dest_x = (gdouble) src_x * gimp_drawable_width (priv->drawable) / width; - *dest_y = (gdouble) src_y * gimp_drawable_height (priv->drawable) / height; + *dest_x = (gdouble) src_x * gimp_drawable_get_width (priv->drawable) / width; + *dest_y = (gdouble) src_y * gimp_drawable_get_height (priv->drawable) / height; } static void @@ -388,8 +388,8 @@ gimp_aspect_preview_set_drawable (GimpAspectPreview *preview, priv->drawable = drawable; - d_width = gimp_drawable_width (priv->drawable); - d_height = gimp_drawable_height (priv->drawable); + d_width = gimp_drawable_get_width (priv->drawable); + d_height = gimp_drawable_get_height (priv->drawable); if (d_width > d_height) { diff --git a/libgimp/gimpdrawable_pdb.c b/libgimp/gimpdrawable_pdb.c index b8f902fcdd..cb4d295dfe 100644 --- a/libgimp/gimpdrawable_pdb.c +++ b/libgimp/gimpdrawable_pdb.c @@ -326,7 +326,7 @@ gimp_drawable_is_indexed (GimpDrawable *drawable) } /** - * gimp_drawable_bpp: + * gimp_drawable_get_bpp: * @drawable: The drawable. * * Returns the bytes per pixel. @@ -336,7 +336,7 @@ gimp_drawable_is_indexed (GimpDrawable *drawable) * Returns: Bytes per pixel. **/ gint -gimp_drawable_bpp (GimpDrawable *drawable) +gimp_drawable_get_bpp (GimpDrawable *drawable) { GimpValueArray *args; GimpValueArray *return_vals; @@ -347,7 +347,7 @@ gimp_drawable_bpp (GimpDrawable *drawable) G_TYPE_NONE); return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (), - "gimp-drawable-bpp", + "gimp-drawable-get-bpp", args); gimp_value_array_unref (args); @@ -360,7 +360,7 @@ gimp_drawable_bpp (GimpDrawable *drawable) } /** - * gimp_drawable_width: + * gimp_drawable_get_width: * @drawable: The drawable. * * Returns the width of the drawable. @@ -370,7 +370,7 @@ gimp_drawable_bpp (GimpDrawable *drawable) * Returns: Width of drawable. **/ gint -gimp_drawable_width (GimpDrawable *drawable) +gimp_drawable_get_width (GimpDrawable *drawable) { GimpValueArray *args; GimpValueArray *return_vals; @@ -381,7 +381,7 @@ gimp_drawable_width (GimpDrawable *drawable) G_TYPE_NONE); return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (), - "gimp-drawable-width", + "gimp-drawable-get-width", args); gimp_value_array_unref (args); @@ -394,7 +394,7 @@ gimp_drawable_width (GimpDrawable *drawable) } /** - * gimp_drawable_height: + * gimp_drawable_get_height: * @drawable: The drawable. * * Returns the height of the drawable. @@ -404,7 +404,7 @@ gimp_drawable_width (GimpDrawable *drawable) * Returns: Height of drawable. **/ gint -gimp_drawable_height (GimpDrawable *drawable) +gimp_drawable_get_height (GimpDrawable *drawable) { GimpValueArray *args; GimpValueArray *return_vals; @@ -415,7 +415,7 @@ gimp_drawable_height (GimpDrawable *drawable) G_TYPE_NONE); return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (), - "gimp-drawable-height", + "gimp-drawable-get-height", args); gimp_value_array_unref (args); @@ -428,7 +428,7 @@ gimp_drawable_height (GimpDrawable *drawable) } /** - * gimp_drawable_offsets: + * gimp_drawable_get_offsets: * @drawable: The drawable. * @offset_x: (out): x offset of drawable. * @offset_y: (out): y offset of drawable. @@ -442,9 +442,9 @@ gimp_drawable_height (GimpDrawable *drawable) * Returns: TRUE on success. **/ gboolean -gimp_drawable_offsets (GimpDrawable *drawable, - gint *offset_x, - gint *offset_y) +gimp_drawable_get_offsets (GimpDrawable *drawable, + gint *offset_x, + gint *offset_y) { GimpValueArray *args; GimpValueArray *return_vals; @@ -455,7 +455,7 @@ gimp_drawable_offsets (GimpDrawable *drawable, G_TYPE_NONE); return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (), - "gimp-drawable-offsets", + "gimp-drawable-get-offsets", args); gimp_value_array_unref (args); diff --git a/libgimp/gimpdrawable_pdb.h b/libgimp/gimpdrawable_pdb.h index f472f2b5b5..ff9ea0ac4f 100644 --- a/libgimp/gimpdrawable_pdb.h +++ b/libgimp/gimpdrawable_pdb.h @@ -40,10 +40,10 @@ gboolean gimp_drawable_has_alpha (GimpDrawable gboolean gimp_drawable_is_rgb (GimpDrawable *drawable); gboolean gimp_drawable_is_gray (GimpDrawable *drawable); gboolean gimp_drawable_is_indexed (GimpDrawable *drawable); -gint gimp_drawable_bpp (GimpDrawable *drawable); -gint gimp_drawable_width (GimpDrawable *drawable); -gint gimp_drawable_height (GimpDrawable *drawable); -gboolean gimp_drawable_offsets (GimpDrawable *drawable, +gint gimp_drawable_get_bpp (GimpDrawable *drawable); +gint gimp_drawable_get_width (GimpDrawable *drawable); +gint gimp_drawable_get_height (GimpDrawable *drawable); +gboolean gimp_drawable_get_offsets (GimpDrawable *drawable, gint *offset_x, gint *offset_y); gboolean gimp_drawable_mask_bounds (GimpDrawable *drawable, diff --git a/libgimp/gimpdrawablepreview.c b/libgimp/gimpdrawablepreview.c index bb03e751cd..0e34964f0c 100644 --- a/libgimp/gimpdrawablepreview.c +++ b/libgimp/gimpdrawablepreview.c @@ -342,8 +342,8 @@ _gimp_drawable_preview_area_draw_thumb (GimpPreviewArea *area, } else { - width = gimp_drawable_width (drawable); - height = gimp_drawable_height (drawable); + width = gimp_drawable_get_width (drawable); + height = gimp_drawable_get_height (drawable); } if (width > height) @@ -436,7 +436,7 @@ gimp_drawable_preview_draw_area (GimpDrawablePreview *preview, gint draw_x, draw_y; gint draw_width, draw_height; - gimp_drawable_offsets (priv->drawable, &offset_x, &offset_y); + gimp_drawable_get_offsets (priv->drawable, &offset_x, &offset_y); if (gimp_drawable_mask_intersect (priv->drawable, &mask_x, &mask_y, @@ -575,12 +575,12 @@ _gimp_drawable_preview_get_bounds (GimpDrawable *drawable, g_return_val_if_fail (gimp_item_is_valid (GIMP_ITEM (drawable)), FALSE); g_return_val_if_fail (gimp_item_is_drawable (GIMP_ITEM (drawable)), FALSE); - width = gimp_drawable_width (drawable); - height = gimp_drawable_height (drawable); + width = gimp_drawable_get_width (drawable); + height = gimp_drawable_get_height (drawable); retval = gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2); - gimp_drawable_offsets (drawable, &offset_x, &offset_y); + gimp_drawable_get_offsets (drawable, &offset_x, &offset_y); *xmin = MAX3 (x1 - SELECTION_BORDER, 0, - offset_x); *ymin = MAX3 (y1 - SELECTION_BORDER, 0, - offset_y); diff --git a/libgimp/gimpexport.c b/libgimp/gimpexport.c index f1cc7dec77..5e08a250e7 100644 --- a/libgimp/gimpexport.c +++ b/libgimp/gimpexport.c @@ -135,14 +135,14 @@ export_merge (GimpImage *image, layers = gimp_image_list_layers (image); /* make sure that the merged drawable matches the image size */ - if (gimp_drawable_width (GIMP_DRAWABLE (merged)) != + if (gimp_drawable_get_width (GIMP_DRAWABLE (merged)) != gimp_image_get_width (image) || - gimp_drawable_height (GIMP_DRAWABLE (merged)) != + gimp_drawable_get_height (GIMP_DRAWABLE (merged)) != gimp_image_get_height (image)) { gint off_x, off_y; - gimp_drawable_offsets (GIMP_DRAWABLE (merged), &off_x, &off_y); + gimp_drawable_get_offsets (GIMP_DRAWABLE (merged), &off_x, &off_y); gimp_layer_resize (merged, gimp_image_get_width (image), gimp_image_get_height (image), @@ -943,11 +943,11 @@ gimp_export_image (GimpImage **image, GimpDrawable *drawable = iter->data; GeglRectangle layer_bounds; - gimp_drawable_offsets (drawable, + gimp_drawable_get_offsets (drawable, &layer_bounds.x, &layer_bounds.y); - layer_bounds.width = gimp_drawable_width (drawable); - layer_bounds.height = gimp_drawable_height (drawable); + layer_bounds.width = gimp_drawable_get_width (drawable); + layer_bounds.height = gimp_drawable_get_height (drawable); if (! gegl_rectangle_contains (&image_bounds, &layer_bounds)) { @@ -974,13 +974,13 @@ gimp_export_image (GimpImage **image, gint offset_x; gint offset_y; - gimp_drawable_offsets (drawable, &offset_x, &offset_y); + gimp_drawable_get_offsets (drawable, &offset_x, &offset_y); if ((gimp_layer_get_opacity (GIMP_LAYER (drawable)) < 100.0) || (gimp_image_get_width (*image) != - gimp_drawable_width (drawable)) || + gimp_drawable_get_width (drawable)) || (gimp_image_get_height (*image) != - gimp_drawable_height (drawable)) || + gimp_drawable_get_height (drawable)) || offset_x || offset_y) { if (capabilities & GIMP_EXPORT_CAN_HANDLE_ALPHA) diff --git a/libgimp/gimptilebackendplugin.c b/libgimp/gimptilebackendplugin.c index 8a77a8f67b..3d429555e9 100644 --- a/libgimp/gimptilebackendplugin.c +++ b/libgimp/gimptilebackendplugin.c @@ -177,8 +177,8 @@ _gimp_tile_backend_plugin_new (GimpDrawable *drawable, GeglTileBackend *backend; GimpTileBackendPlugin *backend_plugin; const Babl *format = gimp_drawable_get_format (drawable); - gint width = gimp_drawable_width (drawable); - gint height = gimp_drawable_height (drawable); + gint width = gimp_drawable_get_width (drawable); + gint height = gimp_drawable_get_height (drawable); backend = g_object_new (GIMP_TYPE_TILE_BACKEND_PLUGIN, "tile-width", TILE_WIDTH, @@ -192,7 +192,7 @@ _gimp_tile_backend_plugin_new (GimpDrawable *drawable, backend_plugin->priv->shadow = shadow; backend_plugin->priv->width = width; backend_plugin->priv->height = height; - backend_plugin->priv->bpp = gimp_drawable_bpp (drawable); + backend_plugin->priv->bpp = gimp_drawable_get_bpp (drawable); backend_plugin->priv->ntile_rows = (height + TILE_HEIGHT - 1) / TILE_HEIGHT; backend_plugin->priv->ntile_cols = (width + TILE_WIDTH - 1) / TILE_WIDTH; diff --git a/libgimp/gimpzoompreview.c b/libgimp/gimpzoompreview.c index 917803efcb..d2aba484f9 100644 --- a/libgimp/gimpzoompreview.c +++ b/libgimp/gimpzoompreview.c @@ -406,8 +406,8 @@ gimp_zoom_preview_style_updated (GtkWidget *widget) } else { - width = gimp_drawable_width (priv->drawable); - height = gimp_drawable_height (priv->drawable); + width = gimp_drawable_get_width (priv->drawable); + height = gimp_drawable_get_height (priv->drawable); } if (width > height) @@ -542,7 +542,7 @@ gimp_zoom_preview_draw_buffer (GimpPreview *preview, src_x, src_y, src_width, src_height, &w, &h, &bpp); - gimp_drawable_offsets (priv->drawable, &offsx, &offsy); + gimp_drawable_get_offsets (priv->drawable, &offsx, &offsy); sel = gimp_drawable_get_sub_thumbnail_data (GIMP_DRAWABLE (selection), src_x + offsx, src_y + offsy, src_width, src_height, @@ -551,7 +551,7 @@ gimp_zoom_preview_draw_buffer (GimpPreview *preview, gimp_preview_area_mask (GIMP_PREVIEW_AREA (area), 0, 0, width, height, gimp_drawable_type (priv->drawable), - src, width * gimp_drawable_bpp (priv->drawable), + src, width * gimp_drawable_get_bpp (priv->drawable), buffer, rowstride, sel, width); @@ -672,8 +672,8 @@ gimp_zoom_preview_set_drawable (GimpZoomPreview *preview, } else { - width = gimp_drawable_width (drawable); - height = gimp_drawable_height (drawable); + width = gimp_drawable_get_width (drawable); + height = gimp_drawable_get_height (drawable); priv->extents.x = 0; priv->extents.y = 0; diff --git a/pdb/groups/drawable.pdb b/pdb/groups/drawable.pdb index 2032ac6537..b3e10b9065 100644 --- a/pdb/groups/drawable.pdb +++ b/pdb/groups/drawable.pdb @@ -518,7 +518,7 @@ CODE ); } -sub drawable_bpp { +sub drawable_get_bpp { $blurb = 'Returns the bytes per pixel.'; $help = <<'HELP'; @@ -548,7 +548,7 @@ CODE ); } -sub drawable_width { +sub drawable_get_width { $blurb = 'Returns the width of the drawable.'; $help = "This procedure returns the specified drawable's width in pixels."; @@ -573,7 +573,7 @@ CODE ); } -sub drawable_height { +sub drawable_get_height { $blurb = 'Returns the height of the drawable.'; $help = "This procedure returns the specified drawable's height in pixels."; @@ -598,7 +598,7 @@ CODE ); } -sub drawable_offsets { +sub drawable_get_offsets { $blurb = 'Returns the offsets for the drawable.'; $help = <<'HELP'; @@ -1019,10 +1019,10 @@ CODE drawable_is_rgb drawable_is_gray drawable_is_indexed - drawable_bpp - drawable_width - drawable_height - drawable_offsets + drawable_get_bpp + drawable_get_width + drawable_get_height + drawable_get_offsets drawable_mask_bounds drawable_mask_intersect drawable_merge_shadow diff --git a/plug-ins/common/align-layers.c b/plug-ins/common/align-layers.c index 837f04f379..2e9961c28c 100644 --- a/plug-ins/common/align-layers.c +++ b/plug-ins/common/align-layers.c @@ -497,7 +497,7 @@ align_layers_gather_data (GimpLayer **layers, /* 0 is the top layer */ for (index = 0; index < layer_num; index++) { - gimp_drawable_offsets (GIMP_DRAWABLE (layers[index]), &orig_x, &orig_y); + gimp_drawable_get_offsets (GIMP_DRAWABLE (layers[index]), &orig_x, &orig_y); align_layers_get_align_offsets (GIMP_DRAWABLE (layers[index]), &offset_x, @@ -513,7 +513,7 @@ align_layers_gather_data (GimpLayer **layers, if (VALS.base_is_bottom_layer) { - gimp_drawable_offsets (GIMP_DRAWABLE (background), &orig_x, &orig_y); + gimp_drawable_get_offsets (GIMP_DRAWABLE (background), &orig_x, &orig_y); align_layers_get_align_offsets (GIMP_DRAWABLE (background), &offset_x, @@ -559,7 +559,7 @@ align_layers_perform_alignment (GimpLayer **layers, gint offset_x; gint offset_y; - gimp_drawable_offsets (GIMP_DRAWABLE (layers[index]), &orig_x, &orig_y); + gimp_drawable_get_offsets (GIMP_DRAWABLE (layers[index]), &orig_x, &orig_y); align_layers_get_align_offsets (GIMP_DRAWABLE (layers[index]), &offset_x, @@ -615,8 +615,8 @@ align_layers_get_align_offsets (GimpDrawable *drawable, gint *x, gint *y) { - gint width = gimp_drawable_width (drawable); - gint height = gimp_drawable_height (drawable); + gint width = gimp_drawable_get_width (drawable); + gint height = gimp_drawable_get_height (drawable); switch (VALS.h_base) { diff --git a/plug-ins/common/animation-optimize.c b/plug-ins/common/animation-optimize.c index be05aee7dc..dea6cd5fdc 100644 --- a/plug-ins/common/animation-optimize.c +++ b/plug-ins/common/animation-optimize.c @@ -424,10 +424,10 @@ compose_row (gint frame_num, total_alpha (dest, dest_width, pixelstep); } - gimp_drawable_offsets (drawable, &rawx, &rawy); + gimp_drawable_get_offsets (drawable, &rawx, &rawy); - rawwidth = gimp_drawable_width (drawable); - rawheight = gimp_drawable_height (drawable); + rawwidth = gimp_drawable_get_width (drawable); + rawheight = gimp_drawable_get_height (drawable); /* this frame has nothing to give us for this row; return */ if (row_num >= rawheight + rawy || @@ -762,7 +762,7 @@ do_optimizations (GimpRunMode run_mode, /* Image has been closed/etc since we got the layer list? */ /* FIXME - How do we tell if a gimp_drawable_get() fails? */ - if (gimp_drawable_width (drawable) == 0) + if (gimp_drawable_get_width (drawable) == 0) { gimp_quit (); } diff --git a/plug-ins/common/checkerboard.c b/plug-ins/common/checkerboard.c index 93f8ca1e67..a7286f63cb 100644 --- a/plug-ins/common/checkerboard.c +++ b/plug-ins/common/checkerboard.c @@ -335,7 +335,7 @@ do_checkerboard_pattern (GimpDrawable *drawable, gimp_preview_get_position (preview, &x1, &y1); gimp_preview_get_size (preview, &width, &height); - bpp = gimp_drawable_bpp (drawable); + bpp = gimp_drawable_get_bpp (drawable); buffer = g_new (guchar, width * height * bpp); for (i = 0; i < width * height; i++) @@ -524,8 +524,8 @@ checkerboard_dialog (GimpImage *image, gimp_image_get_resolution (image, &xres, &yres); unit = gimp_image_get_unit (image); - width = gimp_drawable_width (drawable); - height = gimp_drawable_height (drawable); + width = gimp_drawable_get_width (drawable); + height = gimp_drawable_get_height (drawable); size = MIN (width, height); size_entry = gimp_size_entry_new (1, unit, "%a", diff --git a/plug-ins/common/colormap-remap.c b/plug-ins/common/colormap-remap.c index 75c59b7728..7affd67b8c 100644 --- a/plug-ins/common/colormap-remap.c +++ b/plug-ins/common/colormap-remap.c @@ -386,7 +386,7 @@ remap (GimpImage *image, for (list = layers; list; list = list->next) pixels += - gimp_drawable_width (list->data) * gimp_drawable_height (list->data); + gimp_drawable_get_width (list->data) * gimp_drawable_get_height (list->data); for (list = layers; list; list = list->next) { diff --git a/plug-ins/common/compose.c b/plug-ins/common/compose.c index b42cf4e8d4..7856a7055c 100644 --- a/plug-ins/common/compose.c +++ b/plug-ins/common/compose.c @@ -979,8 +979,8 @@ compose (const gchar *compose_type, { GimpImage *first_image = gimp_item_get_image (inputs[first_object].comp.object); - width = gimp_drawable_width (inputs[first_object].comp.object); - height = gimp_drawable_height (inputs[first_object].comp.object); + width = gimp_drawable_get_width (inputs[first_object].comp.object); + height = gimp_drawable_get_height (inputs[first_object].comp.object); precision = gimp_image_get_precision (first_image); @@ -988,8 +988,8 @@ compose (const gchar *compose_type, { if (inputs[j].is_object) { - if ((width != gimp_drawable_width (inputs[j].comp.object)) || - (height != gimp_drawable_height (inputs[j].comp.object))) + if ((width != gimp_drawable_get_width (inputs[j].comp.object)) || + (height != gimp_drawable_get_height (inputs[j].comp.object))) { g_message (_("Drawables have different size")); return NULL; @@ -1093,8 +1093,8 @@ compose (const gchar *compose_type, gimp_drawable_merge_shadow (GIMP_DRAWABLE (layer_dst), TRUE); gimp_drawable_update (GIMP_DRAWABLE (layer_dst), 0, 0, - gimp_drawable_width (GIMP_DRAWABLE (layer_dst)), - gimp_drawable_height (GIMP_DRAWABLE (layer_dst))); + gimp_drawable_get_width (GIMP_DRAWABLE (layer_dst)), + gimp_drawable_get_height (GIMP_DRAWABLE (layer_dst))); return image_dst; } @@ -1167,8 +1167,8 @@ compose_dialog (const gchar *compose_type, } /* Save original image width/height */ - composeint.width = gimp_drawable_width (drawable); - composeint.height = gimp_drawable_height (drawable); + composeint.width = gimp_drawable_get_width (drawable); + composeint.height = gimp_drawable_get_height (drawable); gimp_ui_init (PLUG_IN_BINARY); diff --git a/plug-ins/common/curve-bend.c b/plug-ins/common/curve-bend.c index 1f7005bfed..fb10524b89 100644 --- a/plug-ins/common/curve-bend.c +++ b/plug-ins/common/curve-bend.c @@ -2357,8 +2357,8 @@ p_render_preview (BenderDialog *cd, t_GDRW l_gdrw; t_GDRW *gdrw; - width = gimp_drawable_width (GIMP_DRAWABLE (layer)); - height = gimp_drawable_height (GIMP_DRAWABLE (layer)); + width = gimp_drawable_get_width (GIMP_DRAWABLE (layer)); + height = gimp_drawable_get_height (GIMP_DRAWABLE (layer)); ptr = buf = g_new (guchar, PREVIEW_BPP * PREVIEW_SIZE_X * PREVIEW_SIZE_Y); gdrw = &l_gdrw; @@ -2548,8 +2548,8 @@ p_init_gdrw (t_GDRW *gdrw, else gdrw->buffer = gimp_drawable_get_buffer (drawable); - gdrw->width = gimp_drawable_width (gdrw->drawable); - gdrw->height = gimp_drawable_height (gdrw->drawable); + gdrw->width = gimp_drawable_get_width (gdrw->drawable); + gdrw->height = gimp_drawable_get_height (gdrw->drawable); gdrw->tile_width = gimp_tile_width (); gdrw->tile_height = gimp_tile_height (); @@ -2679,8 +2679,8 @@ p_create_pv_image (GimpDrawable *src_drawable, gint src_width; gint src_height; - src_width = gimp_drawable_width (src_drawable); - src_height = gimp_drawable_height (src_drawable); + src_width = gimp_drawable_get_width (src_drawable); + src_height = gimp_drawable_get_height (src_drawable); new_image = gimp_image_new (PREVIEW_SIZE_X, PREVIEW_SIZE_Y, gimp_image_get_base_type (gimp_item_get_image (GIMP_ITEM (src_drawable)))); @@ -3217,10 +3217,10 @@ p_main_bend (BenderDialog *cd, interpolation = cd->smoothing; image = gimp_item_get_image (GIMP_ITEM (original_drawable)); - gimp_drawable_offsets (original_drawable, &offset_x, &offset_y); + gimp_drawable_get_offsets (original_drawable, &offset_x, &offset_y); - center_x = offset_x + (gimp_drawable_width (original_drawable) / 2 ); - center_y = offset_y + (gimp_drawable_height (original_drawable) / 2 ); + center_x = offset_x + (gimp_drawable_get_width (original_drawable) / 2 ); + center_y = offset_y + (gimp_drawable_get_height (original_drawable) / 2 ); /* always copy original_drawable to a tmp src_layer */ tmp_layer = gimp_layer_copy (GIMP_LAYER (original_drawable)); @@ -3245,8 +3245,8 @@ p_main_bend (BenderDialog *cd, src_drawable = GIMP_DRAWABLE (tmp_layer); - src_width = gimp_drawable_width (GIMP_DRAWABLE (tmp_layer)); - src_height = gimp_drawable_height (GIMP_DRAWABLE (tmp_layer)); + src_width = gimp_drawable_get_width (GIMP_DRAWABLE (tmp_layer)); + src_height = gimp_drawable_get_height (GIMP_DRAWABLE (tmp_layer)); xmax = ymax = src_width -1; cd->curve_ptr[OUTLINE_UPPER] = g_new (gint32, 1+xmax); @@ -3307,8 +3307,8 @@ p_main_bend (BenderDialog *cd, /* set offsets of the resulting new layer *(center == center of original_drawable) */ - offset_x = center_x - (gimp_drawable_width (dst_drawable) / 2 ); - offset_y = center_y - (gimp_drawable_height (dst_drawable) / 2 ); + offset_x = center_x - (gimp_drawable_get_width (dst_drawable) / 2 ); + offset_y = center_y - (gimp_drawable_get_height (dst_drawable) / 2 ); gimp_layer_set_offsets (GIMP_LAYER (dst_drawable), offset_x, offset_y); /* delete the temp layer */ diff --git a/plug-ins/common/depth-merge.c b/plug-ins/common/depth-merge.c index 2e4e7dc666..d45693b93c 100644 --- a/plug-ins/common/depth-merge.c +++ b/plug-ins/common/depth-merge.c @@ -980,10 +980,10 @@ dm_constraint (GimpImage *image, DepthMerge *dm = data; GimpDrawable *drawable = GIMP_DRAWABLE (item); - return ((gimp_drawable_width (drawable) == - gimp_drawable_width (dm->resultDrawable)) && - (gimp_drawable_height (drawable) == - gimp_drawable_height (dm->resultDrawable)) && + return ((gimp_drawable_get_width (drawable) == + gimp_drawable_get_width (dm->resultDrawable)) && + (gimp_drawable_get_height (drawable) == + gimp_drawable_get_height (dm->resultDrawable)) && ((gimp_drawable_is_rgb (drawable) && (gimp_drawable_is_rgb (dm->resultDrawable))) || gimp_drawable_is_gray (drawable))); diff --git a/plug-ins/common/file-aa.c b/plug-ins/common/file-aa.c index b120d6f76a..065e9c1c03 100644 --- a/plug-ins/common/file-aa.c +++ b/plug-ins/common/file-aa.c @@ -252,8 +252,8 @@ save_aa (GFile *file, memcpy (&format, aa_formats[output_type], sizeof (aa_format)); - format.width = gimp_drawable_width (drawable) / 2; - format.height = gimp_drawable_height (drawable) / 2; + format.width = gimp_drawable_get_width (drawable) / 2; + format.height = gimp_drawable_get_height (drawable) / 2; /* Get a libaa context which will save its output to filename. */ savedata.name = g_file_get_path (file); diff --git a/plug-ins/common/file-cel.c b/plug-ins/common/file-cel.c index f9c5316055..da4667284d 100644 --- a/plug-ins/common/file-cel.c +++ b/plug-ins/common/file-cel.c @@ -838,7 +838,7 @@ save_image (GFile *file, } /* Find out how offset this layer was */ - gimp_drawable_offsets (drawable, &offx, &offy); + gimp_drawable_get_offsets (drawable, &offx, &offy); buffer = gimp_drawable_get_buffer (drawable); diff --git a/plug-ins/common/file-gif-save.c b/plug-ins/common/file-gif-save.c index 7c52c377e4..dfbb2aff7c 100644 --- a/plug-ins/common/file-gif-save.c +++ b/plug-ins/common/file-gif-save.c @@ -682,12 +682,12 @@ sanity_check (GFile *file, gint offset_x; gint offset_y; - gimp_drawable_offsets (drawable, &offset_x, &offset_y); + gimp_drawable_get_offsets (drawable, &offset_x, &offset_y); if (offset_x < 0 || offset_y < 0 || - offset_x + gimp_drawable_width (drawable) > image_width || - offset_y + gimp_drawable_height (drawable) > image_height) + offset_x + gimp_drawable_get_width (drawable) > image_width || + offset_y + gimp_drawable_get_height (drawable) > image_height) { g_list_free (layers); @@ -974,9 +974,9 @@ save_image (GFile *file, drawable_type = gimp_drawable_type (drawable); buffer = gimp_drawable_get_buffer (drawable); - gimp_drawable_offsets (drawable, &offset_x, &offset_y); - cols = gimp_drawable_width (drawable); - rows = gimp_drawable_height (drawable); + gimp_drawable_get_offsets (drawable, &offset_x, &offset_y); + cols = gimp_drawable_get_width (drawable); + rows = gimp_drawable_get_height (drawable); rowstride = cols; pixels = g_new (guchar, (cols * rows * diff --git a/plug-ins/common/file-heif.c b/plug-ins/common/file-heif.c index 4292eec881..546c09f948 100644 --- a/plug-ins/common/file-heif.c +++ b/plug-ins/common/file-heif.c @@ -1468,8 +1468,8 @@ save_image (GFile *file, gimp_progress_init_printf (_("Exporting '%s'"), g_file_get_parse_name (file)); - width = gimp_drawable_width (drawable); - height = gimp_drawable_height (drawable); + width = gimp_drawable_get_width (drawable); + height = gimp_drawable_get_height (drawable); has_alpha = gimp_drawable_has_alpha (drawable); diff --git a/plug-ins/common/file-mng.c b/plug-ins/common/file-mng.c index 4f5f48e6ef..f05925edb2 100644 --- a/plug-ins/common/file-mng.c +++ b/plug-ins/common/file-mng.c @@ -1086,7 +1086,7 @@ mng_save_image (GFile *file, layer_cols = gegl_buffer_get_width (layer_buffer); layer_rows = gegl_buffer_get_height (layer_buffer); - gimp_drawable_offsets (GIMP_DRAWABLE (layers[i]), + gimp_drawable_get_offsets (GIMP_DRAWABLE (layers[i]), &layer_offset_x, &layer_offset_y); layer_has_unique_palette = TRUE; diff --git a/plug-ins/common/file-pcx.c b/plug-ins/common/file-pcx.c index 050af32a74..2f55dbbaba 100644 --- a/plug-ins/common/file-pcx.c +++ b/plug-ins/common/file-pcx.c @@ -787,7 +787,7 @@ save_image (GFile *file, gboolean padding = FALSE; drawable_type = gimp_drawable_type (drawable); - gimp_drawable_offsets (drawable, &offset_x, &offset_y); + gimp_drawable_get_offsets (drawable, &offset_x, &offset_y); buffer = gimp_drawable_get_buffer (drawable); diff --git a/plug-ins/common/file-pdf-save.c b/plug-ins/common/file-pdf-save.c index 0b150cade5..3adbf15c1f 100644 --- a/plug-ins/common/file-pdf-save.c +++ b/plug-ins/common/file-pdf-save.c @@ -1608,7 +1608,7 @@ get_layer_color (GimpLayer *layer, return col; } - if (gimp_drawable_bpp (GIMP_DRAWABLE (layer)) >= 3) + if (gimp_drawable_get_bpp (GIMP_DRAWABLE (layer)) >= 3) { /* Are we in RGB mode? */ @@ -1702,7 +1702,7 @@ drawText (GimpLayer *layer, cairo_get_font_options (cr, options); /* Position */ - gimp_drawable_offsets (GIMP_DRAWABLE (layer), &x, &y); + gimp_drawable_get_offsets (GIMP_DRAWABLE (layer), &x, &y); cairo_translate (cr, x, y); /* Color */ @@ -1828,11 +1828,11 @@ drawText (GimpLayer *layer, /* Width */ if (! PANGO_GRAVITY_IS_VERTICAL (pango_context_get_base_gravity (context))) pango_layout_set_width (layout, - gimp_drawable_width (GIMP_DRAWABLE (layer)) * + gimp_drawable_get_width (GIMP_DRAWABLE (layer)) * PANGO_SCALE); else pango_layout_set_width (layout, - gimp_drawable_height (GIMP_DRAWABLE (layer)) * + gimp_drawable_get_height (GIMP_DRAWABLE (layer)) * PANGO_SCALE); /* Justification, and Alignment */ @@ -1884,14 +1884,14 @@ drawText (GimpLayer *layer, if (dir == GIMP_TEXT_DIRECTION_TTB_RTL || dir == GIMP_TEXT_DIRECTION_TTB_RTL_UPRIGHT) { - cairo_translate (cr, gimp_drawable_width (GIMP_DRAWABLE (layer)), 0); + cairo_translate (cr, gimp_drawable_get_width (GIMP_DRAWABLE (layer)), 0); cairo_rotate (cr, G_PI_2); } if (dir == GIMP_TEXT_DIRECTION_TTB_LTR || dir == GIMP_TEXT_DIRECTION_TTB_LTR_UPRIGHT) { - cairo_translate (cr, 0, gimp_drawable_height (GIMP_DRAWABLE (layer))); + cairo_translate (cr, 0, gimp_drawable_get_height (GIMP_DRAWABLE (layer))); cairo_rotate (cr, -G_PI_2); } @@ -1978,7 +1978,7 @@ draw_layer (GimpLayer **layers, return FALSE; } - gimp_drawable_offsets (GIMP_DRAWABLE (layer), &x, &y); + gimp_drawable_get_offsets (GIMP_DRAWABLE (layer), &x, &y); if (! gimp_item_is_text_layer (GIMP_ITEM (layer)) || optimize.convert_text) { @@ -1990,8 +1990,8 @@ draw_layer (GimpLayer **layers, layer_color = get_layer_color (layer, &single_color); cairo_rectangle (cr, x, y, - gimp_drawable_width (GIMP_DRAWABLE (layer)), - gimp_drawable_height (GIMP_DRAWABLE (layer))); + gimp_drawable_get_width (GIMP_DRAWABLE (layer)), + gimp_drawable_get_height (GIMP_DRAWABLE (layer))); if (optimize.vectorize && single_color) { diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c index d675b9ba98..8863bcd04a 100644 --- a/plug-ins/common/file-png.c +++ b/plug-ins/common/file-png.c @@ -1745,7 +1745,7 @@ save_image (GFile *file, if (save_offs) { - gimp_drawable_offsets (drawable, &offx, &offy); + gimp_drawable_get_offsets (drawable, &offx, &offy); if (offx != 0 || offy != 0) png_set_oFFs (pp, info, offx, offy, PNG_OFFSET_PIXEL); } diff --git a/plug-ins/common/file-tga.c b/plug-ins/common/file-tga.c index e6bd70b312..e6f9e41502 100644 --- a/plug-ins/common/file-tga.c +++ b/plug-ins/common/file-tga.c @@ -1117,7 +1117,7 @@ ReadImage (FILE *fp, buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (layer)); - bpp = gimp_drawable_bpp (GIMP_DRAWABLE (layer)); + bpp = gimp_drawable_get_bpp (GIMP_DRAWABLE (layer)); /* Allocate the data. */ max_tileheight = gimp_tile_height (); diff --git a/plug-ins/common/file-xbm.c b/plug-ins/common/file-xbm.c index c3cd26fc61..fc556e6bf1 100644 --- a/plug-ins/common/file-xbm.c +++ b/plug-ins/common/file-xbm.c @@ -1036,7 +1036,7 @@ save_image (GFile *file, buffer = gimp_drawable_get_buffer (drawable); width = gegl_buffer_get_width (buffer); height = gegl_buffer_get_height (buffer); - bpp = gimp_drawable_bpp (drawable); + bpp = gimp_drawable_get_bpp (drawable); /* Figure out which color is black, and which is white. */ dark = 0; @@ -1338,7 +1338,7 @@ save_dialog (GimpDrawable *drawable, spinbutton = gimp_prop_spin_button_new (config, "hot-spot-x", 1, 10, 0); gtk_spin_button_set_range (GTK_SPIN_BUTTON (spinbutton), - 0, gimp_drawable_width (drawable) - 1); + 0, gimp_drawable_get_width (drawable) - 1); gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0, _("Hot spot _X:"), 0.0, 0.5, spinbutton, 1); @@ -1346,7 +1346,7 @@ save_dialog (GimpDrawable *drawable, spinbutton = gimp_prop_spin_button_new (config, "hot-spot-y", 1, 10, 0); gtk_spin_button_set_range (GTK_SPIN_BUTTON (spinbutton), - 0, gimp_drawable_width (drawable) - 1); + 0, gimp_drawable_get_width (drawable) - 1); gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1, _("Hot spot _Y:"), 0.0, 0.5, spinbutton, 1); diff --git a/plug-ins/common/file-xmc.c b/plug-ins/common/file-xmc.c index 5810b876a1..e41ec92741 100644 --- a/plug-ins/common/file-xmc.c +++ b/plug-ins/common/file-xmc.c @@ -1440,7 +1440,7 @@ save_image (GFile *file, /* get framename of this layer */ framename = gimp_item_get_name (GIMP_ITEM (drawable)); /* get offset of this layer. */ - gimp_drawable_offsets (drawable, &layer_xoffset, &layer_yoffset); + gimp_drawable_get_offsets (drawable, &layer_xoffset, &layer_yoffset); /* * layer dimension check. @@ -2244,7 +2244,7 @@ get_intersection_of_frames (GimpImage *image) { GimpDrawable *drawable = list->data; - if (! gimp_drawable_offsets (drawable, &x_off, &y_off)) + if (! gimp_drawable_get_offsets (drawable, &x_off, &y_off)) { g_list_free (layers); return NULL; @@ -2252,8 +2252,8 @@ get_intersection_of_frames (GimpImage *image) x1 = MAX (x1, x_off); y1 = MAX (y1, y_off); - x2 = MIN (x2, x_off + gimp_drawable_width (drawable) - 1); - y2 = MIN (y2, y_off + gimp_drawable_height (drawable) - 1); + x2 = MIN (x2, x_off + gimp_drawable_get_width (drawable) - 1); + y2 = MIN (y2, y_off + gimp_drawable_get_height (drawable) - 1); } g_list_free (layers); diff --git a/plug-ins/common/gradient-map.c b/plug-ins/common/gradient-map.c index 5a927bdd67..c9ea61013b 100644 --- a/plug-ins/common/gradient-map.c +++ b/plug-ins/common/gradient-map.c @@ -255,8 +255,8 @@ map_run (GimpProcedure *procedure, gimp_drawable_merge_shadow (drawable, TRUE); gimp_drawable_update (drawable, 0, 0, - gimp_drawable_width (drawable), - gimp_drawable_height (drawable)); + gimp_drawable_get_width (drawable), + gimp_drawable_get_height (drawable)); if (run_mode != GIMP_RUN_NONINTERACTIVE) gimp_displays_flush (); diff --git a/plug-ins/common/grid.c b/plug-ins/common/grid.c index 067e9fe29a..1539283779 100644 --- a/plug-ins/common/grid.c +++ b/plug-ins/common/grid.c @@ -750,8 +750,8 @@ dialog (GimpImage *image, gimp_ui_init (PLUG_IN_BINARY); - d_width = gimp_drawable_width (drawable); - d_height = gimp_drawable_height (drawable); + d_width = gimp_drawable_get_width (drawable); + d_height = gimp_drawable_get_height (drawable); main_dialog = dlg = gimp_dialog_new (_("Grid"), PLUG_IN_ROLE, NULL, 0, diff --git a/plug-ins/common/hot.c b/plug-ins/common/hot.c index d8941c1a5e..3cc4444cb3 100644 --- a/plug-ins/common/hot.c +++ b/plug-ins/common/hot.c @@ -392,8 +392,8 @@ pluginCore (GimpImage *image, gdouble pr, pg, pb; gdouble py; - width = gimp_drawable_width (drawable); - height = gimp_drawable_height (drawable); + width = gimp_drawable_get_width (drawable); + height = gimp_drawable_get_height (drawable); if (gimp_drawable_has_alpha (drawable)) src_format = babl_format ("R'G'B'A u8"); diff --git a/plug-ins/common/jigsaw.c b/plug-ins/common/jigsaw.c index 0a3d62bdab..7aa1383ecc 100644 --- a/plug-ins/common/jigsaw.c +++ b/plug-ins/common/jigsaw.c @@ -537,8 +537,8 @@ jigsaw (GimpDrawable *drawable, { gegl_buffer = gimp_drawable_get_buffer (drawable); - width = gimp_drawable_width (drawable); - height = gimp_drawable_height (drawable); + width = gimp_drawable_get_width (drawable); + height = gimp_drawable_get_height (drawable); if (gimp_drawable_has_alpha (drawable)) format = babl_format ("R'G'B'A u8"); diff --git a/plug-ins/common/qbist.c b/plug-ins/common/qbist.c index 6902b9df28..c279980945 100644 --- a/plug-ins/common/qbist.c +++ b/plug-ins/common/qbist.c @@ -264,8 +264,8 @@ qbist_run (GimpProcedure *procedure, config = gimp_procedure_create_config (procedure); gimp_procedure_config_begin_run (config, image, run_mode, args); - img_width = gimp_drawable_width (drawable); - img_height = gimp_drawable_height (drawable); + img_width = gimp_drawable_get_width (drawable); + img_height = gimp_drawable_get_height (drawable); if (! gimp_drawable_is_rgb (drawable)) { diff --git a/plug-ins/common/sample-colorize.c b/plug-ins/common/sample-colorize.c index d1d46982f6..1449e51f66 100644 --- a/plug-ins/common/sample-colorize.c +++ b/plug-ins/common/sample-colorize.c @@ -2546,15 +2546,15 @@ init_gdrw (t_GDRW *gdrw, else gdrw->buffer = gimp_drawable_get_buffer (drawable); - gdrw->width = gimp_drawable_width (drawable); - gdrw->height = gimp_drawable_height (drawable); + gdrw->width = gimp_drawable_get_width (drawable); + gdrw->height = gimp_drawable_get_height (drawable); gdrw->tile_width = gimp_tile_width (); gdrw->tile_height = gimp_tile_height (); gdrw->shadow = shadow; gdrw->seldeltax = 0; gdrw->seldeltay = 0; /* get offsets within the image */ - gimp_drawable_offsets (gdrw->drawable, &offsetx, &offsety); + gimp_drawable_get_offsets (gdrw->drawable, &offsetx, &offsety); if (! gimp_drawable_mask_intersect (gdrw->drawable, &gdrw->x1, &gdrw->y1, &w, &h)) @@ -2596,8 +2596,8 @@ init_gdrw (t_GDRW *gdrw, sel_gdrw->buffer = gimp_drawable_get_buffer (sel_channel); sel_gdrw->format = babl_format ("Y u8"); - sel_gdrw->width = gimp_drawable_width (sel_channel); - sel_gdrw->height = gimp_drawable_height (sel_channel); + sel_gdrw->width = gimp_drawable_get_width (sel_channel); + sel_gdrw->height = gimp_drawable_get_height (sel_channel); sel_gdrw->tile_width = gimp_tile_width (); sel_gdrw->tile_height = gimp_tile_height (); @@ -2615,7 +2615,7 @@ init_gdrw (t_GDRW *gdrw, /* offset delta between drawable and selection * (selection always has image size and should always have offsets of 0 ) */ - gimp_drawable_offsets (sel_channel, &sel_offsetx, &sel_offsety); + gimp_drawable_get_offsets (sel_channel, &sel_offsetx, &sel_offsety); gdrw->seldeltax = offsetx - sel_offsetx; gdrw->seldeltay = offsety - sel_offsety; diff --git a/plug-ins/common/sparkle.c b/plug-ins/common/sparkle.c index d0f9578fb9..0dc036434e 100644 --- a/plug-ins/common/sparkle.c +++ b/plug-ins/common/sparkle.c @@ -840,8 +840,8 @@ sparkle (GimpDrawable *drawable, if (width < 1 || height < 1) return; - d_width = gimp_drawable_width (drawable); - d_height = gimp_drawable_height (drawable); + d_width = gimp_drawable_get_width (drawable); + d_height = gimp_drawable_get_height (drawable); gr = g_rand_new (); diff --git a/plug-ins/common/tile.c b/plug-ins/common/tile.c index 545032cfc9..8ad2c98d9a 100644 --- a/plug-ins/common/tile.c +++ b/plug-ins/common/tile.c @@ -356,8 +356,8 @@ tile (GimpImage *image, GeglBuffer *src_buffer; gint dst_width = tvals.new_width; gint dst_height = tvals.new_height; - gint src_width = gimp_drawable_width (drawable); - gint src_height = gimp_drawable_height (drawable); + gint src_width = gimp_drawable_get_width (drawable); + gint src_height = gimp_drawable_get_height (drawable); GimpImageBaseType image_type = GIMP_RGB; @@ -476,8 +476,8 @@ tile_dialog (GimpImage *image, gimp_ui_init (PLUG_IN_BINARY); - width = gimp_drawable_width (drawable); - height = gimp_drawable_height (drawable); + width = gimp_drawable_get_width (drawable); + height = gimp_drawable_get_height (drawable); unit = gimp_image_get_unit (image); gimp_image_get_resolution (image, &xres, &yres); diff --git a/plug-ins/common/van-gogh-lic.c b/plug-ins/common/van-gogh-lic.c index 4f7d9eddc2..9a6cfecd78 100644 --- a/plug-ins/common/van-gogh-lic.c +++ b/plug-ins/common/van-gogh-lic.c @@ -496,7 +496,7 @@ rgb_to_hsl (GimpDrawable *drawable, gr = g_rand_new (); - maxc = gimp_drawable_width (drawable) * gimp_drawable_height (drawable); + maxc = gimp_drawable_get_width (drawable) * gimp_drawable_get_height (drawable); buffer = gimp_drawable_get_buffer (drawable); @@ -645,8 +645,8 @@ compute_image (GimpDrawable *drawable) effect_image = gimp_drawable_get_by_id (licvals.effect_image_id); - effect_width = gimp_drawable_width (effect_image); - effect_height = gimp_drawable_height (effect_image); + effect_width = gimp_drawable_get_width (effect_image); + effect_height = gimp_drawable_get_height (effect_image); switch (licvals.effect_channel) { diff --git a/plug-ins/common/warp.c b/plug-ins/common/warp.c index 9bab711bff..238b3bf4aa 100644 --- a/plug-ins/common/warp.c +++ b/plug-ins/common/warp.c @@ -893,8 +893,8 @@ blur16 (GimpDrawable *drawable) x2 = x1 + width; y2 = y1 + height; - width = gimp_drawable_width (drawable); /* size of input drawable*/ - height = gimp_drawable_height (drawable); + width = gimp_drawable_get_width (drawable); /* size of input drawable*/ + height = gimp_drawable_get_height (drawable); format = get_u8_format (drawable); @@ -1099,8 +1099,8 @@ diff (GimpDrawable *drawable, /* Get the size of the input image. (This will/must be the same * as the size of the output image. */ - width = gimp_drawable_width (drawable); - height = gimp_drawable_height (drawable); + width = gimp_drawable_get_width (drawable); + height = gimp_drawable_get_height (drawable); src_format = get_u8_format (drawable); src_bytes = babl_format_get_bytes_per_pixel (src_format); @@ -1438,8 +1438,8 @@ warp (GimpDrawable *orig_draw) x2 = x1 + width; y2 = y1 + height; - width = gimp_drawable_width (orig_draw); - height = gimp_drawable_height (orig_draw); + width = gimp_drawable_get_width (orig_draw); + height = gimp_drawable_get_height (orig_draw); /* generate x,y differential images (arrays) */ diff (disp_map, &map_x, &map_y); @@ -1538,8 +1538,8 @@ warp_one (GimpDrawable *draw, x2 = x1 + width; y2 = y1 + height; - width = gimp_drawable_width (draw); - height = gimp_drawable_height (draw); + width = gimp_drawable_get_width (draw); + height = gimp_drawable_get_height (draw); max_progress = (x2 - x1) * (y2 - y1); @@ -1922,6 +1922,6 @@ warp_map_constrain (GimpImage *image, { GimpDrawable *d = data; - return (gimp_drawable_width (GIMP_DRAWABLE (item)) == gimp_drawable_width (d) && - gimp_drawable_height (GIMP_DRAWABLE (item)) == gimp_drawable_height (d)); + return (gimp_drawable_get_width (GIMP_DRAWABLE (item)) == gimp_drawable_get_width (d) && + gimp_drawable_get_height (GIMP_DRAWABLE (item)) == gimp_drawable_get_height (d)); } diff --git a/plug-ins/file-bmp/bmp-save.c b/plug-ins/file-bmp/bmp-save.c index 7fdbdf9c55..0a534accf3 100644 --- a/plug-ins/file-bmp/bmp-save.c +++ b/plug-ins/file-bmp/bmp-save.c @@ -152,8 +152,8 @@ save_image (GFile *file, buffer = gimp_drawable_get_buffer (drawable); drawable_type = gimp_drawable_type (drawable); - drawable_width = gimp_drawable_width (drawable); - drawable_height = gimp_drawable_height (drawable); + drawable_width = gimp_drawable_get_width (drawable); + drawable_height = gimp_drawable_get_height (drawable); switch (drawable_type) { diff --git a/plug-ins/file-dds/ddswrite.c b/plug-ins/file-dds/ddswrite.c index 57d84690a8..177387305a 100644 --- a/plug-ins/file-dds/ddswrite.c +++ b/plug-ins/file-dds/ddswrite.c @@ -173,8 +173,8 @@ check_mipmaps (GimpImage *image, if (type != gimp_drawable_type (list->data)) return 0; - if ((gimp_drawable_width (list->data) == w) && - (gimp_drawable_height (list->data) == h)) + if ((gimp_drawable_get_width (list->data) == w) && + (gimp_drawable_get_height (list->data) == h)) ++num_surfaces; } @@ -187,8 +187,8 @@ check_mipmaps (GimpImage *image, { GimpDrawable *drawable = g_list_nth_data (layers, i); - if ((gimp_drawable_width (drawable) != w) || - (gimp_drawable_height (drawable) != h)) + if ((gimp_drawable_get_width (drawable) != w) || + (gimp_drawable_get_height (drawable) != h)) { valid = FALSE; break; @@ -202,8 +202,8 @@ check_mipmaps (GimpImage *image, miph = h >> j; if (mipw < 1) mipw = 1; if (miph < 1) miph = 1; - if ((gimp_drawable_width (drawable) != mipw) || - (gimp_drawable_height (drawable) != miph)) + if ((gimp_drawable_get_width (drawable) != mipw) || + (gimp_drawable_get_height (drawable) != miph)) { valid = FALSE; break; @@ -253,8 +253,8 @@ check_cubemap (GimpImage *image) { GimpDrawable *drawable = list->data; - if ((gimp_drawable_width (drawable) != w) || - (gimp_drawable_height (drawable) != h)) + if ((gimp_drawable_get_width (drawable) != w) || + (gimp_drawable_get_height (drawable) != h)) continue; layer_name = (char *) gimp_item_get_name (GIMP_ITEM (drawable)); @@ -339,13 +339,13 @@ check_cubemap (GimpImage *image) /* make sure they are all the same size */ if (cubemap) { - w = gimp_drawable_width (GIMP_DRAWABLE (cubemap_faces[0])); - h = gimp_drawable_height (GIMP_DRAWABLE (cubemap_faces[0])); + w = gimp_drawable_get_width (GIMP_DRAWABLE (cubemap_faces[0])); + h = gimp_drawable_get_height (GIMP_DRAWABLE (cubemap_faces[0])); for (i = 1; i < 6 && cubemap; ++i) { - if ((gimp_drawable_width (GIMP_DRAWABLE (cubemap_faces[i])) != w) || - (gimp_drawable_height (GIMP_DRAWABLE (cubemap_faces[i])) != h)) + if ((gimp_drawable_get_width (GIMP_DRAWABLE (cubemap_faces[i])) != w) || + (gimp_drawable_get_height (GIMP_DRAWABLE (cubemap_faces[i])) != h)) cubemap = FALSE; } } @@ -384,15 +384,15 @@ check_volume (GimpImage *image) volume = TRUE; /* make sure all layers are the same size */ - w = gimp_drawable_width (layers->data); - h = gimp_drawable_height (layers->data); + w = gimp_drawable_get_width (layers->data); + h = gimp_drawable_get_height (layers->data); for (i = 1, list = layers->next; i < num_layers && volume; ++i, list = g_list_next (list)) { - if ((gimp_drawable_width (list->data) != w) || - (gimp_drawable_height (list->data) != h)) + if ((gimp_drawable_get_width (list->data) != w) || + (gimp_drawable_get_height (list->data) != h)) volume = FALSE; } @@ -437,15 +437,15 @@ check_array (GimpImage *image) array = TRUE; /* make sure all layers are the same size */ - w = gimp_drawable_width (layers->data); - h = gimp_drawable_height (layers->data); + w = gimp_drawable_get_width (layers->data); + h = gimp_drawable_get_height (layers->data); for (i = 1, list = g_list_next (layers); i < num_layers && array; ++i, list = g_list_next (list)) { - if ((gimp_drawable_width (list->data) != w) || - (gimp_drawable_height (list->data) != h)) + if ((gimp_drawable_get_width (list->data) != w) || + (gimp_drawable_get_height (list->data) != h)) array = FALSE; } @@ -492,8 +492,8 @@ get_array_size (GimpImage *image) i < num_layers; ++i, list = g_list_next (list)) { - if ((gimp_drawable_width (list->data) == w) && - (gimp_drawable_height (list->data) == h)) + if ((gimp_drawable_get_width (list->data) == w) && + (gimp_drawable_get_height (list->data) == h)) { elements++; } @@ -1347,8 +1347,8 @@ write_image (FILE *fp, if (savetype == DDS_SAVE_SELECTED_LAYER) { - w = gimp_drawable_width (drawable); - h = gimp_drawable_height (drawable); + w = gimp_drawable_get_width (drawable); + h = gimp_drawable_get_height (drawable); } else { @@ -1713,8 +1713,8 @@ write_image (FILE *fp, i < num_layers; ++i, list = g_list_next (layers)) { - if ((gimp_drawable_width (list->data) == w) && - (gimp_drawable_height (list->data) == h)) + if ((gimp_drawable_get_width (list->data) == w) && + (gimp_drawable_get_height (list->data) == h)) { write_layer (fp, image, list->data, config, w, h, bpp, fmtbpp, num_mipmaps); diff --git a/plug-ins/file-fli/fli-gimp.c b/plug-ins/file-fli/fli-gimp.c index 93f4eff376..58f3530f9b 100644 --- a/plug-ins/file-fli/fli-gimp.c +++ b/plug-ins/file-fli/fli-gimp.c @@ -823,7 +823,7 @@ save_image (GFile *file, cols = gegl_buffer_get_width (buffer); rows = gegl_buffer_get_height (buffer); - gimp_drawable_offsets (drawable, &offset_x, &offset_y); + gimp_drawable_get_offsets (drawable, &offset_x, &offset_y); bytes = babl_format_get_bytes_per_pixel (format); diff --git a/plug-ins/file-ico/ico-dialog.c b/plug-ins/file-ico/ico-dialog.c index ff7c8e6fb6..ba65f9d11f 100644 --- a/plug-ins/file-ico/ico-dialog.c +++ b/plug-ins/file-ico/ico-dialog.c @@ -111,8 +111,8 @@ ico_preview_new (GimpDrawable *layer) { GtkWidget *image; GdkPixbuf *pixbuf; - gint width = gimp_drawable_width (layer); - gint height = gimp_drawable_height (layer); + gint width = gimp_drawable_get_width (layer); + gint height = gimp_drawable_get_height (layer); pixbuf = gimp_drawable_get_thumbnail (layer, MIN (width, 128), MIN (height, 128), @@ -229,8 +229,8 @@ ico_dialog_update_icon_preview (GtkWidget *dialog, GtkWidget *preview = ico_dialog_get_layer_preview (dialog, layer); GdkPixbuf *pixbuf; const Babl *format; - gint w = gimp_drawable_width (layer); - gint h = gimp_drawable_height (layer); + gint w = gimp_drawable_get_width (layer); + gint h = gimp_drawable_get_height (layer); if (! preview) return; @@ -517,8 +517,8 @@ ico_dialog_check_compat (GtkWidget *dialog, for (iter = info->layers, i = 0; iter; iter = iter->next, i++) { - if (gimp_drawable_width (iter->data) > 255 || - gimp_drawable_height (iter->data) > 255 || + if (gimp_drawable_get_width (iter->data) > 255 || + gimp_drawable_get_height (iter->data) > 255 || info->compress[i]) { warn = TRUE; diff --git a/plug-ins/file-ico/ico-save.c b/plug-ins/file-ico/ico-save.c index a8b98aa038..a87b219012 100644 --- a/plug-ins/file-ico/ico-save.c +++ b/plug-ins/file-ico/ico-save.c @@ -211,8 +211,8 @@ ico_save_init (GimpImage *image, } /* vista icons */ - if (gimp_drawable_width (iter->data) > 255 || - gimp_drawable_height (iter->data) > 255) + if (gimp_drawable_get_width (iter->data) > 255 || + gimp_drawable_get_height (iter->data) > 255) { info->compress[i] = TRUE; } @@ -767,8 +767,8 @@ ico_write_png (FILE *fp, palette = NULL; buf = NULL; - width = gimp_drawable_width (layer); - height = gimp_drawable_height (layer); + width = gimp_drawable_get_width (layer); + height = gimp_drawable_get_height (layer); png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if ( !png_ptr ) @@ -847,8 +847,8 @@ ico_write_icon (FILE *fp, D(("Creating data structures for icon %i ------------------------\n", num_icon)); - width = gimp_drawable_width (layer); - height = gimp_drawable_height (layer); + width = gimp_drawable_get_width (layer); + height = gimp_drawable_get_height (layer); header.header_size = 40; header.width = width; @@ -1132,8 +1132,8 @@ ico_save_image (GFile *file, { gimp_progress_update ((gdouble)i / (gdouble)info.num_icons); - width = gimp_drawable_width (iter->data); - height = gimp_drawable_height (iter->data); + width = gimp_drawable_get_width (iter->data); + height = gimp_drawable_get_height (iter->data); if (width <= 255 && height <= 255) { entries[i].width = width; diff --git a/plug-ins/file-psd/psd-load.c b/plug-ins/file-psd/psd-load.c index d084334a80..a06d694f28 100644 --- a/plug-ins/file-psd/psd-load.c +++ b/plug-ins/file-psd/psd-load.c @@ -1559,10 +1559,10 @@ add_layers (GimpImage *image, g_array_remove_index (parent_group_stack, parent_group_stack->len - 1); - gimp_drawable_offsets (GIMP_DRAWABLE (layer), &l_x, &l_y); + gimp_drawable_get_offsets (GIMP_DRAWABLE (layer), &l_x, &l_y); - l_w = gimp_drawable_width (GIMP_DRAWABLE (layer)); - l_h = gimp_drawable_height (GIMP_DRAWABLE (layer)); + l_w = gimp_drawable_get_width (GIMP_DRAWABLE (layer)); + l_h = gimp_drawable_get_height (GIMP_DRAWABLE (layer)); } else { diff --git a/plug-ins/file-psd/psd-save.c b/plug-ins/file-psd/psd-save.c index 20c8718d51..6d51f90996 100644 --- a/plug-ins/file-psd/psd-save.c +++ b/plug-ins/file-psd/psd-save.c @@ -1060,10 +1060,10 @@ save_layer_and_mask (FILE *fd, if (psd_layer->type == PSD_LAYER_TYPE_LAYER) { - gimp_drawable_offsets (GIMP_DRAWABLE (psd_layer->layer), + gimp_drawable_get_offsets (GIMP_DRAWABLE (psd_layer->layer), &offset_x, &offset_y); - layerWidth = gimp_drawable_width (GIMP_DRAWABLE (psd_layer->layer)); - layerHeight = gimp_drawable_height (GIMP_DRAWABLE (psd_layer->layer)); + layerWidth = gimp_drawable_get_width (GIMP_DRAWABLE (psd_layer->layer)); + layerHeight = gimp_drawable_get_height (GIMP_DRAWABLE (psd_layer->layer)); } else { @@ -1114,7 +1114,7 @@ save_layer_and_mask (FILE *fd, ChannelLengthPos[i] = g_new (glong, nChannelsLayer); - /* Try with gimp_drawable_bpp() */ + /* Try with gimp_drawable_get_bpp() */ for (j = 0; j < nChannelsLayer; j++) { @@ -1174,10 +1174,10 @@ save_layer_and_mask (FILE *fd, mask = gimp_layer_get_mask (psd_layer->layer); - gimp_drawable_offsets (GIMP_DRAWABLE (mask), &maskOffset_x, &maskOffset_y); + gimp_drawable_get_offsets (GIMP_DRAWABLE (mask), &maskOffset_x, &maskOffset_y); - maskWidth = gimp_drawable_width (GIMP_DRAWABLE (mask)); - maskHeight = gimp_drawable_height (GIMP_DRAWABLE (mask)); + maskWidth = gimp_drawable_get_width (GIMP_DRAWABLE (mask)); + maskHeight = gimp_drawable_get_height (GIMP_DRAWABLE (mask)); apply = gimp_layer_get_apply_mask (psd_layer->layer); IFDBG printf ("\t\tLayer mask size: %d\n", 20); diff --git a/plug-ins/file-sgi/sgi.c b/plug-ins/file-sgi/sgi.c index 18b2ad40c1..66a159314f 100644 --- a/plug-ins/file-sgi/sgi.c +++ b/plug-ins/file-sgi/sgi.c @@ -554,8 +554,8 @@ save_image (GFile *file, * Get the drawable for the current image... */ - width = gimp_drawable_width (drawable); - height = gimp_drawable_height (drawable); + width = gimp_drawable_get_width (drawable); + height = gimp_drawable_get_height (drawable); buffer = gimp_drawable_get_buffer (drawable); diff --git a/plug-ins/file-tiff/file-tiff-save.c b/plug-ins/file-tiff/file-tiff-save.c index 659cdf602b..65ea349eb2 100644 --- a/plug-ins/file-tiff/file-tiff-save.c +++ b/plug-ins/file-tiff/file-tiff-save.c @@ -740,7 +740,7 @@ save_layer (TIFF *tif, TIFFSetField (tif, TIFFTAG_RESOLUTIONUNIT, save_unit); } - gimp_drawable_offsets (GIMP_DRAWABLE (layer), &offset_x, &offset_y); + gimp_drawable_get_offsets (GIMP_DRAWABLE (layer), &offset_x, &offset_y); offset_x -= origin_x; offset_y -= origin_y; @@ -1154,7 +1154,7 @@ save_image (GFile *file, GimpDrawable *drawable = iter->data; gint offset_x, offset_y; - gimp_drawable_offsets (drawable, &offset_x, &offset_y); + gimp_drawable_get_offsets (drawable, &offset_x, &offset_y); origin_x = MIN (origin_x, offset_x); origin_y = MIN (origin_y, offset_y); diff --git a/plug-ins/flame/flame.c b/plug-ins/flame/flame.c index c271b7fc76..1a15a7a6a2 100644 --- a/plug-ins/flame/flame.c +++ b/plug-ins/flame/flame.c @@ -259,8 +259,8 @@ flame_run (GimpProcedure *procedure, gimp_get_data (PLUG_IN_PROC, &config); maybe_init_cp (); - config.cp.width = gimp_drawable_width (drawable); - config.cp.height = gimp_drawable_height (drawable); + config.cp.width = gimp_drawable_get_width (drawable); + config.cp.height = gimp_drawable_get_height (drawable); if (run_mode == GIMP_RUN_INTERACTIVE) { @@ -364,8 +364,8 @@ flame (GimpDrawable *drawable) guchar *tmp; gint bytes; - width = gimp_drawable_width (drawable); - height = gimp_drawable_height (drawable); + width = gimp_drawable_get_width (drawable); + height = gimp_drawable_get_height (drawable); if (gimp_drawable_has_alpha (drawable)) format = babl_format ("R'G'B'A u8"); diff --git a/plug-ins/fractal-explorer/fractal-explorer.c b/plug-ins/fractal-explorer/fractal-explorer.c index d4760e85a0..866addb0ce 100644 --- a/plug-ins/fractal-explorer/fractal-explorer.c +++ b/plug-ins/fractal-explorer/fractal-explorer.c @@ -534,8 +534,8 @@ explorer (GimpDrawable *drawable) /* Get the size of the input image. (This will/must be the same * as the size of the output image. */ - width = gimp_drawable_width (drawable); - height = gimp_drawable_height (drawable); + width = gimp_drawable_get_width (drawable); + height = gimp_drawable_get_height (drawable); if (gimp_drawable_has_alpha (drawable)) format = babl_format ("R'G'B'A u8"); diff --git a/plug-ins/gfig/gfig-dialog.c b/plug-ins/gfig/gfig-dialog.c index d8593afb2e..16cb0093e7 100644 --- a/plug-ins/gfig/gfig-dialog.c +++ b/plug-ins/gfig/gfig-dialog.c @@ -221,8 +221,8 @@ gfig_dialog (void) gimp_ui_init (PLUG_IN_BINARY); - img_width = gimp_drawable_width (gfig_context->drawable); - img_height = gimp_drawable_height (gfig_context->drawable); + img_width = gimp_drawable_get_width (gfig_context->drawable); + img_height = gimp_drawable_get_height (gfig_context->drawable); img_type = gimp_drawable_type_with_alpha (gfig_context->drawable); /* diff --git a/plug-ins/gradient-flare/gradient-flare.c b/plug-ins/gradient-flare/gradient-flare.c index f64cc398fb..5c0c49ec42 100644 --- a/plug-ins/gradient-flare/gradient-flare.c +++ b/plug-ins/gradient-flare/gradient-flare.c @@ -2639,8 +2639,8 @@ dlg_setup_gflare (void) void dlg_preview_calc_window (void) { - gint width = gimp_drawable_width (drawable); - gint height = gimp_drawable_height (drawable); + gint width = gimp_drawable_get_width (drawable); + gint height = gimp_drawable_get_height (drawable); gint is_wide; gdouble offx, offy; @@ -2670,8 +2670,8 @@ dlg_preview_calc_window (void) void ed_preview_calc_window (void) { - gint width = gimp_drawable_width (drawable); - gint height = gimp_drawable_height (drawable); + gint width = gimp_drawable_get_width (drawable); + gint height = gimp_drawable_get_height (drawable); gint is_wide; gdouble offx, offy; @@ -2788,8 +2788,8 @@ dlg_preview_render_func (Preview *preview, gpointer data) { GeglBuffer *src_buffer = data; - gint width = gimp_drawable_width (drawable); - gint height = gimp_drawable_height (drawable); + gint width = gimp_drawable_get_width (drawable); + gint height = gimp_drawable_get_height (drawable); gint x; gint dx, dy; /* drawable x, y */ guchar *src_row, *src; @@ -2888,11 +2888,11 @@ dlg_make_page_settings (GFlareDialog *dlg, _("_X:"), pvals.xcenter, xres, -GIMP_MAX_IMAGE_SIZE, GIMP_MAX_IMAGE_SIZE, - 0, gimp_drawable_width (drawable), + 0, gimp_drawable_get_width (drawable), _("_Y:"), pvals.ycenter, yres, -GIMP_MAX_IMAGE_SIZE, GIMP_MAX_IMAGE_SIZE, - 0, gimp_drawable_height (drawable)); + 0, gimp_drawable_get_height (drawable)); chain = GTK_WIDGET (GIMP_COORDINATES_CHAINBUTTON (center)); @@ -2919,7 +2919,7 @@ dlg_make_page_settings (GFlareDialog *dlg, row = 0; scale = gimp_scale_entry_new (_("_Radius:"), pvals.radius, 0.0, GIMP_MAX_IMAGE_SIZE, 1); - gimp_scale_entry_set_bounds (GIMP_SCALE_ENTRY (scale), 0.0, gimp_drawable_width (drawable) / 2, TRUE); + gimp_scale_entry_set_bounds (GIMP_SCALE_ENTRY (scale), 0.0, gimp_drawable_get_width (drawable) / 2, TRUE); g_signal_connect (scale, "value-changed", G_CALLBACK (gradient_scale_entry_update_double), &pvals.radius); diff --git a/plug-ins/ifs-compose/ifs-compose.c b/plug-ins/ifs-compose/ifs-compose.c index cc15137f22..8ef353a9a8 100644 --- a/plug-ins/ifs-compose/ifs-compose.c +++ b/plug-ins/ifs-compose/ifs-compose.c @@ -770,8 +770,8 @@ ifs_compose_dialog (GimpDrawable *drawable) GtkWidget *aspect_frame; GtkWidget *notebook; GtkWidget *page; - gint design_width = gimp_drawable_width (drawable); - gint design_height = gimp_drawable_height (drawable); + gint design_width = gimp_drawable_get_width (drawable); + gint design_height = gimp_drawable_get_height (drawable); if (design_width > design_height) { @@ -792,8 +792,8 @@ ifs_compose_dialog (GimpDrawable *drawable) ifsD = g_new0 (IfsDialog, 1); - ifsD->drawable_width = gimp_drawable_width (drawable); - ifsD->drawable_height = gimp_drawable_height (drawable); + ifsD->drawable_width = gimp_drawable_get_width (drawable); + ifsD->drawable_height = gimp_drawable_get_height (drawable); ifsD->preview_width = design_width; ifsD->preview_height = design_height; @@ -1302,8 +1302,8 @@ static void ifs_compose (GimpDrawable *drawable) { GeglBuffer *buffer = gimp_drawable_get_shadow_buffer (drawable); - gint width = gimp_drawable_width (drawable); - gint height = gimp_drawable_height (drawable); + gint width = gimp_drawable_get_width (drawable); + gint height = gimp_drawable_get_height (drawable); gboolean alpha = gimp_drawable_has_alpha (drawable); const Babl *format; gint num_bands; diff --git a/plug-ins/imagemap/imap_preview.c b/plug-ins/imagemap/imap_preview.c index d82654033e..cc0cb0a16e 100644 --- a/plug-ins/imagemap/imap_preview.c +++ b/plug-ins/imagemap/imap_preview.c @@ -93,8 +93,8 @@ render_rgb_image (Preview_t *preview_base, gint dwidth, dheight, pwidth, pheight; GtkWidget *preview = preview_base->preview; - dwidth = gimp_drawable_width (drawable); - dheight = gimp_drawable_height (drawable); + dwidth = gimp_drawable_get_width (drawable); + dheight = gimp_drawable_get_height (drawable); pwidth = preview_base->widget_width; pheight = preview_base->widget_height; @@ -289,8 +289,8 @@ make_preview (GimpDrawable *drawable) G_CALLBACK (handle_drop), NULL); - data->widget_width = data->width = gimp_drawable_width (drawable); - data->widget_height = data->height = gimp_drawable_height (drawable); + data->widget_width = data->width = gimp_drawable_get_width (drawable); + data->widget_height = data->height = gimp_drawable_get_height (drawable); gtk_widget_set_size_request (preview, data->widget_width, data->widget_height); diff --git a/plug-ins/lighting/lighting-apply.c b/plug-ins/lighting/lighting-apply.c index 37a27a0d80..bac69d7a63 100644 --- a/plug-ins/lighting/lighting-apply.c +++ b/plug-ins/lighting/lighting-apply.c @@ -94,7 +94,7 @@ compute_image (void) has_alpha = gimp_drawable_has_alpha (output_drawable); /* FIXME */ - obpp = has_alpha ? 4 : 3; //gimp_drawable_bpp (output_drawable); + obpp = has_alpha ? 4 : 3; //gimp_drawable_get_bpp (output_drawable); row = g_new (guchar, obpp * width); diff --git a/plug-ins/lighting/lighting-image.c b/plug-ins/lighting/lighting-image.c index a712b7e2ad..7a2c2a4a20 100644 --- a/plug-ins/lighting/lighting-image.c +++ b/plug-ins/lighting/lighting-image.c @@ -358,8 +358,8 @@ image_setup (GimpDrawable *drawable, if (! ret) return FALSE; - width = gimp_drawable_width (input_drawable); - height = gimp_drawable_height (input_drawable); + width = gimp_drawable_get_width (input_drawable); + height = gimp_drawable_get_height (input_drawable); source_buffer = gimp_drawable_get_buffer (input_drawable); @@ -399,8 +399,8 @@ envmap_setup (GimpDrawable *envmap) { if (envmap && ! env_buffer) { - env_width = gimp_drawable_width (envmap); - env_height = gimp_drawable_height (envmap); + env_width = gimp_drawable_get_width (envmap); + env_height = gimp_drawable_get_height (envmap); env_buffer = gimp_drawable_get_buffer (envmap); } diff --git a/plug-ins/lighting/lighting-main.c b/plug-ins/lighting/lighting-main.c index bb88a2a7f0..4e079c0baf 100644 --- a/plug-ins/lighting/lighting-main.c +++ b/plug-ins/lighting/lighting-main.c @@ -351,8 +351,8 @@ check_drawables (void) map = gimp_drawable_get_by_id (mapvals.bumpmap_id); if (gimp_drawable_is_indexed (map) || - (gimp_drawable_width (drawable) != gimp_drawable_width (map)) || - (gimp_drawable_height (drawable) != gimp_drawable_height (map))) + (gimp_drawable_get_width (drawable) != gimp_drawable_get_width (map)) || + (gimp_drawable_get_height (drawable) != gimp_drawable_get_height (map))) { mapvals.bump_mapped = FALSE; mapvals.bumpmap_id = -1; diff --git a/plug-ins/lighting/lighting-shade.c b/plug-ins/lighting/lighting-shade.c index 310e69f44d..f7a1e3175f 100644 --- a/plug-ins/lighting/lighting-shade.c +++ b/plug-ins/lighting/lighting-shade.c @@ -142,7 +142,7 @@ precompute_init (gint w, { GimpDrawable *drawable = gimp_drawable_get_by_id (mapvals.bumpmap_id); - bpp = gimp_drawable_bpp (drawable); + bpp = gimp_drawable_get_bpp (drawable); } bumprow = g_new (guchar, w * bpp); diff --git a/plug-ins/lighting/lighting-ui.c b/plug-ins/lighting/lighting-ui.c index 3145308928..4fe3ace8d0 100644 --- a/plug-ins/lighting/lighting-ui.c +++ b/plug-ins/lighting/lighting-ui.c @@ -260,10 +260,10 @@ bumpmap_constrain (GimpImage *image, { GimpDrawable *dr = gimp_drawable_get_by_id (mapvals.drawable_id); - return ((gimp_drawable_width (GIMP_DRAWABLE (item)) == - gimp_drawable_width (dr)) && - (gimp_drawable_height (GIMP_DRAWABLE (item)) == - gimp_drawable_height (dr))); + return ((gimp_drawable_get_width (GIMP_DRAWABLE (item)) == + gimp_drawable_get_width (dr)) && + (gimp_drawable_get_height (GIMP_DRAWABLE (item)) == + gimp_drawable_get_height (dr))); } static gint @@ -286,8 +286,8 @@ envmap_combo_callback (GtkWidget *widget, env = gimp_drawable_get_by_id (mapvals.envmap_id); - env_width = gimp_drawable_width (env); - env_height = gimp_drawable_height (env); + env_width = gimp_drawable_get_width (env); + env_height = gimp_drawable_get_height (env); } /***********************/ diff --git a/plug-ins/map-object/map-object-image.c b/plug-ins/map-object/map-object-image.c index f8e1557ef1..2c1eb5b41b 100644 --- a/plug-ins/map-object/map-object-image.c +++ b/plug-ins/map-object/map-object-image.c @@ -321,8 +321,8 @@ image_setup (GimpDrawable *drawable, &border_w, &border_h)) return FALSE; - width = gimp_drawable_width (input_drawable); - height = gimp_drawable_height (input_drawable); + width = gimp_drawable_get_width (input_drawable); + height = gimp_drawable_get_height (input_drawable); source_buffer = gimp_drawable_get_buffer (input_drawable); diff --git a/plug-ins/pagecurl/pagecurl.c b/plug-ins/pagecurl/pagecurl.c index 5f778e6a8b..0c63ef82f5 100644 --- a/plug-ins/pagecurl/pagecurl.c +++ b/plug-ins/pagecurl/pagecurl.c @@ -805,7 +805,7 @@ do_curl_effect (GimpDrawable *drawable) drawable_position); gimp_drawable_fill (GIMP_DRAWABLE (curl_layer), GIMP_FILL_TRANSPARENT); - gimp_drawable_offsets (drawable, &x1, &y1); + gimp_drawable_get_offsets (drawable, &x1, &y1); gimp_layer_set_offsets (curl_layer, sel_x + x1, sel_y + y1); curl_buffer = gimp_drawable_get_shadow_buffer (GIMP_DRAWABLE (curl_layer)); @@ -1071,7 +1071,7 @@ page_curl (GimpDrawable *drawable) /* Returns NGRADSAMPLES samples of active gradient. - Each sample has (gimp_drawable_bpp (drawable)) bytes. + Each sample has (gimp_drawable_get_bpp (drawable)) bytes. "ripped" from gradmap.c. */ static GimpRGB * diff --git a/plug-ins/print/print-draw-page.c b/plug-ins/print/print-draw-page.c index b53ab038ef..324d1a8428 100644 --- a/plug-ins/print/print-draw-page.c +++ b/plug-ins/print/print-draw-page.c @@ -93,8 +93,8 @@ print_surface_from_drawable (GimpDrawable *drawable, const Babl *format; cairo_surface_t *surface; cairo_status_t status; - const gint width = gimp_drawable_width (drawable); - const gint height = gimp_drawable_height (drawable); + const gint width = gimp_drawable_get_width (drawable); + const gint height = gimp_drawable_get_height (drawable); GeglBufferIterator *iter; guchar *pixels; gint stride; diff --git a/plug-ins/print/print-page-layout.c b/plug-ins/print/print-page-layout.c index 4a5dd57e7e..95c3d7c945 100644 --- a/plug-ins/print/print-page-layout.c +++ b/plug-ins/print/print-page-layout.c @@ -114,8 +114,8 @@ print_page_layout_gui (PrintData *data, memset (&info, 0, sizeof (PrintSizeInfo)); info.data = data; - info.image_width = gimp_drawable_width (data->drawable); - info.image_height = gimp_drawable_height (data->drawable); + info.image_width = gimp_drawable_get_width (data->drawable); + info.image_height = gimp_drawable_get_height (data->drawable); setup = gtk_print_operation_get_default_page_setup (data->operation); if (! setup) diff --git a/plug-ins/print/print-preview.c b/plug-ins/print/print-preview.c index fcc0985b9d..568ed68ee2 100644 --- a/plug-ins/print/print-preview.c +++ b/plug-ins/print/print-preview.c @@ -584,8 +584,8 @@ print_preview_set_image_dpi (PrintPreview *preview, g_return_if_fail (PRINT_IS_PREVIEW (preview)); g_return_if_fail (xres > 0.0 && yres > 0.0); - width = gimp_drawable_width (preview->drawable) * 72.0 / xres; - height = gimp_drawable_height (preview->drawable) * 72.0 / yres; + width = gimp_drawable_get_width (preview->drawable) * 72.0 / xres; + height = gimp_drawable_get_height (preview->drawable) * 72.0 / yres; if (width != preview->image_width || height != preview->image_height) { diff --git a/plug-ins/screenshot/screenshot-x11.c b/plug-ins/screenshot/screenshot-x11.c index 6769c577d2..b3bbc781c1 100644 --- a/plug-ins/screenshot/screenshot-x11.c +++ b/plug-ins/screenshot/screenshot-x11.c @@ -475,8 +475,8 @@ add_cursor_image (GimpImage *image, iter = gegl_buffer_iterator_new (buffer, GEGL_RECTANGLE (0, 0, - gimp_drawable_width (GIMP_DRAWABLE (layer)), - gimp_drawable_height (GIMP_DRAWABLE (layer))), + gimp_drawable_get_width (GIMP_DRAWABLE (layer)), + gimp_drawable_get_height (GIMP_DRAWABLE (layer))), 0, babl_format ("R'G'B'A u8"), GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE, 1); roi = &iter->items[0].roi;