renamed gimp_drawable_data() to gimp_drawable_get_tiles().

2006-04-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable.[ch]: renamed gimp_drawable_data() to
	gimp_drawable_get_tiles().

	[lots of files]: changed accordingly.
This commit is contained in:
Sven Neumann 2006-04-07 09:21:18 +00:00 committed by Sven Neumann
parent 5f211479ac
commit cef9db57fe
39 changed files with 138 additions and 125 deletions

View File

@ -1,3 +1,10 @@
2006-04-07 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable.[ch]: renamed gimp_drawable_data() to
gimp_drawable_get_tiles().
[lots of files]: changed accordingly.
2006-04-07 Michael Natterer <mitch@gimp.org> 2006-04-07 Michael Natterer <mitch@gimp.org>
* app/pdb/gimp-pdb.c (gimp_pdb_register) * app/pdb/gimp-pdb.c (gimp_pdb_register)
@ -30,7 +37,7 @@
* app/plug-in/plug-in-message.c: use the new APIs instead of * app/plug-in/plug-in-message.c: use the new APIs instead of
adding/removing procs and temp procs from their lists manually. adding/removing procs and temp procs from their lists manually.
Unref the newly created procedure after adding then to the Unref the newly created procedure after adding them to the
plug_in_def or plug_in. plug_in_def or plug_in.
* app/plug-in/plug-in-rc.[ch] * app/plug-in/plug-in-rc.[ch]

View File

@ -171,7 +171,7 @@ gimp_channel_select_scan_convert (GimpChannel *channel,
gimp_item_width (item), gimp_item_width (item),
gimp_item_height (item)); gimp_item_height (item));
gimp_scan_convert_render (scan_convert, gimp_scan_convert_render (scan_convert,
gimp_drawable_data (GIMP_DRAWABLE (add_on)), gimp_drawable_get_tiles (GIMP_DRAWABLE (add_on)),
offset_x, offset_y, antialias); offset_x, offset_y, antialias);
if (feather) if (feather)

View File

@ -1516,9 +1516,9 @@ gimp_channel_new_from_alpha (GimpImage *image,
gimp_channel_clear (channel, NULL, FALSE); gimp_channel_clear (channel, NULL, FALSE);
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
0, 0, width, height, FALSE); 0, 0, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_data (GIMP_DRAWABLE (channel)), pixel_region_init (&destPR, gimp_drawable_get_tiles (GIMP_DRAWABLE (channel)),
0, 0, width, height, TRUE); 0, 0, width, height, TRUE);
extract_alpha_region (&srcPR, NULL, &destPR); extract_alpha_region (&srcPR, NULL, &destPR);
@ -1558,7 +1558,7 @@ gimp_channel_new_from_component (GimpImage *image,
pixel_region_init (&src, projection, pixel_region_init (&src, projection,
0, 0, width, height, FALSE); 0, 0, width, height, FALSE);
pixel_region_init (&dest, gimp_drawable_data (GIMP_DRAWABLE (channel)), pixel_region_init (&dest, gimp_drawable_get_tiles (GIMP_DRAWABLE (channel)),
0, 0, width, height, TRUE); 0, 0, width, height, TRUE);
copy_component (&src, &dest, pixel); copy_component (&src, &dest, pixel);

View File

@ -601,7 +601,7 @@ gradient_precalc_shapeburst (GimpImage *image,
gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2); gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
gimp_item_offsets (GIMP_ITEM (drawable), &offx, &offy); gimp_item_offsets (GIMP_ITEM (drawable), &offx, &offy);
pixel_region_init (&maskR, gimp_drawable_data (GIMP_DRAWABLE (mask)), pixel_region_init (&maskR, gimp_drawable_get_tiles (GIMP_DRAWABLE (mask)),
x1 + offx, y1 + offy, (x2 - x1), (y2 - y1), FALSE); x1 + offx, y1 + offy, (x2 - x1), (y2 - y1), FALSE);
/* copy the mask to the temp mask */ /* copy the mask to the temp mask */
@ -614,7 +614,7 @@ gradient_precalc_shapeburst (GimpImage *image,
{ {
PixelRegion drawableR; PixelRegion drawableR;
pixel_region_init (&drawableR, gimp_drawable_data (drawable), pixel_region_init (&drawableR, gimp_drawable_get_tiles (drawable),
PR->x, PR->y, PR->w, PR->h, FALSE); PR->x, PR->y, PR->w, PR->h, FALSE);
extract_alpha_region (&drawableR, NULL, &tempR); extract_alpha_region (&drawableR, NULL, &tempR);

View File

@ -213,7 +213,8 @@ gimp_drawable_bucket_fill_full (GimpDrawable *drawable,
x2 = CLAMP (x2, off_x, (off_x + gimp_item_width (item))); x2 = CLAMP (x2, off_x, (off_x + gimp_item_width (item)));
y2 = CLAMP (y2, off_y, (off_y + gimp_item_height (item))); y2 = CLAMP (y2, off_y, (off_y + gimp_item_height (item)));
pixel_region_init (&maskPR, gimp_drawable_data (GIMP_DRAWABLE (mask)), pixel_region_init (&maskPR,
gimp_drawable_get_tiles (GIMP_DRAWABLE (mask)),
x1, y1, (x2 - x1), (y2 - y1), TRUE); x1, y1, (x2 - x1), (y2 - y1), TRUE);
/* translate mask bounds to drawable coords */ /* translate mask bounds to drawable coords */
@ -224,7 +225,8 @@ gimp_drawable_bucket_fill_full (GimpDrawable *drawable,
} }
else else
{ {
pixel_region_init (&maskPR, gimp_drawable_data (GIMP_DRAWABLE (mask)), pixel_region_init (&maskPR,
gimp_drawable_get_tiles (GIMP_DRAWABLE (mask)),
x1, y1, (x2 - x1), (y2 - y1), TRUE); x1, y1, (x2 - x1), (y2 - y1), TRUE);
} }

View File

@ -107,9 +107,9 @@ gimp_drawable_real_apply_region (GimpDrawable *drawable,
pixel_region_init (&src1PR, src1_tiles, pixel_region_init (&src1PR, src1_tiles,
x1, y1, (x2 - x1), (y2 - y1), FALSE); x1, y1, (x2 - x1), (y2 - y1), FALSE);
else else
pixel_region_init (&src1PR, gimp_drawable_data (drawable), pixel_region_init (&src1PR, gimp_drawable_get_tiles (drawable),
x1, y1, (x2 - x1), (y2 - y1), FALSE); x1, y1, (x2 - x1), (y2 - y1), FALSE);
pixel_region_init (&destPR, gimp_drawable_data (drawable), pixel_region_init (&destPR, gimp_drawable_get_tiles (drawable),
x1, y1, (x2 - x1), (y2 - y1), TRUE); x1, y1, (x2 - x1), (y2 - y1), TRUE);
pixel_region_resize (src2PR, pixel_region_resize (src2PR,
src2PR->x + (x1 - x), src2PR->y + (y1 - y), src2PR->x + (x1 - x), src2PR->y + (y1 - y),
@ -127,7 +127,7 @@ gimp_drawable_real_apply_region (GimpDrawable *drawable,
my = y1 + offset_y; my = y1 + offset_y;
pixel_region_init (&maskPR, pixel_region_init (&maskPR,
gimp_drawable_data (GIMP_DRAWABLE (mask)), gimp_drawable_get_tiles (GIMP_DRAWABLE (mask)),
mx, my, mx, my,
(x2 - x1), (y2 - y1), (x2 - x1), (y2 - y1),
FALSE); FALSE);
@ -225,9 +225,9 @@ gimp_drawable_real_replace_region (GimpDrawable *drawable,
/* configure the pixel regions /* configure the pixel regions
* If an alternative to using the drawable's data as src1 was provided... * If an alternative to using the drawable's data as src1 was provided...
*/ */
pixel_region_init (&src1PR, gimp_drawable_data (drawable), pixel_region_init (&src1PR, gimp_drawable_get_tiles (drawable),
x1, y1, (x2 - x1), (y2 - y1), FALSE); x1, y1, (x2 - x1), (y2 - y1), FALSE);
pixel_region_init (&destPR, gimp_drawable_data (drawable), pixel_region_init (&destPR, gimp_drawable_get_tiles (drawable),
x1, y1, (x2 - x1), (y2 - y1), TRUE); x1, y1, (x2 - x1), (y2 - y1), TRUE);
pixel_region_resize (src2PR, pixel_region_resize (src2PR,
src2PR->x + (x1 - x), src2PR->y + (y1 - y), src2PR->x + (x1 - x), src2PR->y + (y1 - y),
@ -247,7 +247,7 @@ gimp_drawable_real_replace_region (GimpDrawable *drawable,
my = y1 + offset_y; my = y1 + offset_y;
pixel_region_init (&mask2PR, pixel_region_init (&mask2PR,
gimp_drawable_data (GIMP_DRAWABLE (mask)), gimp_drawable_get_tiles (GIMP_DRAWABLE (mask)),
mx, my, mx, my,
(x2 - x1), (y2 - y1), (x2 - x1), (y2 - y1),
FALSE); FALSE);

View File

@ -86,7 +86,7 @@ gimp_drawable_desaturate (GimpDrawable *drawable,
has_alpha = gimp_drawable_has_alpha (drawable); has_alpha = gimp_drawable_has_alpha (drawable);
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);

View File

@ -63,7 +63,7 @@ gimp_drawable_equalize (GimpDrawable *drawable,
lut = equalize_lut_new (hist, bytes); lut = equalize_lut_new (hist, bytes);
/* Apply the histogram */ /* Apply the histogram */
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);

View File

@ -109,7 +109,7 @@ gimp_drawable_foreground_extract_siox_init (GimpDrawable *drawable,
if (! intersect) if (! intersect)
return NULL; return NULL;
return siox_init (gimp_drawable_data (drawable), colormap, return siox_init (gimp_drawable_get_tiles (drawable), colormap,
offset_x, offset_y, offset_x, offset_y,
x, y, width, height); x, y, width, height);
} }
@ -149,7 +149,7 @@ gimp_drawable_foreground_extract_siox (GimpDrawable *mask,
} }
siox_foreground_extract (state, refinement, siox_foreground_extract (state, refinement,
gimp_drawable_data (mask), x1, y1, x2, y2, gimp_drawable_get_tiles (mask), x1, y1, x2, y2,
smoothness, sensitivity, multiblob, smoothness, sensitivity, multiblob,
(SioxProgressFunc) gimp_progress_set_value, (SioxProgressFunc) gimp_progress_set_value,
progress); progress);

View File

@ -49,7 +49,7 @@ gimp_drawable_calculate_histogram (GimpDrawable *drawable,
if ((x1 == x2) || (y1 == y2)) if ((x1 == x2) || (y1 == y2))
return; return;
pixel_region_init (&region, gimp_drawable_data (drawable), pixel_region_init (&region, gimp_drawable_get_tiles (drawable),
x1, y1, (x2 - x1), (y2 - y1), FALSE); x1, y1, (x2 - x1), (y2 - y1), FALSE);
if (have_mask) if (have_mask)
@ -62,7 +62,8 @@ gimp_drawable_calculate_histogram (GimpDrawable *drawable,
sel_mask = gimp_image_get_mask (image); sel_mask = gimp_image_get_mask (image);
gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y);
pixel_region_init (&mask, gimp_drawable_data (GIMP_DRAWABLE (sel_mask)), pixel_region_init (&mask,
gimp_drawable_get_tiles (GIMP_DRAWABLE (sel_mask)),
x1 + off_x, y1 + off_y, (x2 - x1), (y2 - y1), FALSE); x1 + off_x, y1 + off_y, (x2 - x1), (y2 - y1), FALSE);
gimp_histogram_calculate (histogram, &region, &mask); gimp_histogram_calculate (histogram, &region, &mask);
} }

View File

@ -48,7 +48,7 @@ gimp_drawable_invert (GimpDrawable *drawable)
lut = invert_lut_new (gimp_drawable_bytes (drawable)); lut = invert_lut_new (gimp_drawable_bytes (drawable));
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);

View File

@ -97,7 +97,7 @@ gimp_drawable_levels (GimpDrawable *drawable,
&levels, &levels,
gimp_drawable_bytes (drawable)); gimp_drawable_bytes (drawable));
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
@ -146,7 +146,7 @@ gimp_drawable_levels_stretch (GimpDrawable *drawable,
&levels, &levels,
gimp_drawable_bytes (drawable)); gimp_drawable_bytes (drawable));
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);

View File

@ -115,7 +115,7 @@ gimp_drawable_offset (GimpDrawable *drawable,
/* Copy the center region */ /* Copy the center region */
if (width && height) if (width && height)
{ {
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
src_x, src_y, width, height, FALSE); src_x, src_y, width, height, FALSE);
pixel_region_init (&destPR, new_tiles, pixel_region_init (&destPR, new_tiles,
dest_x, dest_y, width, height, TRUE); dest_x, dest_y, width, height, TRUE);
@ -158,7 +158,7 @@ gimp_drawable_offset (GimpDrawable *drawable,
/* intersecting region */ /* intersecting region */
if (offset_x != 0 && offset_y != 0) if (offset_x != 0 && offset_y != 0)
{ {
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
src_x, src_y, src_x, src_y,
ABS (offset_x), ABS (offset_y), ABS (offset_x), ABS (offset_y),
FALSE); FALSE);
@ -174,7 +174,7 @@ gimp_drawable_offset (GimpDrawable *drawable,
{ {
if (offset_y >= 0) if (offset_y >= 0)
{ {
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
src_x, 0, ABS (offset_x), src_x, 0, ABS (offset_x),
gimp_item_height (item) - ABS (offset_y), gimp_item_height (item) - ABS (offset_y),
FALSE); FALSE);
@ -186,7 +186,7 @@ gimp_drawable_offset (GimpDrawable *drawable,
} }
else if (offset_y < 0) else if (offset_y < 0)
{ {
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
src_x, src_y - offset_y, src_x, src_y - offset_y,
ABS (offset_x), ABS (offset_x),
gimp_item_height (item) - ABS (offset_y), gimp_item_height (item) - ABS (offset_y),
@ -206,7 +206,7 @@ gimp_drawable_offset (GimpDrawable *drawable,
{ {
if (offset_x >= 0) if (offset_x >= 0)
{ {
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
0, src_y, 0, src_y,
gimp_item_width (item) - ABS (offset_x), gimp_item_width (item) - ABS (offset_x),
ABS (offset_y), FALSE); ABS (offset_y), FALSE);
@ -216,7 +216,7 @@ gimp_drawable_offset (GimpDrawable *drawable,
} }
else if (offset_x < 0) else if (offset_x < 0)
{ {
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
src_x - offset_x, src_y, src_x - offset_x, src_y,
gimp_item_width (item) - ABS (offset_x), gimp_item_width (item) - ABS (offset_x),
ABS (offset_y), FALSE); ABS (offset_y), FALSE);

View File

@ -161,7 +161,7 @@ gimp_drawable_get_sub_preview (GimpDrawable *drawable,
(dest_height * (subsample + 1) * 2 < src_width)) (dest_height * (subsample + 1) * 2 < src_width))
subsample += 1; subsample += 1;
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
src_x, src_y, src_width, src_height, src_x, src_y, src_width, src_height,
FALSE); FALSE);

View File

@ -40,6 +40,7 @@
#include "gimpdrawable-preview.h" #include "gimpdrawable-preview.h"
#include "gimpdrawable-transform.h" #include "gimpdrawable-transform.h"
#include "gimpimage.h" #include "gimpimage.h"
#include "gimpimage-colormap.h"
#include "gimpimage-undo-push.h" #include "gimpimage-undo-push.h"
#include "gimplayer.h" #include "gimplayer.h"
#include "gimplayer-floating-sel.h" #include "gimplayer-floating-sel.h"
@ -233,7 +234,7 @@ gimp_drawable_pickable_iface_init (GimpPickableInterface *iface)
iface->get_image = gimp_item_get_image; iface->get_image = gimp_item_get_image;
iface->get_image_type = gimp_drawable_type; iface->get_image_type = gimp_drawable_type;
iface->get_bytes = gimp_drawable_bytes; iface->get_bytes = gimp_drawable_bytes;
iface->get_tiles = gimp_drawable_data; iface->get_tiles = gimp_drawable_get_tiles;
iface->get_color_at = gimp_drawable_get_color_at; iface->get_color_at = gimp_drawable_get_color_at;
} }
@ -604,7 +605,7 @@ gimp_drawable_get_color_at (GimpPickable *pickable,
dest = g_new (guchar, 5); dest = g_new (guchar, 5);
tile = tile_manager_get_tile (gimp_drawable_data (drawable), x, y, tile = tile_manager_get_tile (gimp_drawable_get_tiles (drawable), x, y,
TRUE, FALSE); TRUE, FALSE);
src = tile_data_pointer (tile, x % TILE_WIDTH, y % TILE_HEIGHT); src = tile_data_pointer (tile, x % TILE_WIDTH, y % TILE_HEIGHT);
@ -698,7 +699,7 @@ gimp_drawable_real_push_undo (GimpDrawable *drawable,
PixelRegion srcPR, destPR; PixelRegion srcPR, destPR;
tiles = tile_manager_new (width, height, gimp_drawable_bytes (drawable)); tiles = tile_manager_new (width, height, gimp_drawable_bytes (drawable));
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, tiles, pixel_region_init (&destPR, tiles,
0, 0, width, height, TRUE); 0, 0, width, height, TRUE);
@ -717,13 +718,13 @@ gimp_drawable_real_push_undo (GimpDrawable *drawable,
} }
static void static void
gimp_drawable_real_swap_pixels (GimpDrawable *drawable, gimp_drawable_real_swap_pixels (GimpDrawable *drawable,
TileManager *tiles, TileManager *tiles,
gboolean sparse, gboolean sparse,
gint x, gint x,
gint y, gint y,
gint width, gint width,
gint height) gint height)
{ {
if (sparse) if (sparse)
{ {
@ -744,11 +745,12 @@ gimp_drawable_real_swap_pixels (GimpDrawable *drawable,
src_tile = tile_manager_get_tile (tiles, src_tile = tile_manager_get_tile (tiles,
j, i, TRUE, FALSE /*TRUE*/); j, i, TRUE, FALSE /*TRUE*/);
dest_tile = tile_manager_get_tile (gimp_drawable_data (drawable), j, i, TRUE, FALSE /* TRUE */); dest_tile = tile_manager_get_tile (gimp_drawable_get_tiles (drawable),
j, i, TRUE, FALSE /* TRUE */);
tile_manager_map_tile (tiles, tile_manager_map_tile (tiles,
j, i, dest_tile); j, i, dest_tile);
tile_manager_map_tile (gimp_drawable_data (drawable), tile_manager_map_tile (gimp_drawable_get_tiles (drawable),
j, i, src_tile); j, i, src_tile);
#if 0 #if 0
swap_pixels (tile_data_pointer (src_tile, 0, 0), swap_pixels (tile_data_pointer (src_tile, 0, 0),
@ -768,7 +770,7 @@ gimp_drawable_real_swap_pixels (GimpDrawable *drawable,
pixel_region_init (&PR1, tiles, pixel_region_init (&PR1, tiles,
0, 0, width, height, TRUE); 0, 0, width, height, TRUE);
pixel_region_init (&PR2, gimp_drawable_data (drawable), pixel_region_init (&PR2, gimp_drawable_get_tiles (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
swap_region (&PR1, &PR2); swap_region (&PR1, &PR2);
@ -903,6 +905,14 @@ gimp_drawable_replace_region (GimpDrawable *drawable,
x, y); x, y);
} }
TileManager *
gimp_drawable_get_tiles (const GimpDrawable *drawable)
{
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
return drawable->tiles;
}
void void
gimp_drawable_set_tiles (GimpDrawable *drawable, gimp_drawable_set_tiles (GimpDrawable *drawable,
gboolean push_undo, gboolean push_undo,
@ -1097,7 +1107,7 @@ gimp_drawable_fill (GimpDrawable *drawable,
drawable_type = gimp_drawable_type (drawable); drawable_type = gimp_drawable_type (drawable);
pixel_region_init (&destPR, gimp_drawable_data (drawable), pixel_region_init (&destPR, gimp_drawable_get_tiles (drawable),
0, 0, gimp_item_width (item), gimp_item_height (item), 0, 0, gimp_item_width (item), gimp_item_height (item),
TRUE); TRUE);
@ -1392,15 +1402,7 @@ gimp_drawable_has_floating_sel (const GimpDrawable *drawable)
return (floating_sel && floating_sel->fs.drawable == drawable); return (floating_sel && floating_sel->fs.drawable == drawable);
} }
TileManager * const guchar *
gimp_drawable_data (const GimpDrawable *drawable)
{
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
return drawable->tiles;
}
guchar *
gimp_drawable_cmap (const GimpDrawable *drawable) gimp_drawable_cmap (const GimpDrawable *drawable)
{ {
GimpImage *image; GimpImage *image;
@ -1409,8 +1411,5 @@ gimp_drawable_cmap (const GimpDrawable *drawable)
image = gimp_item_get_image (GIMP_ITEM (drawable)); image = gimp_item_get_image (GIMP_ITEM (drawable));
if (image) return image ? gimp_image_get_colormap (image) : NULL;
return image->cmap;
return NULL;
} }

View File

@ -147,6 +147,7 @@ void gimp_drawable_replace_region (GimpDrawable *drawable,
gint x, gint x,
gint y); gint y);
TileManager * gimp_drawable_get_tiles (const GimpDrawable *drawable);
void gimp_drawable_set_tiles (GimpDrawable *drawable, void gimp_drawable_set_tiles (GimpDrawable *drawable,
gboolean push_undo, gboolean push_undo,
const gchar *undo_desc, const gchar *undo_desc,
@ -212,9 +213,7 @@ gint gimp_drawable_bytes_without_alpha(const GimpDrawable *drawable);
gboolean gimp_drawable_has_floating_sel (const GimpDrawable *drawable); gboolean gimp_drawable_has_floating_sel (const GimpDrawable *drawable);
TileManager * gimp_drawable_data (const GimpDrawable *drawable); const guchar * gimp_drawable_cmap (const GimpDrawable *drawable);
guchar * gimp_drawable_cmap (const GimpDrawable *drawable);
#endif /* __GIMP_DRAWABLE_H__ */ #endif /* __GIMP_DRAWABLE_H__ */

View File

@ -141,7 +141,7 @@ gimp_image_contiguous_region_by_seed (GimpImage *image,
FALSE); FALSE);
mask = gimp_channel_new_mask (image, srcPR.w, srcPR.h); mask = gimp_channel_new_mask (image, srcPR.w, srcPR.h);
pixel_region_init (&maskPR, gimp_drawable_data (GIMP_DRAWABLE (mask)), pixel_region_init (&maskPR, gimp_drawable_get_tiles (GIMP_DRAWABLE (mask)),
0, 0, 0, 0,
gimp_item_width (GIMP_ITEM (mask)), gimp_item_width (GIMP_ITEM (mask)),
gimp_item_height (GIMP_ITEM (mask)), gimp_item_height (GIMP_ITEM (mask)),
@ -265,7 +265,7 @@ gimp_image_contiguous_region_by_color (GimpImage *image,
mask = gimp_channel_new_mask (image, width, height); mask = gimp_channel_new_mask (image, width, height);
pixel_region_init (&maskPR, gimp_drawable_data (GIMP_DRAWABLE (mask)), pixel_region_init (&maskPR, gimp_drawable_get_tiles (GIMP_DRAWABLE (mask)),
0, 0, width, height, 0, 0, width, height,
TRUE); TRUE);

View File

@ -182,8 +182,10 @@ gimp_image_duplicate (GimpImage *image)
TileManager *dest_tiles; TileManager *dest_tiles;
PixelRegion srcPR, destPR; PixelRegion srcPR, destPR;
src_tiles = gimp_drawable_data (GIMP_DRAWABLE (image->selection_mask)); src_tiles =
dest_tiles = gimp_drawable_data (GIMP_DRAWABLE (new_image->selection_mask)); gimp_drawable_get_tiles (GIMP_DRAWABLE (image->selection_mask));
dest_tiles =
gimp_drawable_get_tiles (GIMP_DRAWABLE (new_image->selection_mask));
pixel_region_init (&srcPR, src_tiles, pixel_region_init (&srcPR, src_tiles,
0, 0, image->width, image->height, FALSE); 0, 0, image->width, image->height, FALSE);

View File

@ -367,7 +367,7 @@ gimp_image_merge_layers (GimpImage *image,
/* init the pixel region */ /* init the pixel region */
pixel_region_init (&src1PR, pixel_region_init (&src1PR,
gimp_drawable_data (GIMP_DRAWABLE (merge_layer)), gimp_drawable_get_tiles (GIMP_DRAWABLE (merge_layer)),
0, 0, 0, 0,
image->width, image->height, image->width, image->height,
TRUE); TRUE);
@ -402,7 +402,7 @@ gimp_image_merge_layers (GimpImage *image,
/* Set the layer to transparent */ /* Set the layer to transparent */
pixel_region_init (&src1PR, pixel_region_init (&src1PR,
gimp_drawable_data (GIMP_DRAWABLE (merge_layer)), gimp_drawable_get_tiles (GIMP_DRAWABLE (merge_layer)),
0, 0, 0, 0,
(x2 - x1), (y2 - y1), (x2 - x1), (y2 - y1),
TRUE); TRUE);
@ -457,11 +457,11 @@ gimp_image_merge_layers (GimpImage *image,
/* configure the pixel regions */ /* configure the pixel regions */
pixel_region_init (&src1PR, pixel_region_init (&src1PR,
gimp_drawable_data (GIMP_DRAWABLE (merge_layer)), gimp_drawable_get_tiles (GIMP_DRAWABLE (merge_layer)),
(x3 - x1), (y3 - y1), (x4 - x3), (y4 - y3), (x3 - x1), (y3 - y1), (x4 - x3), (y4 - y3),
TRUE); TRUE);
pixel_region_init (&src2PR, pixel_region_init (&src2PR,
gimp_drawable_data (GIMP_DRAWABLE (layer)), gimp_drawable_get_tiles (GIMP_DRAWABLE (layer)),
(x3 - off_x), (y3 - off_y), (x3 - off_x), (y3 - off_y),
(x4 - x3), (y4 - y3), (x4 - x3), (y4 - y3),
FALSE); FALSE);
@ -469,7 +469,7 @@ gimp_image_merge_layers (GimpImage *image,
if (layer->mask && layer->mask->apply_mask) if (layer->mask && layer->mask->apply_mask)
{ {
pixel_region_init (&maskPR, pixel_region_init (&maskPR,
gimp_drawable_data (GIMP_DRAWABLE (layer->mask)), gimp_drawable_get_tiles (GIMP_DRAWABLE (layer->mask)),
(x3 - off_x), (y3 - off_y), (x3 - off_x), (y3 - off_y),
(x4 - x3), (y4 - y3), (x4 - x3), (y4 - y3),
FALSE); FALSE);

View File

@ -937,7 +937,7 @@ gimp_image_undo_push_mask (GimpImage *image,
undo_tiles = tile_manager_new (x2 - x1, y2 - y1, undo_tiles = tile_manager_new (x2 - x1, y2 - y1,
gimp_drawable_bytes (drawable)); gimp_drawable_bytes (drawable));
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x1, y1, x2 - x1, y2 - y1, FALSE); x1, y1, x2 - x1, y2 - y1, FALSE);
pixel_region_init (&destPR, undo_tiles, pixel_region_init (&destPR, undo_tiles,
0, 0, x2 - x1, y2 - y1, TRUE); 0, 0, x2 - x1, y2 - y1, TRUE);

View File

@ -318,7 +318,7 @@ gimp_image_map_apply (GimpImageMap *image_map,
/* Copy from the image to the new tiles */ /* Copy from the image to the new tiles */
pixel_region_init (&image_map->srcPR, pixel_region_init (&image_map->srcPR,
gimp_drawable_data (image_map->drawable), gimp_drawable_get_tiles (image_map->drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&image_map->destPR, image_map->undo_tiles, pixel_region_init (&image_map->destPR, image_map->undo_tiles,
0, 0, width, height, TRUE); 0, 0, width, height, TRUE);
@ -337,7 +337,7 @@ gimp_image_map_apply (GimpImageMap *image_map,
pixel_region_init (&image_map->srcPR, image_map->undo_tiles, pixel_region_init (&image_map->srcPR, image_map->undo_tiles,
0, 0, undo_width, undo_height, FALSE); 0, 0, undo_width, undo_height, FALSE);
pixel_region_init (&image_map->destPR, pixel_region_init (&image_map->destPR,
gimp_drawable_data (image_map->drawable), gimp_drawable_get_tiles (image_map->drawable),
undo_offset_x, undo_offset_y, undo_offset_x, undo_offset_y,
undo_width, undo_height, TRUE); undo_width, undo_height, TRUE);
@ -444,7 +444,7 @@ gimp_image_map_clear (GimpImageMap *image_map)
/* Copy from the drawable to the tiles */ /* Copy from the drawable to the tiles */
pixel_region_init (&srcPR, image_map->undo_tiles, pixel_region_init (&srcPR, image_map->undo_tiles,
0, 0, width, height, FALSE); 0, 0, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_data (image_map->drawable), pixel_region_init (&destPR, gimp_drawable_get_tiles (image_map->drawable),
offset_x, offset_y, width, height, TRUE); offset_x, offset_y, width, height, TRUE);
/* if the user has changed the image depth get out quickly */ /* if the user has changed the image depth get out quickly */

View File

@ -297,7 +297,7 @@ floating_sel_store (GimpLayer *layer,
if ((x2 - x1) > 0 && (y2 - y1) > 0) if ((x2 - x1) > 0 && (y2 - y1) > 0)
{ {
/* Copy the area from the drawable to the backing store */ /* Copy the area from the drawable to the backing store */
pixel_region_init (&srcPR, gimp_drawable_data (layer->fs.drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (layer->fs.drawable),
(x1 - offx), (y1 - offy), (x2 - x1), (y2 - y1), FALSE); (x1 - offx), (y1 - offy), (x2 - x1), (y2 - y1), FALSE);
pixel_region_init (&destPR, layer->fs.backing_store, pixel_region_init (&destPR, layer->fs.backing_store,
(x1 - GIMP_ITEM (layer)->offset_x), (x1 - GIMP_ITEM (layer)->offset_x),
@ -350,7 +350,7 @@ floating_sel_restore (GimpLayer *layer,
(x1 - GIMP_ITEM (layer)->offset_x), (x1 - GIMP_ITEM (layer)->offset_x),
(y1 - GIMP_ITEM (layer)->offset_y), (y1 - GIMP_ITEM (layer)->offset_y),
(x2 - x1), (y2 - y1), FALSE); (x2 - x1), (y2 - y1), FALSE);
pixel_region_init (&destPR, gimp_drawable_data (layer->fs.drawable), pixel_region_init (&destPR, gimp_drawable_get_tiles (layer->fs.drawable),
(x1 - offx), (y1 - offy), (x2 - x1), (y2 - y1), TRUE); (x1 - offx), (y1 - offy), (x2 - x1), (y2 - y1), TRUE);
copy_region (&srcPR, &destPR); copy_region (&srcPR, &destPR);
@ -537,7 +537,8 @@ floating_sel_boundary (GimpLayer *layer,
if (gimp_drawable_has_alpha (GIMP_DRAWABLE (layer))) if (gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)))
{ {
/* find the segments */ /* find the segments */
pixel_region_init (&bPR, gimp_drawable_data (GIMP_DRAWABLE (layer)), pixel_region_init (&bPR,
gimp_drawable_get_tiles (GIMP_DRAWABLE (layer)),
0, 0, width, height, FALSE); 0, 0, width, height, FALSE);
layer->fs.segs = boundary_find (&bPR, BOUNDARY_WITHIN_BOUNDS, layer->fs.segs = boundary_find (&bPR, BOUNDARY_WITHIN_BOUNDS,
0, 0, width, height, 0, 0, width, height,

View File

@ -407,7 +407,7 @@ gimp_palette_import_from_drawable (GimpDrawable *drawable,
{ {
colors = colors =
gimp_palette_import_extract (gimp_item_get_image (GIMP_ITEM (drawable)), gimp_palette_import_extract (gimp_item_get_image (GIMP_ITEM (drawable)),
gimp_drawable_data (drawable), gimp_drawable_get_tiles (drawable),
gimp_drawable_type (drawable), gimp_drawable_type (drawable),
0, 0, width, height, 0, 0, width, height,
n_colors, threshold); n_colors, threshold);

View File

@ -121,7 +121,7 @@ gimp_projection_construct (GimpProjection *proj,
g_printerr ("cow-projection!"); g_printerr ("cow-projection!");
pixel_region_init (&srcPR, gimp_drawable_data (layer), pixel_region_init (&srcPR, gimp_drawable_get_tiles (layer),
x, y, w,h, FALSE); x, y, w,h, FALSE);
pixel_region_init (&destPR, gimp_projection_get_tiles (proj), pixel_region_init (&destPR, gimp_projection_get_tiles (proj),
x, y, w,h, TRUE); x, y, w,h, TRUE);
@ -217,7 +217,7 @@ gimp_projection_construct_layers (GimpProjection *proj,
if (layer->mask && layer->mask->show_mask) if (layer->mask && layer->mask->show_mask)
{ {
pixel_region_init (&src2PR, pixel_region_init (&src2PR,
gimp_drawable_data (GIMP_DRAWABLE (layer->mask)), gimp_drawable_get_tiles (GIMP_DRAWABLE (layer->mask)),
(x1 - off_x), (y1 - off_y), (x1 - off_x), (y1 - off_y),
(x2 - x1), (y2 - y1), FALSE); (x2 - x1), (y2 - y1), FALSE);
@ -229,14 +229,14 @@ gimp_projection_construct_layers (GimpProjection *proj,
PixelRegion *mask = NULL; PixelRegion *mask = NULL;
pixel_region_init (&src2PR, pixel_region_init (&src2PR,
gimp_drawable_data (GIMP_DRAWABLE (layer)), gimp_drawable_get_tiles (GIMP_DRAWABLE (layer)),
(x1 - off_x), (y1 - off_y), (x1 - off_x), (y1 - off_y),
(x2 - x1), (y2 - y1), FALSE); (x2 - x1), (y2 - y1), FALSE);
if (layer->mask && layer->mask->apply_mask) if (layer->mask && layer->mask->apply_mask)
{ {
pixel_region_init (&maskPR, pixel_region_init (&maskPR,
gimp_drawable_data (GIMP_DRAWABLE (layer->mask)), gimp_drawable_get_tiles (GIMP_DRAWABLE (layer->mask)),
(x1 - off_x), (y1 - off_y), (x1 - off_x), (y1 - off_y),
(x2 - x1), (y2 - y1), FALSE); (x2 - x1), (y2 - y1), FALSE);
mask = &maskPR; mask = &maskPR;
@ -311,7 +311,7 @@ gimp_projection_construct_channels (GimpProjection *proj,
x, y, w, h, x, y, w, h,
TRUE); TRUE);
pixel_region_init (&src2PR, pixel_region_init (&src2PR,
gimp_drawable_data (GIMP_DRAWABLE (channel)), gimp_drawable_get_tiles (GIMP_DRAWABLE (channel)),
x, y, w, h, x, y, w, h,
FALSE); FALSE);

View File

@ -677,7 +677,7 @@ gimp_selection_extract (GimpChannel *selection,
tile_manager_set_offsets (tiles, x1 + off_x, y1 + off_y); tile_manager_set_offsets (tiles, x1 + off_x, y1 + off_y);
/* configure the pixel regions */ /* configure the pixel regions */
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x1, y1, x1, y1,
x2 - x1, y2 - y1, x2 - x1, y2 - y1,
cut_image); cut_image);
@ -688,7 +688,8 @@ gimp_selection_extract (GimpChannel *selection,
if (non_empty) /* If there is a selection, extract from it */ if (non_empty) /* If there is a selection, extract from it */
{ {
pixel_region_init (&maskPR, gimp_drawable_data (GIMP_DRAWABLE (selection)), pixel_region_init (&maskPR,
gimp_drawable_get_tiles (GIMP_DRAWABLE (selection)),
(x1 + off_x), (y1 + off_y), (x2 - x1), (y2 - y1), (x1 + off_x), (y1 + off_y), (x2 - x1), (y2 - y1),
FALSE); FALSE);

View File

@ -476,7 +476,7 @@ gimp_display_shell_draw_tri_row (GimpDrawable *texture,
bytes = gdk_pixbuf_get_n_channels (row); bytes = gdk_pixbuf_get_n_channels (row);
pptr = gdk_pixbuf_get_pixels (row); pptr = gdk_pixbuf_get_pixels (row);
tiles = gimp_drawable_data (texture); tiles = gimp_drawable_get_tiles (texture);
if (x1 > x2) if (x1 > x2)
{ {
@ -637,12 +637,12 @@ gimp_display_shell_draw_tri_row_mask (GimpDrawable *texture,
bytes = gdk_pixbuf_get_n_channels (row); bytes = gdk_pixbuf_get_n_channels (row);
alpha = bytes - 1; alpha = bytes - 1;
pptr = gdk_pixbuf_get_pixels (row); pptr = gdk_pixbuf_get_pixels (row);
tiles = gimp_drawable_data (texture); tiles = gimp_drawable_get_tiles (texture);
masktiles = gimp_drawable_data (GIMP_DRAWABLE (mask)); masktiles = gimp_drawable_get_tiles (GIMP_DRAWABLE (mask));
if (x1 > x2) if (x1 > x2)
{ {
gint tmp; gint tmp;
gfloat ftmp; gfloat ftmp;
tmp = x2; x2 = x1; x1 = tmp; tmp = x2; x2 = x1; x1 = tmp;

View File

@ -253,7 +253,7 @@ gimp_display_shell_render (GimpDisplayShell *shell,
else if (shell->mask) else if (shell->mask)
{ {
render_image_init_info (&info, shell, x, y, render_image_init_info (&info, shell, x, y,
gimp_drawable_data (shell->mask)); gimp_drawable_get_tiles (shell->mask));
gimp_display_shell_render_mask (shell, &info); gimp_display_shell_render_mask (shell, &info);
} }

View File

@ -192,7 +192,7 @@ gimp_convolve_motion (GimpPaintCore *paint_core,
return; return;
/* configure the source pixel region */ /* configure the source pixel region */
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
area->x, area->y, area->width, area->height, FALSE); area->x, area->y, area->width, area->height, FALSE);
/* configure the destination pixel region */ /* configure the destination pixel region */

View File

@ -406,7 +406,7 @@ gimp_paint_core_cancel (GimpPaintCore *core,
return; return;
gimp_paint_core_copy_valid_tiles (core->undo_tiles, gimp_paint_core_copy_valid_tiles (core->undo_tiles,
gimp_drawable_data (drawable), gimp_drawable_get_tiles (drawable),
core->x1, core->y1, core->x1, core->y1,
core->x2 - core->x1, core->x2 - core->x1,
core->y2 - core->y1); core->y2 - core->y1);
@ -533,7 +533,7 @@ gimp_paint_core_get_orig_image (GimpPaintCore *core,
y2 = CLAMP (y2, 0, drawable_height); y2 = CLAMP (y2, 0, drawable_height);
/* configure the pixel regions */ /* configure the pixel regions */
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x1, y1, x1, y1,
(x2 - x1), (y2 - y1), (x2 - x1), (y2 - y1),
FALSE); FALSE);
@ -978,8 +978,9 @@ gimp_paint_core_validate_undo_tiles (GimpPaintCore *core,
if (! tile_is_valid (dest_tile)) if (! tile_is_valid (dest_tile))
{ {
src_tile = tile_manager_get_tile (gimp_drawable_data (drawable), src_tile =
j, i, TRUE, FALSE); tile_manager_get_tile (gimp_drawable_get_tiles (drawable),
j, i, TRUE, FALSE);
tile_manager_map_tile (core->undo_tiles, j, i, src_tile); tile_manager_map_tile (core->undo_tiles, j, i, src_tile);
tile_release (src_tile, FALSE); tile_release (src_tile, FALSE);
} }

View File

@ -201,7 +201,7 @@ gimp_smudge_start (GimpPaintCore *paint_core,
g_free (fill); g_free (fill);
} }
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
area->x, area->y, area->width, area->height, FALSE); area->x, area->y, area->width, area->height, FALSE);
pixel_region_init_data (&smudge->accumPR, smudge->accum_data, pixel_region_init_data (&smudge->accumPR, smudge->accum_data,
@ -258,7 +258,7 @@ gimp_smudge_motion (GimpPaintCore *paint_core,
return; return;
/* srcPR will be the pixels under the current painthit from the drawable */ /* srcPR will be the pixels under the current painthit from the drawable */
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
area->x, area->y, area->width, area->height, FALSE); area->x, area->y, area->width, area->height, FALSE);
/* Enable pressure sensitive rate */ /* Enable pressure sensitive rate */

View File

@ -86,7 +86,7 @@ brightness_contrast_invoker (GimpProcedure *procedure,
contrast / 127.0, contrast / 127.0,
gimp_drawable_bytes (drawable)); gimp_drawable_bytes (drawable));
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
@ -233,7 +233,7 @@ posterize_invoker (GimpProcedure *procedure,
lut = posterize_lut_new (levels, gimp_drawable_bytes (drawable)); lut = posterize_lut_new (levels, gimp_drawable_bytes (drawable));
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
@ -423,7 +423,7 @@ curves_spline_invoker (GimpProcedure *procedure,
&c, &c,
gimp_drawable_bytes (drawable)); gimp_drawable_bytes (drawable));
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
@ -500,7 +500,7 @@ curves_explicit_invoker (GimpProcedure *procedure,
&c, &c,
gimp_drawable_bytes (drawable)); gimp_drawable_bytes (drawable));
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
@ -568,7 +568,7 @@ color_balance_invoker (GimpProcedure *procedure,
color_balance_create_lookup_tables (&cb); color_balance_create_lookup_tables (&cb);
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
@ -627,7 +627,7 @@ colorize_invoker (GimpProcedure *procedure,
colorize_calculate (&colors); colorize_calculate (&colors);
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
@ -760,7 +760,7 @@ hue_saturation_invoker (GimpProcedure *procedure,
/* Calculate the transfer arrays */ /* Calculate the transfer arrays */
hue_saturation_calculate_transfers (&hs); hue_saturation_calculate_transfers (&hs);
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
@ -814,7 +814,7 @@ threshold_invoker (GimpProcedure *procedure,
tr.low_threshold = low_threshold; tr.low_threshold = low_threshold;
tr.high_threshold = high_threshold; tr.high_threshold = high_threshold;
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);

View File

@ -838,7 +838,7 @@ drawable_get_pixel_invoker (GimpProcedure *procedure,
num_channels = gimp_drawable_bytes (drawable); num_channels = gimp_drawable_bytes (drawable);
pixel = g_new (guint8, num_channels); pixel = g_new (guint8, num_channels);
tile = tile_manager_get_tile (gimp_drawable_data (drawable), tile = tile_manager_get_tile (gimp_drawable_get_tiles (drawable),
x_coord, y_coord, x_coord, y_coord,
TRUE, TRUE); TRUE, TRUE);
@ -896,7 +896,7 @@ drawable_set_pixel_invoker (GimpProcedure *procedure,
guint8 *p; guint8 *p;
gint b; gint b;
tile = tile_manager_get_tile (gimp_drawable_data (drawable), tile = tile_manager_get_tile (gimp_drawable_get_tiles (drawable),
x_coord, y_coord, x_coord, y_coord,
TRUE, TRUE); TRUE, TRUE);

View File

@ -236,7 +236,7 @@ plug_in_handle_tile_req (PlugIn *plug_in,
if (tile_info->shadow) if (tile_info->shadow)
tm = gimp_drawable_shadow (drawable); tm = gimp_drawable_shadow (drawable);
else else
tm = gimp_drawable_data (drawable); tm = gimp_drawable_get_tiles (drawable);
tile = tile_manager_get (tm, tile_info->tile_num, TRUE, TRUE); tile = tile_manager_get (tm, tile_info->tile_num, TRUE, TRUE);
@ -289,7 +289,7 @@ plug_in_handle_tile_req (PlugIn *plug_in,
if (tile_req->shadow) if (tile_req->shadow)
tm = gimp_drawable_shadow (drawable); tm = gimp_drawable_shadow (drawable);
else else
tm = gimp_drawable_data (drawable); tm = gimp_drawable_get_tiles (drawable);
tile = tile_manager_get (tm, tile_req->tile_num, TRUE, FALSE); tile = tile_manager_get (tm, tile_req->tile_num, TRUE, FALSE);

View File

@ -236,7 +236,7 @@ plug_in_handle_tile_req (PlugIn *plug_in,
if (tile_info->shadow) if (tile_info->shadow)
tm = gimp_drawable_shadow (drawable); tm = gimp_drawable_shadow (drawable);
else else
tm = gimp_drawable_data (drawable); tm = gimp_drawable_get_tiles (drawable);
tile = tile_manager_get (tm, tile_info->tile_num, TRUE, TRUE); tile = tile_manager_get (tm, tile_info->tile_num, TRUE, TRUE);
@ -289,7 +289,7 @@ plug_in_handle_tile_req (PlugIn *plug_in,
if (tile_req->shadow) if (tile_req->shadow)
tm = gimp_drawable_shadow (drawable); tm = gimp_drawable_shadow (drawable);
else else
tm = gimp_drawable_data (drawable); tm = gimp_drawable_get_tiles (drawable);
tile = tile_manager_get (tm, tile_req->tile_num, TRUE, FALSE); tile = tile_manager_get (tm, tile_req->tile_num, TRUE, FALSE);

View File

@ -635,7 +635,7 @@ gimp_foreground_select_tool_select (GimpFreeSelectTool *free_sel,
"foreground-extraction", NULL); "foreground-extraction", NULL);
gimp_scan_convert_render_value (scan_convert, gimp_scan_convert_render_value (scan_convert,
gimp_drawable_data (GIMP_DRAWABLE (mask)), gimp_drawable_get_tiles (GIMP_DRAWABLE (mask)),
0, 0, 128); 0, 0, 128);
gimp_scan_convert_free (scan_convert); gimp_scan_convert_free (scan_convert);
@ -792,7 +792,7 @@ gimp_foreground_select_tool_stroke (GimpChannel *mask,
gimp_scan_convert_compose (scan_convert, gimp_scan_convert_compose (scan_convert,
stroke->background ? stroke->background ?
GIMP_CHANNEL_OP_SUBTRACT : GIMP_CHANNEL_OP_ADD, GIMP_CHANNEL_OP_SUBTRACT : GIMP_CHANNEL_OP_ADD,
gimp_drawable_data (GIMP_DRAWABLE (mask)), gimp_drawable_get_tiles (GIMP_DRAWABLE (mask)),
0, 0); 0, 0);
gimp_scan_convert_free (scan_convert); gimp_scan_convert_free (scan_convert);
} }

View File

@ -389,7 +389,7 @@ gimp_fuzzy_select_tool_calculate (GimpFuzzySelectTool *fuzzy_sel,
* of the color-contiguous region * of the color-contiguous region
*/ */
pixel_region_init (&maskPR, pixel_region_init (&maskPR,
gimp_drawable_data (GIMP_DRAWABLE (fuzzy_sel->fuzzy_mask)), gimp_drawable_get_tiles (GIMP_DRAWABLE (fuzzy_sel->fuzzy_mask)),
0, 0, 0, 0,
gimp_item_width (GIMP_ITEM (fuzzy_sel->fuzzy_mask)), gimp_item_width (GIMP_ITEM (fuzzy_sel->fuzzy_mask)),
gimp_item_height (GIMP_ITEM (fuzzy_sel->fuzzy_mask)), gimp_item_height (GIMP_ITEM (fuzzy_sel->fuzzy_mask)),

View File

@ -389,7 +389,7 @@ gimp_fuzzy_select_tool_calculate (GimpFuzzySelectTool *fuzzy_sel,
* of the color-contiguous region * of the color-contiguous region
*/ */
pixel_region_init (&maskPR, pixel_region_init (&maskPR,
gimp_drawable_data (GIMP_DRAWABLE (fuzzy_sel->fuzzy_mask)), gimp_drawable_get_tiles (GIMP_DRAWABLE (fuzzy_sel->fuzzy_mask)),
0, 0, 0, 0,
gimp_item_width (GIMP_ITEM (fuzzy_sel->fuzzy_mask)), gimp_item_width (GIMP_ITEM (fuzzy_sel->fuzzy_mask)),
gimp_item_height (GIMP_ITEM (fuzzy_sel->fuzzy_mask)), gimp_item_height (GIMP_ITEM (fuzzy_sel->fuzzy_mask)),

View File

@ -59,7 +59,7 @@ HELP
contrast / 127.0, contrast / 127.0,
gimp_drawable_bytes (drawable)); gimp_drawable_bytes (drawable));
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
@ -239,7 +239,7 @@ HELP
lut = posterize_lut_new (levels, gimp_drawable_bytes (drawable)); lut = posterize_lut_new (levels, gimp_drawable_bytes (drawable));
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
@ -471,7 +471,7 @@ HELP
&c, &c,
gimp_drawable_bytes (drawable)); gimp_drawable_bytes (drawable));
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
@ -558,7 +558,7 @@ HELP
&c, &c,
gimp_drawable_bytes (drawable)); gimp_drawable_bytes (drawable));
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
@ -637,7 +637,7 @@ HELP
color_balance_create_lookup_tables (&cb); color_balance_create_lookup_tables (&cb);
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
@ -702,7 +702,7 @@ HELP
colorize_calculate (&colors); colorize_calculate (&colors);
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
@ -856,7 +856,7 @@ HELP
/* Calculate the transfer arrays */ /* Calculate the transfer arrays */
hue_saturation_calculate_transfers (&hs); hue_saturation_calculate_transfers (&hs);
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);
@ -917,7 +917,7 @@ HELP
tr.low_threshold = low_threshold; tr.low_threshold = low_threshold;
tr.high_threshold = high_threshold; tr.high_threshold = high_threshold;
pixel_region_init (&srcPR, gimp_drawable_data (drawable), pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable),
x, y, width, height, FALSE); x, y, width, height, FALSE);
pixel_region_init (&destPR, gimp_drawable_shadow (drawable), pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
x, y, width, height, TRUE); x, y, width, height, TRUE);

View File

@ -870,7 +870,7 @@ HELP
num_channels = gimp_drawable_bytes (drawable); num_channels = gimp_drawable_bytes (drawable);
pixel = g_new (guint8, num_channels); pixel = g_new (guint8, num_channels);
tile = tile_manager_get_tile (gimp_drawable_data (drawable), tile = tile_manager_get_tile (gimp_drawable_get_tiles (drawable),
x_coord, y_coord, x_coord, y_coord,
TRUE, TRUE); TRUE, TRUE);
@ -928,7 +928,7 @@ HELP
guint8 *p; guint8 *p;
gint b; gint b;
tile = tile_manager_get_tile (gimp_drawable_data (drawable), tile = tile_manager_get_tile (gimp_drawable_get_tiles (drawable),
x_coord, y_coord, x_coord, y_coord,
TRUE, TRUE); TRUE, TRUE);