app, libgimp, pdb, plug-ins: more functions moved to get|set().

The gimp_drawable_type() is an issue though as gimp_drawable_get_type()
is already defined as a common GObject API.
Though I'm actually wondering if GimpImageType is well called. Rather
than Type, shouldn't we go with ColorModel?

sed -i 's/\<gimp_drawable_bpp\>/gimp_drawable_get_bpp/g' "$@"
sed -i 's/\<gimp_drawable_width\>/gimp_drawable_get_width/g' "$@"
sed -i 's/\<gimp_drawable_height\>/gimp_drawable_get_height/g' "$@"
sed -i 's/\<gimp_drawable_offsets\>/gimp_drawable_get_offsets/g' "$@"
This commit is contained in:
Jehan 2021-04-06 14:28:40 +02:00
parent 32310f5e4b
commit ca8bc2bc1d
64 changed files with 313 additions and 313 deletions

View File

@ -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.",

View File

@ -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

View File

@ -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)
{

View File

@ -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);

View File

@ -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,

View File

@ -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);

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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)
{

View File

@ -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 ();
}

View File

@ -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",

View File

@ -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)
{

View File

@ -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);

View File

@ -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 */

View File

@ -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)));

View File

@ -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);

View File

@ -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);

View File

@ -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 *

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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)
{

View File

@ -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);
}

View File

@ -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 ();

View File

@ -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);

View File

@ -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);

View File

@ -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 ();

View File

@ -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,

View File

@ -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");

View File

@ -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");

View File

@ -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))
{

View File

@ -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;

View File

@ -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 ();

View File

@ -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);

View File

@ -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)
{

View File

@ -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));
}

View File

@ -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)
{

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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
{

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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");

View File

@ -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");

View File

@ -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);
/*

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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);
}

View File

@ -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;

View File

@ -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);

View File

@ -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);
}
/***********************/

View File

@ -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);

View File

@ -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 *

View File

@ -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;

View File

@ -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)

View File

@ -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)
{

View File

@ -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;