removed channel_update() because channel.c should not call

2001-01-29  Michael Natterer  <mitch@gimp.org>

	* app/channel.[ch]: removed channel_update() because channel.c
	should not call gdisplays_update(). Use drawable_update() and
	a subsequent gdisplays_update() instead.

	* app/qmask.c: do as described above.

	* app/channel_ops.c
	* app/channels_dialog.c
	* app/commands.c
	* app/convert.c
	* app/disp_callbacks.c
	* app/equalize.c
	* app/fileops.c
	* app/floating_sel.c
	* app/gdisplay.c
	* app/gimage.c
	* app/gimage_mask.c
	* app/gimpdnd.c
	* app/gimpdrawablepreview.c
	* app/gimphistogram.c
	* app/gimplayermask.c
	* app/global_edit.c
	* app/histogramwidget.c
	* app/histogramwidget.h
	* app/image_map.c
	* app/image_new.c
	* app/invert.c
	* app/layer.c
	* app/layer_select.c
	* app/paths_dialog.c
	* app/plug_in.c
	* app/scan_convert.c
	* app/undo_history.c
	* app/xcf.c: include gimpdrawable.h instead of drawable.h where
	possible, removed useless includes, minor other cleanups.
This commit is contained in:
Michael Natterer 2001-01-29 17:54:02 +00:00 committed by Michael Natterer
parent bd7a4bf1b0
commit df0bbb26fb
101 changed files with 489 additions and 415 deletions

View File

@ -1,3 +1,41 @@
2001-01-29 Michael Natterer <mitch@gimp.org>
* app/channel.[ch]: removed channel_update() because channel.c
should not call gdisplays_update(). Use drawable_update() and
a subsequent gdisplays_update() instead.
* app/qmask.c: do as described above.
* app/channel_ops.c
* app/channels_dialog.c
* app/commands.c
* app/convert.c
* app/disp_callbacks.c
* app/equalize.c
* app/fileops.c
* app/floating_sel.c
* app/gdisplay.c
* app/gimage.c
* app/gimage_mask.c
* app/gimpdnd.c
* app/gimpdrawablepreview.c
* app/gimphistogram.c
* app/gimplayermask.c
* app/global_edit.c
* app/histogramwidget.c
* app/histogramwidget.h
* app/image_map.c
* app/image_new.c
* app/invert.c
* app/layer.c
* app/layer_select.c
* app/paths_dialog.c
* app/plug_in.c
* app/scan_convert.c
* app/undo_history.c
* app/xcf.c: include gimpdrawable.h instead of drawable.h where
possible, removed useless includes, minor other cleanups.
2001-01-29 Michael Natterer <mitch@gimp.org>
* app/Makefile.am

View File

@ -41,7 +41,6 @@
#include "devices.h"
#include "docindex.h"
#include "channel_ops.h"
#include "drawable.h"
#include "equalize.h"
#include "errorconsole.h"
#include "fileops.h"
@ -49,6 +48,7 @@
#include "gdisplay_ops.h"
#include "gimage_mask.h"
#include "gimpcontext.h"
#include "gimpdrawable.h"
#include "gimphelp.h"
#include "gimpimage.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -364,7 +364,13 @@ edit_qmask_query_ok_callback (GtkWidget *widget,
if (gimp_rgba_distance (&color, &channel->color) > 0.0001)
{
channel->color = color;
gimp_channel_update (channel);
drawable_update (GIMP_DRAWABLE (channel),
0, 0,
GIMP_DRAWABLE (channel)->width,
GIMP_DRAWABLE (channel)->height);
gdisplays_flush ();
}
}

View File

@ -364,7 +364,13 @@ edit_qmask_query_ok_callback (GtkWidget *widget,
if (gimp_rgba_distance (&color, &channel->color) > 0.0001)
{
channel->color = color;
gimp_channel_update (channel);
drawable_update (GIMP_DRAWABLE (channel),
0, 0,
GIMP_DRAWABLE (channel)->width,
GIMP_DRAWABLE (channel)->height);
gdisplays_flush ();
}
}

View File

@ -31,21 +31,20 @@
#include "apptypes.h"
#include "drawable.h"
#include "gimphistogram.h"
#include "pixel_region.h"
#include "gimpdrawable.h"
#include "channel.h"
#include "gimpdrawable.h"
#include "gimphistogram.h"
#include "gimpimage.h"
#include "gimprc.h"
#include "pixel_processor.h"
#include "pixel_region.h"
struct _GimpHistogram
{
gint bins;
gdouble **values;
gint nchannels;
gint n_channels;
#ifdef ENABLE_MP
pthread_mutex_t mutex;
@ -62,9 +61,9 @@ gimp_histogram_new (void)
GimpHistogram *histogram;
histogram = g_new0 (GimpHistogram, 1);
histogram->bins = 0;
histogram->values = NULL;
histogram->nchannels = 0;
histogram->bins = 0;
histogram->values = NULL;
histogram->n_channels = 0;
#ifdef ENABLE_MP
histogram->nthreads = 0;
@ -82,7 +81,7 @@ gimp_histogram_free (GimpHistogram *histogram)
if (histogram->values)
{
for (i = 0; i < histogram->nchannels; i++)
for (i = 0; i < histogram->n_channels; i++)
g_free (histogram->values[i]);
g_free (histogram->values);
}
@ -274,19 +273,19 @@ gimp_histogram_alloc (GimpHistogram *histogram,
{
gint i;
if (bytes + 1 != histogram->nchannels)
if (bytes + 1 != histogram->n_channels)
{
if (histogram->values)
{
for (i = 0; i < histogram->nchannels; i++)
for (i = 0; i < histogram->n_channels; i++)
g_free (histogram->values[i]);
g_free (histogram->values);
}
histogram->nchannels = bytes + 1;
histogram->values = g_new0 (gdouble *, histogram->nchannels);
histogram->n_channels = bytes + 1;
histogram->values = g_new0 (gdouble *, histogram->n_channels);
for (i = 0; i < histogram->nchannels; i++)
for (i = 0; i < histogram->n_channels; i++)
histogram->values[i] = g_new (double, 256);
}
}
@ -310,10 +309,10 @@ gimp_histogram_calculate (GimpHistogram *histogram,
for (i = 0; i < num_processors; i++)
{
histogram->tmp_values[i] = g_new0 (double *, histogram->nchannels);
histogram->tmp_values[i] = g_new0 (double *, histogram->n_channels);
histogram->tmp_slots[i] = 0;
for (j = 0; j < histogram->nchannels; j++)
for (j = 0; j < histogram->n_channels; j++)
{
histogram->tmp_values[i][j] = g_new0 (gdouble, 256);
@ -323,7 +322,7 @@ gimp_histogram_calculate (GimpHistogram *histogram,
}
#endif
for (i = 0; i < histogram->nchannels; i++)
for (i = 0; i < histogram->n_channels; i++)
for (j = 0; j < 256; j++)
histogram->values[i][j] = 0.0;
@ -334,7 +333,7 @@ gimp_histogram_calculate (GimpHistogram *histogram,
/* add up all the tmp buffers and free their memmory */
for (i = 0; i < num_processors; i++)
{
for (j = 0; j < histogram->nchannels; j++)
for (j = 0; j < histogram->n_channels; j++)
{
for (k = 0; k < 256; k++)
histogram->values[j][k] += histogram->tmp_values[i][j][k];
@ -401,7 +400,7 @@ gimp_histogram_get_value (GimpHistogram *histogram,
GimpHistogramChannel channel,
gint bin)
{
if (channel < histogram->nchannels && bin >= 0 && bin < 256)
if (channel < histogram->n_channels && bin >= 0 && bin < 256)
return histogram->values[channel][bin];
return 0.0;
@ -412,7 +411,7 @@ gimp_histogram_get_channel (GimpHistogram *histogram,
GimpHistogramChannel channel,
gint bin)
{
if (histogram->nchannels > 3)
if (histogram->n_channels > 3)
return gimp_histogram_get_value (histogram, channel + 1, bin);
else
return gimp_histogram_get_value (histogram, channel , bin);
@ -421,7 +420,7 @@ gimp_histogram_get_channel (GimpHistogram *histogram,
gint
gimp_histogram_nchannels (GimpHistogram *histogram)
{
return histogram->nchannels - 1;
return histogram->n_channels - 1;
}
gdouble

View File

@ -32,7 +32,6 @@
#include "boundary.h"
#include "channel.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimpimage.h"
#include "gimage_mask.h"
#include "gimppreviewcache.h"
@ -415,20 +414,6 @@ gimp_channel_resize (GimpChannel *channel,
GIMP_DRAWABLE (channel)->height);
}
void
gimp_channel_update (GimpChannel *channel)
{
drawable_update (GIMP_DRAWABLE (channel),
0, 0,
GIMP_DRAWABLE (channel)->width,
GIMP_DRAWABLE (channel)->height);
gdisplays_flush ();
}
/**********************/
/* access functions */
/**********************/
gboolean
gimp_channel_toggle_visibility (GimpChannel *channel)
{
@ -437,6 +422,7 @@ gimp_channel_toggle_visibility (GimpChannel *channel)
return GIMP_DRAWABLE (channel)->visible;
}
/******************************/
/* selection mask functions */
/******************************/

View File

@ -108,7 +108,6 @@ void gimp_channel_resize (GimpChannel *channel,
gint new_height,
gint offx,
gint offy);
void gimp_channel_update (GimpChannel *channel);
gboolean gimp_channel_toggle_visibility (GimpChannel *channel);

View File

@ -486,17 +486,20 @@ offset (GimpImage *gimage,
}
/* push an undo */
drawable_apply_image (drawable, 0, 0,
drawable_apply_image (drawable,
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable),
gimp_drawable_data (drawable), FALSE);
gimp_drawable_data (drawable),
FALSE);
/* swap the tiles */
drawable->tiles = new_tiles;
/* update the drawable */
drawable_update (drawable, 0, 0,
drawable_update (drawable,
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable));
}
@ -512,8 +515,8 @@ offset_ok_callback (GtkWidget *widget,
OffsetDialog *off_d;
GImage *gimage;
GimpDrawable *drawable;
gint offset_x;
gint offset_y;
gint offset_x;
gint offset_y;
off_d = (OffsetDialog *) data;

View File

@ -1772,9 +1772,11 @@ channel_widget_drop_color (GtkWidget *widget,
{
channel->color = *color;
drawable_update (GIMP_DRAWABLE (channel), 0, 0,
drawable_update (GIMP_DRAWABLE (channel),
0, 0,
GIMP_DRAWABLE (channel)->width,
GIMP_DRAWABLE (channel)->height);
gdisplays_flush ();
}
}
@ -2680,9 +2682,12 @@ edit_channel_query_ok_callback (GtkWidget *widget,
if (gimp_rgba_distance (&color, &channel->color) > 0.0001)
{
channel->color = color;
drawable_update (GIMP_DRAWABLE (channel), 0, 0,
drawable_update (GIMP_DRAWABLE (channel),
0, 0,
GIMP_DRAWABLE (channel)->width,
GIMP_DRAWABLE (channel)->height);
gdisplays_flush ();
}
}

View File

@ -41,7 +41,6 @@
#include "devices.h"
#include "docindex.h"
#include "channel_ops.h"
#include "drawable.h"
#include "equalize.h"
#include "errorconsole.h"
#include "fileops.h"
@ -49,6 +48,7 @@
#include "gdisplay_ops.h"
#include "gimage_mask.h"
#include "gimpcontext.h"
#include "gimpdrawable.h"
#include "gimphelp.h"
#include "gimpimage.h"
#include "gimprc.h"

View File

@ -99,18 +99,18 @@
#include "convert.h"
#include "cursorutil.h"
#include "drawable.h"
#include "floating_sel.h"
#include "fsdither.h"
#include "gdisplay.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "layer.h"
#include "undo.h"
#include "palette.h"
#include "gimppalette.h"
#include "layer.h"
#include "palette.h"
#include "palette_select.h"
#include "pixel_region.h"
#include "tile_manager.h"
#include "undo.h"
#include "tools/brightness_contrast.h"
#include "tools/color_balance.h"

View File

@ -26,9 +26,7 @@
#include "apptypes.h"
#include "appenv.h"
#include "drawable.h"
#include "image_new.h"
#include "floating_sel.h"
#include "gdisplay.h"
#include "gimage.h"
@ -36,6 +34,7 @@
#include "gimpcontext.h"
#include "gimplayermask.h"
#include "global_edit.h"
#include "image_new.h"
#include "layer.h"
#include "paint_funcs.h"
#include "pixel_region.h"
@ -446,7 +445,9 @@ edit_clear (GimpImage *gimage,
ERASE_MODE, NULL, x1, y1);
/* update the image */
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
drawable_update (drawable,
x1, y1,
(x2 - x1), (y2 - y1));
/* free the temporary tiles */
tile_manager_destroy (buf_tiles);
@ -518,7 +519,9 @@ edit_fill (GimpImage *gimage,
NORMAL_MODE, NULL, x1, y1);
/* update the image */
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
drawable_update (drawable,
x1, y1,
(x2 - x1), (y2 - y1));
/* free the temporary tiles */
tile_manager_destroy (buf_tiles);

View File

@ -32,7 +32,6 @@
#include "boundary.h"
#include "channel.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimpimage.h"
#include "gimage_mask.h"
#include "gimppreviewcache.h"
@ -415,20 +414,6 @@ gimp_channel_resize (GimpChannel *channel,
GIMP_DRAWABLE (channel)->height);
}
void
gimp_channel_update (GimpChannel *channel)
{
drawable_update (GIMP_DRAWABLE (channel),
0, 0,
GIMP_DRAWABLE (channel)->width,
GIMP_DRAWABLE (channel)->height);
gdisplays_flush ();
}
/**********************/
/* access functions */
/**********************/
gboolean
gimp_channel_toggle_visibility (GimpChannel *channel)
{
@ -437,6 +422,7 @@ gimp_channel_toggle_visibility (GimpChannel *channel)
return GIMP_DRAWABLE (channel)->visible;
}
/******************************/
/* selection mask functions */
/******************************/

View File

@ -108,7 +108,6 @@ void gimp_channel_resize (GimpChannel *channel,
gint new_height,
gint offx,
gint offy);
void gimp_channel_update (GimpChannel *channel);
gboolean gimp_channel_toggle_visibility (GimpChannel *channel);

View File

@ -32,7 +32,6 @@
#include "boundary.h"
#include "channel.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimpimage.h"
#include "gimage_mask.h"
#include "gimppreviewcache.h"
@ -415,20 +414,6 @@ gimp_channel_resize (GimpChannel *channel,
GIMP_DRAWABLE (channel)->height);
}
void
gimp_channel_update (GimpChannel *channel)
{
drawable_update (GIMP_DRAWABLE (channel),
0, 0,
GIMP_DRAWABLE (channel)->width,
GIMP_DRAWABLE (channel)->height);
gdisplays_flush ();
}
/**********************/
/* access functions */
/**********************/
gboolean
gimp_channel_toggle_visibility (GimpChannel *channel)
{
@ -437,6 +422,7 @@ gimp_channel_toggle_visibility (GimpChannel *channel)
return GIMP_DRAWABLE (channel)->visible;
}
/******************************/
/* selection mask functions */
/******************************/

View File

@ -108,7 +108,6 @@ void gimp_channel_resize (GimpChannel *channel,
gint new_height,
gint offx,
gint offy);
void gimp_channel_update (GimpChannel *channel);
gboolean gimp_channel_toggle_visibility (GimpChannel *channel);

View File

@ -73,7 +73,6 @@ equalize (GimpImage *gimage,
hist = gimp_histogram_new ();
gimp_histogram_calculate_drawable (hist, drawable);
/* Build equalization LUT */
lut = eq_histogram_lut_new (hist, bytes);
@ -92,5 +91,8 @@ equalize (GimpImage *gimage,
gimp_histogram_free (hist);
gimp_drawable_merge_shadow (drawable, TRUE);
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
drawable_update (drawable,
x1, y1,
(x2 - x1), (y2 - y1));
}

View File

@ -22,11 +22,10 @@
#include "apptypes.h"
#include "appenv.h"
#include "drawable.h"
#include "invert.h"
#include "gimpimage.h"
#include "gimplut.h"
#include "invert.h"
#include "lut_funcs.h"
#include "pixel_processor.h"
#include "pixel_region.h"
@ -40,8 +39,8 @@ void
image_invert (GimpImage *gimage)
{
GimpDrawable *drawable;
Argument *return_vals;
gint nreturn_vals;
Argument *return_vals;
gint nreturn_vals;
drawable = gimp_image_active_drawable (gimage);
@ -69,9 +68,9 @@ image_invert (GimpImage *gimage)
void
invert (GimpDrawable *drawable)
{
PixelRegion srcPR, destPR;
gint x1, y1, x2, y2;
GimpLut *lut;
PixelRegion srcPR, destPR;
gint x1, y1, x2, y2;
GimpLut *lut;
lut = invert_lut_new (gimp_drawable_bytes (drawable));
@ -87,5 +86,8 @@ invert (GimpDrawable *drawable)
gimp_lut_free (lut);
gimp_drawable_merge_shadow (drawable, TRUE);
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
drawable_update (drawable,
x1, y1,
(x2 - x1), (y2 - y1));
}

View File

@ -486,17 +486,20 @@ offset (GimpImage *gimage,
}
/* push an undo */
drawable_apply_image (drawable, 0, 0,
drawable_apply_image (drawable,
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable),
gimp_drawable_data (drawable), FALSE);
gimp_drawable_data (drawable),
FALSE);
/* swap the tiles */
drawable->tiles = new_tiles;
/* update the drawable */
drawable_update (drawable, 0, 0,
drawable_update (drawable,
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable));
}
@ -512,8 +515,8 @@ offset_ok_callback (GtkWidget *widget,
OffsetDialog *off_d;
GImage *gimage;
GimpDrawable *drawable;
gint offset_x;
gint offset_y;
gint offset_x;
gint offset_y;
off_d = (OffsetDialog *) data;

View File

@ -26,9 +26,7 @@
#include "apptypes.h"
#include "appenv.h"
#include "drawable.h"
#include "image_new.h"
#include "floating_sel.h"
#include "gdisplay.h"
#include "gimage.h"
@ -36,6 +34,7 @@
#include "gimpcontext.h"
#include "gimplayermask.h"
#include "global_edit.h"
#include "image_new.h"
#include "layer.h"
#include "paint_funcs.h"
#include "pixel_region.h"
@ -446,7 +445,9 @@ edit_clear (GimpImage *gimage,
ERASE_MODE, NULL, x1, y1);
/* update the image */
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
drawable_update (drawable,
x1, y1,
(x2 - x1), (y2 - y1));
/* free the temporary tiles */
tile_manager_destroy (buf_tiles);
@ -518,7 +519,9 @@ edit_fill (GimpImage *gimage,
NORMAL_MODE, NULL, x1, y1);
/* update the image */
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
drawable_update (drawable,
x1, y1,
(x2 - x1), (y2 - y1));
/* free the temporary tiles */
tile_manager_destroy (buf_tiles);

View File

@ -99,18 +99,18 @@
#include "convert.h"
#include "cursorutil.h"
#include "drawable.h"
#include "floating_sel.h"
#include "fsdither.h"
#include "gdisplay.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "layer.h"
#include "undo.h"
#include "palette.h"
#include "gimppalette.h"
#include "layer.h"
#include "palette.h"
#include "palette_select.h"
#include "pixel_region.h"
#include "tile_manager.h"
#include "undo.h"
#include "tools/brightness_contrast.h"
#include "tools/color_balance.h"

View File

@ -486,17 +486,20 @@ offset (GimpImage *gimage,
}
/* push an undo */
drawable_apply_image (drawable, 0, 0,
drawable_apply_image (drawable,
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable),
gimp_drawable_data (drawable), FALSE);
gimp_drawable_data (drawable),
FALSE);
/* swap the tiles */
drawable->tiles = new_tiles;
/* update the drawable */
drawable_update (drawable, 0, 0,
drawable_update (drawable,
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable));
}
@ -512,8 +515,8 @@ offset_ok_callback (GtkWidget *widget,
OffsetDialog *off_d;
GImage *gimage;
GimpDrawable *drawable;
gint offset_x;
gint offset_y;
gint offset_x;
gint offset_y;
off_d = (OffsetDialog *) data;

View File

@ -22,15 +22,14 @@
#include "apptypes.h"
#include "appenv.h"
#include "boundary.h"
#include "channel.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "gimpimage.h"
#include "gimplayermask.h"
#include "gimage_mask.h"
#include "gimprc.h"
#include "layer.h"
#include "paint_funcs.h"
@ -151,17 +150,19 @@ gimage_mask_invalidate (GImage *gimage)
* mask in the composition of the floating selection
*/
layer = gimp_image_get_active_layer (gimage);
if (layer && gimp_layer_is_floating_sel (layer))
drawable_update (GIMP_DRAWABLE(layer), 0, 0,
GIMP_DRAWABLE(layer)->width,
GIMP_DRAWABLE(layer)->height);
drawable_update (GIMP_DRAWABLE (layer),
0, 0,
GIMP_DRAWABLE (layer)->width,
GIMP_DRAWABLE (layer)->height);
}
gint
gimage_mask_value (GImage *gimage,
int x,
int y)
gint x,
gint y)
{
return gimp_channel_value (gimp_image_get_mask (gimage), x, y);
}

View File

@ -364,7 +364,13 @@ edit_qmask_query_ok_callback (GtkWidget *widget,
if (gimp_rgba_distance (&color, &channel->color) > 0.0001)
{
channel->color = color;
gimp_channel_update (channel);
drawable_update (GIMP_DRAWABLE (channel),
0, 0,
GIMP_DRAWABLE (channel)->width,
GIMP_DRAWABLE (channel)->height);
gdisplays_flush ();
}
}

View File

@ -364,7 +364,13 @@ edit_qmask_query_ok_callback (GtkWidget *widget,
if (gimp_rgba_distance (&color, &channel->color) > 0.0001)
{
channel->color = color;
gimp_channel_update (channel);
drawable_update (GIMP_DRAWABLE (channel),
0, 0,
GIMP_DRAWABLE (channel)->width,
GIMP_DRAWABLE (channel)->height);
gdisplays_flush ();
}
}

View File

@ -22,10 +22,10 @@
#include "apptypes.h"
#include "appenv.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "image_map.h"
#include "paint_funcs.h"

View File

@ -24,15 +24,14 @@
#include "apptypes.h"
#include "appenv.h"
#include "boundary.h"
#include "drawable.h"
#include "layer.h"
#include "floating_sel.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "gimpimage.h"
#include "gimplayermask.h"
#include "layer.h"
#include "paint_funcs.h"
#include "pixel_region.h"
#include "tile_manager.h"

View File

@ -583,7 +583,8 @@ gimp_layer_translate (GimpLayer *layer,
undo_push_layer_displace (GIMP_DRAWABLE (layer)->gimage, layer);
/* update the affected region */
drawable_update (GIMP_DRAWABLE (layer), 0, 0,
drawable_update (GIMP_DRAWABLE (layer),
0, 0,
GIMP_DRAWABLE (layer)->width,
GIMP_DRAWABLE (layer)->height);
@ -606,8 +607,7 @@ gimp_layer_translate (GimpLayer *layer,
GIMP_DRAWABLE (layer->mask)->offset_y += off_y;
/* invalidate the mask preview */
gimp_drawable_invalidate_preview (GIMP_DRAWABLE (layer->mask),
FALSE);
gimp_drawable_invalidate_preview (GIMP_DRAWABLE (layer->mask), FALSE);
}
}
@ -947,7 +947,8 @@ gimp_layer_resize (GimpLayer *layer,
/* Update the old layer position */
drawable_update (GIMP_DRAWABLE( layer),
0, 0,
GIMP_DRAWABLE (layer)->width, GIMP_DRAWABLE (layer)->height);
GIMP_DRAWABLE (layer)->width,
GIMP_DRAWABLE (layer)->height);
/* Configure the pixel regions */
pixel_region_init (&srcPR, GIMP_DRAWABLE (layer)->tiles,
@ -1014,7 +1015,8 @@ gimp_layer_resize (GimpLayer *layer,
/* update the new layer area */
drawable_update (GIMP_DRAWABLE (layer),
0, 0,
GIMP_DRAWABLE (layer)->width, GIMP_DRAWABLE (layer)->height);
GIMP_DRAWABLE (layer)->width,
GIMP_DRAWABLE (layer)->height);
}
void
@ -1105,7 +1107,6 @@ gimp_layer_invalidate_boundary (GimpLayer *layer)
GimpImage *gimage;
GimpChannel *mask;
/* first get the selection mask channel */
if (! (gimage = gimp_drawable_gimage (GIMP_DRAWABLE (layer))))
return;
@ -1115,6 +1116,7 @@ gimp_layer_invalidate_boundary (GimpLayer *layer)
/* clear the affected region surrounding the layer */
gdisplays_selection_visibility (gimage, SelectionLayerOff);
/* get the selection mask channel */
mask = gimp_image_get_mask (gimage);
/* Only bother with the bounds if there is a selection */

View File

@ -28,30 +28,22 @@
#include "apptypes.h"
#include "boundary.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "gimpimage.h"
#include "gimplayermask.h"
#include "gimppreviewcache.h"
#include "layer.h"
#include "parasitelist.h"
#include "paint_funcs.h"
#include "pixel_region.h"
#include "undo.h"
#include "temp_buf.h"
#include "tile_manager.h"
#include "tile.h"
#include "undo.h"
#include "libgimp/gimpparasite.h"
#include "libgimp/gimpintl.h"
static void gimp_layer_mask_class_init (GimpLayerMaskClass *klass);
static void gimp_layer_mask_init (GimpLayerMask *layermask);
static void gimp_layer_mask_destroy (GtkObject *object);
static void gimp_layer_mask_class_init (GimpLayerMaskClass *klass);
static void gimp_layer_mask_init (GimpLayerMask *layermask);
static void gimp_layer_mask_destroy (GtkObject *object);
static GimpChannelClass *parent_class = NULL;

View File

@ -32,12 +32,12 @@
#include "colormaps.h"
#include "cursorutil.h"
#include "disp_callbacks.h"
#include "drawable.h"
#include "draw_core.h"
#include "gdisplay.h"
#include "gdisplay_ops.h"
#include "gimage.h"
#include "gimage_mask.h"
#include "gimpdrawable.h"
#include "gimpcontext.h"
#include "gimprc.h"
#include "gximage.h"

View File

@ -27,7 +27,7 @@
#include "apptypes.h"
#include "channel.h"
#include "drawable.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "pixel_region.h"
#include "scan_convert.h"
@ -288,9 +288,9 @@ scan_converter_to_channel (ScanConverter *sc,
TRC (("\n"));
}
pixel_region_init (&maskPR, gimp_drawable_data (GIMP_DRAWABLE(mask)), 0, 0,
gimp_drawable_width (GIMP_DRAWABLE(mask)),
gimp_drawable_height (GIMP_DRAWABLE(mask)), TRUE);
pixel_region_init (&maskPR, gimp_drawable_data (GIMP_DRAWABLE (mask)), 0, 0,
gimp_drawable_width (GIMP_DRAWABLE (mask)),
gimp_drawable_height (GIMP_DRAWABLE (mask)), TRUE);
for (i = 0; i < heighta; i++)
{

View File

@ -32,10 +32,10 @@
#include "devices.h"
#include "dialog_handler.h"
#include "disp_callbacks.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimpimage.h"
#include "gimpcontext.h"
#include "drawable.h"
#include "gimprc.h"
#include "info_window.h"
#include "layer.h"
@ -62,25 +62,29 @@
static void gdisplay_check_device_cursor (GDisplay *gdisp);
static void
redraw (GDisplay *gdisp,
gint x,
gint y,
gint w,
gint h)
gdisplay_redraw (GDisplay *gdisp,
gint x,
gint y,
gint w,
gint h)
{
glong x1, y1, x2, y2; /* coordinate of rectangle corners */
x1 = x;
y1 = y;
x2 = (x+w);
y2 = (y+h);
x2 = (x + w);
y2 = (y + h);
x1 = CLAMP (x1, 0, gdisp->disp_width);
y1 = CLAMP (y1, 0, gdisp->disp_height);
x2 = CLAMP (x2, 0, gdisp->disp_width);
y2 = CLAMP (y2, 0, gdisp->disp_height);
if ((x2 - x1) && (y2 - y1))
{
gdisplay_expose_area (gdisp, x1, y1, (x2 - x1), (y2 - y1));
gdisplay_expose_area (gdisp,
x1, y1,
(x2 - x1), (y2 - y1));
gdisplay_flush_displays_only (gdisp);
}
}
@ -202,8 +206,9 @@ gdisplay_canvas_events (GtkWidget *canvas,
eevent = (GdkEventExpose *) event;
/*printf(" EXP:%d,%d(%dx%d) ",eevent->area.x, eevent->area.y,
eevent->area.width, eevent->area.height);fflush(stdout);*/
redraw (gdisp, eevent->area.x, eevent->area.y,
eevent->area.width, eevent->area.height);
gdisplay_redraw (gdisp,
eevent->area.x, eevent->area.y,
eevent->area.width, eevent->area.height);
break;
case GDK_CONFIGURE:
@ -982,7 +987,9 @@ gdisplay_bucket_fill (GtkWidget *widget,
tile_manager_destroy (buf_tiles);
/* Update the displays */
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
drawable_update (drawable,
x1, y1,
(x2 - x1), (y2 - y1));
gdisplays_flush ();
if (new_buf)

View File

@ -32,10 +32,10 @@
#include "devices.h"
#include "dialog_handler.h"
#include "disp_callbacks.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimpimage.h"
#include "gimpcontext.h"
#include "drawable.h"
#include "gimprc.h"
#include "info_window.h"
#include "layer.h"
@ -62,25 +62,29 @@
static void gdisplay_check_device_cursor (GDisplay *gdisp);
static void
redraw (GDisplay *gdisp,
gint x,
gint y,
gint w,
gint h)
gdisplay_redraw (GDisplay *gdisp,
gint x,
gint y,
gint w,
gint h)
{
glong x1, y1, x2, y2; /* coordinate of rectangle corners */
x1 = x;
y1 = y;
x2 = (x+w);
y2 = (y+h);
x2 = (x + w);
y2 = (y + h);
x1 = CLAMP (x1, 0, gdisp->disp_width);
y1 = CLAMP (y1, 0, gdisp->disp_height);
x2 = CLAMP (x2, 0, gdisp->disp_width);
y2 = CLAMP (y2, 0, gdisp->disp_height);
if ((x2 - x1) && (y2 - y1))
{
gdisplay_expose_area (gdisp, x1, y1, (x2 - x1), (y2 - y1));
gdisplay_expose_area (gdisp,
x1, y1,
(x2 - x1), (y2 - y1));
gdisplay_flush_displays_only (gdisp);
}
}
@ -202,8 +206,9 @@ gdisplay_canvas_events (GtkWidget *canvas,
eevent = (GdkEventExpose *) event;
/*printf(" EXP:%d,%d(%dx%d) ",eevent->area.x, eevent->area.y,
eevent->area.width, eevent->area.height);fflush(stdout);*/
redraw (gdisp, eevent->area.x, eevent->area.y,
eevent->area.width, eevent->area.height);
gdisplay_redraw (gdisp,
eevent->area.x, eevent->area.y,
eevent->area.width, eevent->area.height);
break;
case GDK_CONFIGURE:
@ -982,7 +987,9 @@ gdisplay_bucket_fill (GtkWidget *widget,
tile_manager_destroy (buf_tiles);
/* Update the displays */
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
drawable_update (drawable,
x1, y1,
(x2 - x1), (y2 - y1));
gdisplays_flush ();
if (new_buf)

View File

@ -32,12 +32,12 @@
#include "colormaps.h"
#include "cursorutil.h"
#include "disp_callbacks.h"
#include "drawable.h"
#include "draw_core.h"
#include "gdisplay.h"
#include "gdisplay_ops.h"
#include "gimage.h"
#include "gimage_mask.h"
#include "gimpdrawable.h"
#include "gimpcontext.h"
#include "gimprc.h"
#include "gximage.h"

View File

@ -32,10 +32,10 @@
#include "devices.h"
#include "dialog_handler.h"
#include "disp_callbacks.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimpimage.h"
#include "gimpcontext.h"
#include "drawable.h"
#include "gimprc.h"
#include "info_window.h"
#include "layer.h"
@ -62,25 +62,29 @@
static void gdisplay_check_device_cursor (GDisplay *gdisp);
static void
redraw (GDisplay *gdisp,
gint x,
gint y,
gint w,
gint h)
gdisplay_redraw (GDisplay *gdisp,
gint x,
gint y,
gint w,
gint h)
{
glong x1, y1, x2, y2; /* coordinate of rectangle corners */
x1 = x;
y1 = y;
x2 = (x+w);
y2 = (y+h);
x2 = (x + w);
y2 = (y + h);
x1 = CLAMP (x1, 0, gdisp->disp_width);
y1 = CLAMP (y1, 0, gdisp->disp_height);
x2 = CLAMP (x2, 0, gdisp->disp_width);
y2 = CLAMP (y2, 0, gdisp->disp_height);
if ((x2 - x1) && (y2 - y1))
{
gdisplay_expose_area (gdisp, x1, y1, (x2 - x1), (y2 - y1));
gdisplay_expose_area (gdisp,
x1, y1,
(x2 - x1), (y2 - y1));
gdisplay_flush_displays_only (gdisp);
}
}
@ -202,8 +206,9 @@ gdisplay_canvas_events (GtkWidget *canvas,
eevent = (GdkEventExpose *) event;
/*printf(" EXP:%d,%d(%dx%d) ",eevent->area.x, eevent->area.y,
eevent->area.width, eevent->area.height);fflush(stdout);*/
redraw (gdisp, eevent->area.x, eevent->area.y,
eevent->area.width, eevent->area.height);
gdisplay_redraw (gdisp,
eevent->area.x, eevent->area.y,
eevent->area.width, eevent->area.height);
break;
case GDK_CONFIGURE:
@ -982,7 +987,9 @@ gdisplay_bucket_fill (GtkWidget *widget,
tile_manager_destroy (buf_tiles);
/* Update the displays */
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
drawable_update (drawable,
x1, y1,
(x2 - x1), (y2 - y1));
gdisplays_flush ();
if (new_buf)

View File

@ -23,9 +23,8 @@
#include "apptypes.h"
#include "appenv.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimpdrawable.h"
#include "gimpdrawablepreview.h"
#include "gimpimage.h"
#include "gimprc.h"

View File

@ -364,7 +364,13 @@ edit_qmask_query_ok_callback (GtkWidget *widget,
if (gimp_rgba_distance (&color, &channel->color) > 0.0001)
{
channel->color = color;
gimp_channel_update (channel);
drawable_update (GIMP_DRAWABLE (channel),
0, 0,
GIMP_DRAWABLE (channel)->width,
GIMP_DRAWABLE (channel)->height);
gdisplays_flush ();
}
}

View File

@ -73,7 +73,6 @@ equalize (GimpImage *gimage,
hist = gimp_histogram_new ();
gimp_histogram_calculate_drawable (hist, drawable);
/* Build equalization LUT */
lut = eq_histogram_lut_new (hist, bytes);
@ -92,5 +91,8 @@ equalize (GimpImage *gimage,
gimp_histogram_free (hist);
gimp_drawable_merge_shadow (drawable, TRUE);
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
drawable_update (drawable,
x1, y1,
(x2 - x1), (y2 - y1));
}

View File

@ -70,7 +70,7 @@
#include "cursorutil.h"
#include "dialog_handler.h"
#include "docindex.h"
#include "drawable.h"
#include "gimpdrawable.h"
#include "gdisplay.h"
#include "gimage.h"
#include "gimpcontext.h"

View File

@ -24,15 +24,14 @@
#include "apptypes.h"
#include "appenv.h"
#include "boundary.h"
#include "drawable.h"
#include "layer.h"
#include "floating_sel.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "gimpimage.h"
#include "gimplayermask.h"
#include "layer.h"
#include "paint_funcs.h"
#include "pixel_region.h"
#include "tile_manager.h"

View File

@ -32,12 +32,12 @@
#include "colormaps.h"
#include "cursorutil.h"
#include "disp_callbacks.h"
#include "drawable.h"
#include "draw_core.h"
#include "gdisplay.h"
#include "gdisplay_ops.h"
#include "gimage.h"
#include "gimage_mask.h"
#include "gimpdrawable.h"
#include "gimpcontext.h"
#include "gimprc.h"
#include "gximage.h"

View File

@ -25,13 +25,13 @@
#include "appenv.h"
#include "channel.h"
#include "dialog_handler.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimage.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpset.h"
#include "layer.h"
#include "lc_dialog.h"
#include "gdisplay.h"
#include "paint_funcs.h"
#include "palette_import.h"
#include "undo.h"
@ -44,16 +44,19 @@
* layers_dialog, gdisplay, tools, etc..
*/
static void gimage_dirty_handler (GimpImage* gimage);
static void gimage_destroy_handler (GimpImage* gimage);
static void gimage_cmap_change_handler (GimpImage* gimage,
static void gimage_dirty_handler (GimpImage *gimage);
static void gimage_destroy_handler (GimpImage *gimage);
static void gimage_cmap_change_handler (GimpImage *gimage,
gint ncol,
gpointer user_data);
static void gimage_rename_handler (GimpImage* gimage);
static void gimage_resize_handler (GimpImage* gimage);
static void gimage_restructure_handler (GimpImage* gimage);
static void gimage_repaint_handler (GimpImage* gimage,
gint, gint, gint, gint);
static void gimage_rename_handler (GimpImage *gimage);
static void gimage_resize_handler (GimpImage *gimage);
static void gimage_restructure_handler (GimpImage *gimage);
static void gimage_repaint_handler (GimpImage *gimage,
gint x,
gint y,
gint w,
gint h);
GimpImage *

View File

@ -22,15 +22,14 @@
#include "apptypes.h"
#include "appenv.h"
#include "boundary.h"
#include "channel.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "gimpimage.h"
#include "gimplayermask.h"
#include "gimage_mask.h"
#include "gimprc.h"
#include "layer.h"
#include "paint_funcs.h"
@ -151,17 +150,19 @@ gimage_mask_invalidate (GImage *gimage)
* mask in the composition of the floating selection
*/
layer = gimp_image_get_active_layer (gimage);
if (layer && gimp_layer_is_floating_sel (layer))
drawable_update (GIMP_DRAWABLE(layer), 0, 0,
GIMP_DRAWABLE(layer)->width,
GIMP_DRAWABLE(layer)->height);
drawable_update (GIMP_DRAWABLE (layer),
0, 0,
GIMP_DRAWABLE (layer)->width,
GIMP_DRAWABLE (layer)->height);
}
gint
gimage_mask_value (GImage *gimage,
int x,
int y)
gint x,
gint y)
{
return gimp_channel_value (gimp_image_get_mask (gimage), x, y);
}

View File

@ -32,7 +32,6 @@
#include "boundary.h"
#include "channel.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimpimage.h"
#include "gimage_mask.h"
#include "gimppreviewcache.h"
@ -415,20 +414,6 @@ gimp_channel_resize (GimpChannel *channel,
GIMP_DRAWABLE (channel)->height);
}
void
gimp_channel_update (GimpChannel *channel)
{
drawable_update (GIMP_DRAWABLE (channel),
0, 0,
GIMP_DRAWABLE (channel)->width,
GIMP_DRAWABLE (channel)->height);
gdisplays_flush ();
}
/**********************/
/* access functions */
/**********************/
gboolean
gimp_channel_toggle_visibility (GimpChannel *channel)
{
@ -437,6 +422,7 @@ gimp_channel_toggle_visibility (GimpChannel *channel)
return GIMP_DRAWABLE (channel)->visible;
}
/******************************/
/* selection mask functions */
/******************************/

View File

@ -108,7 +108,6 @@ void gimp_channel_resize (GimpChannel *channel,
gint new_height,
gint offx,
gint offy);
void gimp_channel_update (GimpChannel *channel);
gboolean gimp_channel_toggle_visibility (GimpChannel *channel);

View File

@ -27,20 +27,17 @@
#include "apptypes.h"
#include "channel.h"
#include "drawable.h"
#include "fileops.h"
#include "gimpimage.h"
#include "gimpbrush.h"
#include "gimpcontextpreview.h"
#include "gimpdnd.h"
#include "gimpbrushlist.h"
#include "gimpdrawable.h"
#include "gimpdrawablepreview.h"
#include "gimplayermask.h"
#include "gimprc.h"
#include "gradient.h"
#include "gradient_header.h"
#include "layer.h"
#include "patterns.h"
#include "temp_buf.h"

View File

@ -73,7 +73,6 @@ equalize (GimpImage *gimage,
hist = gimp_histogram_new ();
gimp_histogram_calculate_drawable (hist, drawable);
/* Build equalization LUT */
lut = eq_histogram_lut_new (hist, bytes);
@ -92,5 +91,8 @@ equalize (GimpImage *gimage,
gimp_histogram_free (hist);
gimp_drawable_merge_shadow (drawable, TRUE);
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
drawable_update (drawable,
x1, y1,
(x2 - x1), (y2 - y1));
}

View File

@ -22,11 +22,10 @@
#include "apptypes.h"
#include "appenv.h"
#include "drawable.h"
#include "invert.h"
#include "gimpimage.h"
#include "gimplut.h"
#include "invert.h"
#include "lut_funcs.h"
#include "pixel_processor.h"
#include "pixel_region.h"
@ -40,8 +39,8 @@ void
image_invert (GimpImage *gimage)
{
GimpDrawable *drawable;
Argument *return_vals;
gint nreturn_vals;
Argument *return_vals;
gint nreturn_vals;
drawable = gimp_image_active_drawable (gimage);
@ -69,9 +68,9 @@ image_invert (GimpImage *gimage)
void
invert (GimpDrawable *drawable)
{
PixelRegion srcPR, destPR;
gint x1, y1, x2, y2;
GimpLut *lut;
PixelRegion srcPR, destPR;
gint x1, y1, x2, y2;
GimpLut *lut;
lut = invert_lut_new (gimp_drawable_bytes (drawable));
@ -87,5 +86,8 @@ invert (GimpDrawable *drawable)
gimp_lut_free (lut);
gimp_drawable_merge_shadow (drawable, TRUE);
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
drawable_update (drawable,
x1, y1,
(x2 - x1), (y2 - y1));
}

View File

@ -486,17 +486,20 @@ offset (GimpImage *gimage,
}
/* push an undo */
drawable_apply_image (drawable, 0, 0,
drawable_apply_image (drawable,
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable),
gimp_drawable_data (drawable), FALSE);
gimp_drawable_data (drawable),
FALSE);
/* swap the tiles */
drawable->tiles = new_tiles;
/* update the drawable */
drawable_update (drawable, 0, 0,
drawable_update (drawable,
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable));
}
@ -512,8 +515,8 @@ offset_ok_callback (GtkWidget *widget,
OffsetDialog *off_d;
GImage *gimage;
GimpDrawable *drawable;
gint offset_x;
gint offset_y;
gint offset_x;
gint offset_y;
off_d = (OffsetDialog *) data;

View File

@ -24,10 +24,10 @@
#include "apptypes.h"
#include "boundary.h"
#include "channel.h"
#include "drawable.h"
#include "gimpimage.h"
#include "gimpdrawable.h"
#include "gimpdrawablepreview.h"
#include "gimppreviewcache.h"
#include "layer.h"
#include "paint_funcs.h"
@ -70,7 +70,7 @@ gimp_drawable_preview (GimpDrawable *drawable,
TempBuf *tb = gimp_drawable_preview_private (drawable,
PREVIEW_CACHE_PRIME_WIDTH,
PREVIEW_CACHE_PRIME_HEIGHT);
/* Save the 2nd call */
if (width == PREVIEW_CACHE_PRIME_WIDTH &&
height == PREVIEW_CACHE_PRIME_HEIGHT)
@ -128,6 +128,7 @@ gimp_drawable_preview_private (GimpDrawable *drawable,
/* calculate 'acceptable' subsample */
subsample = 1;
/* handle some truncation errors */
if (width < 1) width = 1;
if (height < 1) height = 1;
@ -296,15 +297,18 @@ gimp_drawable_preview_scale (GimpImageBaseType type,
{
map_to_color (2, cmap, s, rgb);
r[RED_PIX] += rgb[RED_PIX] * tot_frac;
r[RED_PIX] += rgb[RED_PIX] * tot_frac;
r[GREEN_PIX] += rgb[GREEN_PIX] * tot_frac;
r[BLUE_PIX] += rgb[BLUE_PIX] * tot_frac;
r[BLUE_PIX] += rgb[BLUE_PIX] * tot_frac;
if (bytes == 4)
r[ALPHA_PIX] += s[ALPHA_I_PIX] * tot_frac;
}
else
for (b = 0; b < bytes; b++)
r[b] += s[b] * tot_frac;
{
for (b = 0; b < bytes; b++)
r[b] += s[b] * tot_frac;
}
/* increment the destination */
if (x_cum + x_rat <= (src_col + 1 + EPSILON))
@ -313,7 +317,6 @@ gimp_drawable_preview_scale (GimpImageBaseType type,
x_cum += x_rat;
j--;
}
/* increment the source */
else
{
@ -335,7 +338,7 @@ gimp_drawable_preview_scale (GimpImageBaseType type,
{
b = bytes;
while (b--)
*d++ = (guchar) ((*r++ * tot_frac)+0.5);
*d++ = (guchar) ((*r++ * tot_frac) + 0.5);
}
dest += destwidth;

View File

@ -31,21 +31,20 @@
#include "apptypes.h"
#include "drawable.h"
#include "gimphistogram.h"
#include "pixel_region.h"
#include "gimpdrawable.h"
#include "channel.h"
#include "gimpdrawable.h"
#include "gimphistogram.h"
#include "gimpimage.h"
#include "gimprc.h"
#include "pixel_processor.h"
#include "pixel_region.h"
struct _GimpHistogram
{
gint bins;
gdouble **values;
gint nchannels;
gint n_channels;
#ifdef ENABLE_MP
pthread_mutex_t mutex;
@ -62,9 +61,9 @@ gimp_histogram_new (void)
GimpHistogram *histogram;
histogram = g_new0 (GimpHistogram, 1);
histogram->bins = 0;
histogram->values = NULL;
histogram->nchannels = 0;
histogram->bins = 0;
histogram->values = NULL;
histogram->n_channels = 0;
#ifdef ENABLE_MP
histogram->nthreads = 0;
@ -82,7 +81,7 @@ gimp_histogram_free (GimpHistogram *histogram)
if (histogram->values)
{
for (i = 0; i < histogram->nchannels; i++)
for (i = 0; i < histogram->n_channels; i++)
g_free (histogram->values[i]);
g_free (histogram->values);
}
@ -274,19 +273,19 @@ gimp_histogram_alloc (GimpHistogram *histogram,
{
gint i;
if (bytes + 1 != histogram->nchannels)
if (bytes + 1 != histogram->n_channels)
{
if (histogram->values)
{
for (i = 0; i < histogram->nchannels; i++)
for (i = 0; i < histogram->n_channels; i++)
g_free (histogram->values[i]);
g_free (histogram->values);
}
histogram->nchannels = bytes + 1;
histogram->values = g_new0 (gdouble *, histogram->nchannels);
histogram->n_channels = bytes + 1;
histogram->values = g_new0 (gdouble *, histogram->n_channels);
for (i = 0; i < histogram->nchannels; i++)
for (i = 0; i < histogram->n_channels; i++)
histogram->values[i] = g_new (double, 256);
}
}
@ -310,10 +309,10 @@ gimp_histogram_calculate (GimpHistogram *histogram,
for (i = 0; i < num_processors; i++)
{
histogram->tmp_values[i] = g_new0 (double *, histogram->nchannels);
histogram->tmp_values[i] = g_new0 (double *, histogram->n_channels);
histogram->tmp_slots[i] = 0;
for (j = 0; j < histogram->nchannels; j++)
for (j = 0; j < histogram->n_channels; j++)
{
histogram->tmp_values[i][j] = g_new0 (gdouble, 256);
@ -323,7 +322,7 @@ gimp_histogram_calculate (GimpHistogram *histogram,
}
#endif
for (i = 0; i < histogram->nchannels; i++)
for (i = 0; i < histogram->n_channels; i++)
for (j = 0; j < 256; j++)
histogram->values[i][j] = 0.0;
@ -334,7 +333,7 @@ gimp_histogram_calculate (GimpHistogram *histogram,
/* add up all the tmp buffers and free their memmory */
for (i = 0; i < num_processors; i++)
{
for (j = 0; j < histogram->nchannels; j++)
for (j = 0; j < histogram->n_channels; j++)
{
for (k = 0; k < 256; k++)
histogram->values[j][k] += histogram->tmp_values[i][j][k];
@ -401,7 +400,7 @@ gimp_histogram_get_value (GimpHistogram *histogram,
GimpHistogramChannel channel,
gint bin)
{
if (channel < histogram->nchannels && bin >= 0 && bin < 256)
if (channel < histogram->n_channels && bin >= 0 && bin < 256)
return histogram->values[channel][bin];
return 0.0;
@ -412,7 +411,7 @@ gimp_histogram_get_channel (GimpHistogram *histogram,
GimpHistogramChannel channel,
gint bin)
{
if (histogram->nchannels > 3)
if (histogram->n_channels > 3)
return gimp_histogram_get_value (histogram, channel + 1, bin);
else
return gimp_histogram_get_value (histogram, channel , bin);
@ -421,7 +420,7 @@ gimp_histogram_get_channel (GimpHistogram *histogram,
gint
gimp_histogram_nchannels (GimpHistogram *histogram)
{
return histogram->nchannels - 1;
return histogram->n_channels - 1;
}
gdouble

View File

@ -99,18 +99,18 @@
#include "convert.h"
#include "cursorutil.h"
#include "drawable.h"
#include "floating_sel.h"
#include "fsdither.h"
#include "gdisplay.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "layer.h"
#include "undo.h"
#include "palette.h"
#include "gimppalette.h"
#include "layer.h"
#include "palette.h"
#include "palette_select.h"
#include "pixel_region.h"
#include "tile_manager.h"
#include "undo.h"
#include "tools/brightness_contrast.h"
#include "tools/color_balance.h"

View File

@ -486,17 +486,20 @@ offset (GimpImage *gimage,
}
/* push an undo */
drawable_apply_image (drawable, 0, 0,
drawable_apply_image (drawable,
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable),
gimp_drawable_data (drawable), FALSE);
gimp_drawable_data (drawable),
FALSE);
/* swap the tiles */
drawable->tiles = new_tiles;
/* update the drawable */
drawable_update (drawable, 0, 0,
drawable_update (drawable,
0, 0,
gimp_drawable_width (drawable),
gimp_drawable_height (drawable));
}
@ -512,8 +515,8 @@ offset_ok_callback (GtkWidget *widget,
OffsetDialog *off_d;
GImage *gimage;
GimpDrawable *drawable;
gint offset_x;
gint offset_y;
gint offset_x;
gint offset_y;
off_d = (OffsetDialog *) data;

View File

@ -583,7 +583,8 @@ gimp_layer_translate (GimpLayer *layer,
undo_push_layer_displace (GIMP_DRAWABLE (layer)->gimage, layer);
/* update the affected region */
drawable_update (GIMP_DRAWABLE (layer), 0, 0,
drawable_update (GIMP_DRAWABLE (layer),
0, 0,
GIMP_DRAWABLE (layer)->width,
GIMP_DRAWABLE (layer)->height);
@ -606,8 +607,7 @@ gimp_layer_translate (GimpLayer *layer,
GIMP_DRAWABLE (layer->mask)->offset_y += off_y;
/* invalidate the mask preview */
gimp_drawable_invalidate_preview (GIMP_DRAWABLE (layer->mask),
FALSE);
gimp_drawable_invalidate_preview (GIMP_DRAWABLE (layer->mask), FALSE);
}
}
@ -947,7 +947,8 @@ gimp_layer_resize (GimpLayer *layer,
/* Update the old layer position */
drawable_update (GIMP_DRAWABLE( layer),
0, 0,
GIMP_DRAWABLE (layer)->width, GIMP_DRAWABLE (layer)->height);
GIMP_DRAWABLE (layer)->width,
GIMP_DRAWABLE (layer)->height);
/* Configure the pixel regions */
pixel_region_init (&srcPR, GIMP_DRAWABLE (layer)->tiles,
@ -1014,7 +1015,8 @@ gimp_layer_resize (GimpLayer *layer,
/* update the new layer area */
drawable_update (GIMP_DRAWABLE (layer),
0, 0,
GIMP_DRAWABLE (layer)->width, GIMP_DRAWABLE (layer)->height);
GIMP_DRAWABLE (layer)->width,
GIMP_DRAWABLE (layer)->height);
}
void
@ -1105,7 +1107,6 @@ gimp_layer_invalidate_boundary (GimpLayer *layer)
GimpImage *gimage;
GimpChannel *mask;
/* first get the selection mask channel */
if (! (gimage = gimp_drawable_gimage (GIMP_DRAWABLE (layer))))
return;
@ -1115,6 +1116,7 @@ gimp_layer_invalidate_boundary (GimpLayer *layer)
/* clear the affected region surrounding the layer */
gdisplays_selection_visibility (gimage, SelectionLayerOff);
/* get the selection mask channel */
mask = gimp_image_get_mask (gimage);
/* Only bother with the bounds if there is a selection */

View File

@ -28,30 +28,22 @@
#include "apptypes.h"
#include "boundary.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "gimpimage.h"
#include "gimplayermask.h"
#include "gimppreviewcache.h"
#include "layer.h"
#include "parasitelist.h"
#include "paint_funcs.h"
#include "pixel_region.h"
#include "undo.h"
#include "temp_buf.h"
#include "tile_manager.h"
#include "tile.h"
#include "undo.h"
#include "libgimp/gimpparasite.h"
#include "libgimp/gimpintl.h"
static void gimp_layer_mask_class_init (GimpLayerMaskClass *klass);
static void gimp_layer_mask_init (GimpLayerMask *layermask);
static void gimp_layer_mask_destroy (GtkObject *object);
static void gimp_layer_mask_class_init (GimpLayerMaskClass *klass);
static void gimp_layer_mask_init (GimpLayerMask *layermask);
static void gimp_layer_mask_destroy (GtkObject *object);
static GimpChannelClass *parent_class = NULL;

View File

@ -26,9 +26,7 @@
#include "apptypes.h"
#include "appenv.h"
#include "drawable.h"
#include "image_new.h"
#include "floating_sel.h"
#include "gdisplay.h"
#include "gimage.h"
@ -36,6 +34,7 @@
#include "gimpcontext.h"
#include "gimplayermask.h"
#include "global_edit.h"
#include "image_new.h"
#include "layer.h"
#include "paint_funcs.h"
#include "pixel_region.h"
@ -446,7 +445,9 @@ edit_clear (GimpImage *gimage,
ERASE_MODE, NULL, x1, y1);
/* update the image */
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
drawable_update (drawable,
x1, y1,
(x2 - x1), (y2 - y1));
/* free the temporary tiles */
tile_manager_destroy (buf_tiles);
@ -518,7 +519,9 @@ edit_fill (GimpImage *gimage,
NORMAL_MODE, NULL, x1, y1);
/* update the image */
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
drawable_update (drawable,
x1, y1,
(x2 - x1), (y2 - y1));
/* free the temporary tiles */
tile_manager_destroy (buf_tiles);

View File

@ -1772,9 +1772,11 @@ channel_widget_drop_color (GtkWidget *widget,
{
channel->color = *color;
drawable_update (GIMP_DRAWABLE (channel), 0, 0,
drawable_update (GIMP_DRAWABLE (channel),
0, 0,
GIMP_DRAWABLE (channel)->width,
GIMP_DRAWABLE (channel)->height);
gdisplays_flush ();
}
}
@ -2680,9 +2682,12 @@ edit_channel_query_ok_callback (GtkWidget *widget,
if (gimp_rgba_distance (&color, &channel->color) > 0.0001)
{
channel->color = color;
drawable_update (GIMP_DRAWABLE (channel), 0, 0,
drawable_update (GIMP_DRAWABLE (channel),
0, 0,
GIMP_DRAWABLE (channel)->width,
GIMP_DRAWABLE (channel)->height);
gdisplays_flush ();
}
}

View File

@ -41,7 +41,6 @@
#include "devices.h"
#include "docindex.h"
#include "channel_ops.h"
#include "drawable.h"
#include "equalize.h"
#include "errorconsole.h"
#include "fileops.h"
@ -49,6 +48,7 @@
#include "gdisplay_ops.h"
#include "gimage_mask.h"
#include "gimpcontext.h"
#include "gimpdrawable.h"
#include "gimphelp.h"
#include "gimpimage.h"
#include "gimprc.h"

View File

@ -41,7 +41,6 @@
#include "devices.h"
#include "docindex.h"
#include "channel_ops.h"
#include "drawable.h"
#include "equalize.h"
#include "errorconsole.h"
#include "fileops.h"
@ -49,6 +48,7 @@
#include "gdisplay_ops.h"
#include "gimage_mask.h"
#include "gimpcontext.h"
#include "gimpdrawable.h"
#include "gimphelp.h"
#include "gimpimage.h"
#include "gimprc.h"

View File

@ -23,9 +23,8 @@
#include "apptypes.h"
#include "appenv.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimpdrawable.h"
#include "gimpdrawablepreview.h"
#include "gimpimage.h"
#include "gimprc.h"

View File

@ -33,7 +33,6 @@
#include "apptypes.h"
#include "draw_core.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gimpcontext.h"
#include "gimpimage.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -364,7 +364,13 @@ edit_qmask_query_ok_callback (GtkWidget *widget,
if (gimp_rgba_distance (&color, &channel->color) > 0.0001)
{
channel->color = color;
gimp_channel_update (channel);
drawable_update (GIMP_DRAWABLE (channel),
0, 0,
GIMP_DRAWABLE (channel)->width,
GIMP_DRAWABLE (channel)->height);
gdisplays_flush ();
}
}

View File

@ -24,11 +24,9 @@
#include "apptypes.h"
#include "appenv.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimage.h"
#include "gimage_mask.h"
#include "gimphistogram.h"
#include "histogramwidget.h"
#include "tile_manager.h"

View File

@ -19,21 +19,21 @@
#ifndef __HISTOGRAM_WIDGET_H__
#define __HISTOGRAM_WIDGET_H__
#include <gtk/gtkdrawingarea.h>
#include "gimphistogram.h"
#include <gtk/gtkdrawingarea.h>
#define HISTOGRAM_WIDGET_TYPE (histogram_widget_get_type ())
#define HISTOGRAM_WIDGET(obj) GTK_CHECK_CAST (obj, histogram_widget_get_type (), HistogramWidget)
#define HISTOGRAM_WIDGET_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, histogram_widget_get_type (), HistogramWidget)
#define IS_HISTOGRAM_WIDGET(obj) GTK_CHECK_TYPE (obj, histogram_widget_get_type ())
#define HISTOGRAM_WIDGET_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, histogram_widget_get_type (), HistogramWidget)
typedef struct _HistogramWidgetClass HistogramWidgetClass;
struct _HistogramWidget
{
GtkDrawingArea drawingarea;
GtkDrawingArea parent_instance;
GimpHistogram *histogram;
GimpHistogramChannel channel;
@ -43,7 +43,7 @@ struct _HistogramWidget
struct _HistogramWidgetClass
{
GtkDrawingAreaClass parent_class;
GtkDrawingAreaClass parent_class;
void (* range_changed) (HistogramWidget *hw,
gint start,

View File

@ -22,10 +22,10 @@
#include "apptypes.h"
#include "appenv.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimage_mask.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "image_map.h"
#include "paint_funcs.h"

View File

@ -23,13 +23,12 @@
#include "apptypes.h"
#include "appenv.h"
#include "apptypes.h"
#include "drawable.h"
#include "gimprc.h"
#include "file_new_dialog.h"
#include "gdisplay.h"
#include "gimpcontext.h"
#include "gimage.h"
#include "gimpcontext.h"
#include "gimprc.h"
#include "image_new.h"
#include "layer.h"
#include "paint_funcs.h"

View File

@ -22,11 +22,10 @@
#include "apptypes.h"
#include "appenv.h"
#include "drawable.h"
#include "invert.h"
#include "gimpimage.h"
#include "gimplut.h"
#include "invert.h"
#include "lut_funcs.h"
#include "pixel_processor.h"
#include "pixel_region.h"
@ -40,8 +39,8 @@ void
image_invert (GimpImage *gimage)
{
GimpDrawable *drawable;
Argument *return_vals;
gint nreturn_vals;
Argument *return_vals;
gint nreturn_vals;
drawable = gimp_image_active_drawable (gimage);
@ -69,9 +68,9 @@ image_invert (GimpImage *gimage)
void
invert (GimpDrawable *drawable)
{
PixelRegion srcPR, destPR;
gint x1, y1, x2, y2;
GimpLut *lut;
PixelRegion srcPR, destPR;
gint x1, y1, x2, y2;
GimpLut *lut;
lut = invert_lut_new (gimp_drawable_bytes (drawable));
@ -87,5 +86,8 @@ invert (GimpDrawable *drawable)
gimp_lut_free (lut);
gimp_drawable_merge_shadow (drawable, TRUE);
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
drawable_update (drawable,
x1, y1,
(x2 - x1), (y2 - y1));
}

View File

@ -583,7 +583,8 @@ gimp_layer_translate (GimpLayer *layer,
undo_push_layer_displace (GIMP_DRAWABLE (layer)->gimage, layer);
/* update the affected region */
drawable_update (GIMP_DRAWABLE (layer), 0, 0,
drawable_update (GIMP_DRAWABLE (layer),
0, 0,
GIMP_DRAWABLE (layer)->width,
GIMP_DRAWABLE (layer)->height);
@ -606,8 +607,7 @@ gimp_layer_translate (GimpLayer *layer,
GIMP_DRAWABLE (layer->mask)->offset_y += off_y;
/* invalidate the mask preview */
gimp_drawable_invalidate_preview (GIMP_DRAWABLE (layer->mask),
FALSE);
gimp_drawable_invalidate_preview (GIMP_DRAWABLE (layer->mask), FALSE);
}
}
@ -947,7 +947,8 @@ gimp_layer_resize (GimpLayer *layer,
/* Update the old layer position */
drawable_update (GIMP_DRAWABLE( layer),
0, 0,
GIMP_DRAWABLE (layer)->width, GIMP_DRAWABLE (layer)->height);
GIMP_DRAWABLE (layer)->width,
GIMP_DRAWABLE (layer)->height);
/* Configure the pixel regions */
pixel_region_init (&srcPR, GIMP_DRAWABLE (layer)->tiles,
@ -1014,7 +1015,8 @@ gimp_layer_resize (GimpLayer *layer,
/* update the new layer area */
drawable_update (GIMP_DRAWABLE (layer),
0, 0,
GIMP_DRAWABLE (layer)->width, GIMP_DRAWABLE (layer)->height);
GIMP_DRAWABLE (layer)->width,
GIMP_DRAWABLE (layer)->height);
}
void
@ -1105,7 +1107,6 @@ gimp_layer_invalidate_boundary (GimpLayer *layer)
GimpImage *gimage;
GimpChannel *mask;
/* first get the selection mask channel */
if (! (gimage = gimp_drawable_gimage (GIMP_DRAWABLE (layer))))
return;
@ -1115,6 +1116,7 @@ gimp_layer_invalidate_boundary (GimpLayer *layer)
/* clear the affected region surrounding the layer */
gdisplays_selection_visibility (gimage, SelectionLayerOff);
/* get the selection mask channel */
mask = gimp_image_get_mask (gimage);
/* Only bother with the bounds if there is a selection */

View File

@ -23,9 +23,8 @@
#include "apptypes.h"
#include "appenv.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimpdrawable.h"
#include "gimpdrawablepreview.h"
#include "gimpimage.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -33,7 +33,6 @@
#include "apptypes.h"
#include "draw_core.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gimpcontext.h"
#include "gimpimage.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -82,11 +82,11 @@
#include "app_procs.h"
#include "appenv.h"
#include "brush_select.h"
#include "drawable.h"
#include "datafiles.h"
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"

View File

@ -364,7 +364,13 @@ edit_qmask_query_ok_callback (GtkWidget *widget,
if (gimp_rgba_distance (&color, &channel->color) > 0.0001)
{
channel->color = color;
gimp_channel_update (channel);
drawable_update (GIMP_DRAWABLE (channel),
0, 0,
GIMP_DRAWABLE (channel)->width,
GIMP_DRAWABLE (channel)->height);
gdisplays_flush ();
}
}

View File

@ -27,7 +27,7 @@
#include "apptypes.h"
#include "channel.h"
#include "drawable.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "pixel_region.h"
#include "scan_convert.h"
@ -288,9 +288,9 @@ scan_converter_to_channel (ScanConverter *sc,
TRC (("\n"));
}
pixel_region_init (&maskPR, gimp_drawable_data (GIMP_DRAWABLE(mask)), 0, 0,
gimp_drawable_width (GIMP_DRAWABLE(mask)),
gimp_drawable_height (GIMP_DRAWABLE(mask)), TRUE);
pixel_region_init (&maskPR, gimp_drawable_data (GIMP_DRAWABLE (mask)), 0, 0,
gimp_drawable_width (GIMP_DRAWABLE (mask)),
gimp_drawable_height (GIMP_DRAWABLE (mask)), TRUE);
for (i = 0; i < heighta; i++)
{

View File

@ -50,10 +50,10 @@
#include "apptypes.h"
#include "dialog_handler.h"
#include "drawable.h"
#include "gimprc.h"
#include "gimage_mask.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
#include "gimprc.h"
#include "paint_funcs.h"
#include "pixel_region.h"
#include "temp_buf.h"

View File

@ -27,20 +27,17 @@
#include "apptypes.h"
#include "channel.h"
#include "drawable.h"
#include "fileops.h"
#include "gimpimage.h"
#include "gimpbrush.h"
#include "gimpcontextpreview.h"
#include "gimpdnd.h"
#include "gimpbrushlist.h"
#include "gimpdrawable.h"
#include "gimpdrawablepreview.h"
#include "gimplayermask.h"
#include "gimprc.h"
#include "gradient.h"
#include "gradient_header.h"
#include "layer.h"
#include "patterns.h"
#include "temp_buf.h"

View File

@ -24,10 +24,10 @@
#include "apptypes.h"
#include "boundary.h"
#include "channel.h"
#include "drawable.h"
#include "gimpimage.h"
#include "gimpdrawable.h"
#include "gimpdrawablepreview.h"
#include "gimppreviewcache.h"
#include "layer.h"
#include "paint_funcs.h"
@ -70,7 +70,7 @@ gimp_drawable_preview (GimpDrawable *drawable,
TempBuf *tb = gimp_drawable_preview_private (drawable,
PREVIEW_CACHE_PRIME_WIDTH,
PREVIEW_CACHE_PRIME_HEIGHT);
/* Save the 2nd call */
if (width == PREVIEW_CACHE_PRIME_WIDTH &&
height == PREVIEW_CACHE_PRIME_HEIGHT)
@ -128,6 +128,7 @@ gimp_drawable_preview_private (GimpDrawable *drawable,
/* calculate 'acceptable' subsample */
subsample = 1;
/* handle some truncation errors */
if (width < 1) width = 1;
if (height < 1) height = 1;
@ -296,15 +297,18 @@ gimp_drawable_preview_scale (GimpImageBaseType type,
{
map_to_color (2, cmap, s, rgb);
r[RED_PIX] += rgb[RED_PIX] * tot_frac;
r[RED_PIX] += rgb[RED_PIX] * tot_frac;
r[GREEN_PIX] += rgb[GREEN_PIX] * tot_frac;
r[BLUE_PIX] += rgb[BLUE_PIX] * tot_frac;
r[BLUE_PIX] += rgb[BLUE_PIX] * tot_frac;
if (bytes == 4)
r[ALPHA_PIX] += s[ALPHA_I_PIX] * tot_frac;
}
else
for (b = 0; b < bytes; b++)
r[b] += s[b] * tot_frac;
{
for (b = 0; b < bytes; b++)
r[b] += s[b] * tot_frac;
}
/* increment the destination */
if (x_cum + x_rat <= (src_col + 1 + EPSILON))
@ -313,7 +317,6 @@ gimp_drawable_preview_scale (GimpImageBaseType type,
x_cum += x_rat;
j--;
}
/* increment the source */
else
{
@ -335,7 +338,7 @@ gimp_drawable_preview_scale (GimpImageBaseType type,
{
b = bytes;
while (b--)
*d++ = (guchar) ((*r++ * tot_frac)+0.5);
*d++ = (guchar) ((*r++ * tot_frac) + 0.5);
}
dest += destwidth;

View File

@ -24,11 +24,9 @@
#include "apptypes.h"
#include "appenv.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimage.h"
#include "gimage_mask.h"
#include "gimphistogram.h"
#include "histogramwidget.h"
#include "tile_manager.h"

View File

@ -19,21 +19,21 @@
#ifndef __HISTOGRAM_WIDGET_H__
#define __HISTOGRAM_WIDGET_H__
#include <gtk/gtkdrawingarea.h>
#include "gimphistogram.h"
#include <gtk/gtkdrawingarea.h>
#define HISTOGRAM_WIDGET_TYPE (histogram_widget_get_type ())
#define HISTOGRAM_WIDGET(obj) GTK_CHECK_CAST (obj, histogram_widget_get_type (), HistogramWidget)
#define HISTOGRAM_WIDGET_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, histogram_widget_get_type (), HistogramWidget)
#define IS_HISTOGRAM_WIDGET(obj) GTK_CHECK_TYPE (obj, histogram_widget_get_type ())
#define HISTOGRAM_WIDGET_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, histogram_widget_get_type (), HistogramWidget)
typedef struct _HistogramWidgetClass HistogramWidgetClass;
struct _HistogramWidget
{
GtkDrawingArea drawingarea;
GtkDrawingArea parent_instance;
GimpHistogram *histogram;
GimpHistogramChannel channel;
@ -43,7 +43,7 @@ struct _HistogramWidget
struct _HistogramWidgetClass
{
GtkDrawingAreaClass parent_class;
GtkDrawingAreaClass parent_class;
void (* range_changed) (HistogramWidget *hw,
gint start,

View File

@ -24,10 +24,10 @@
#include "apptypes.h"
#include "boundary.h"
#include "channel.h"
#include "drawable.h"
#include "gimpimage.h"
#include "gimpdrawable.h"
#include "gimpdrawablepreview.h"
#include "gimppreviewcache.h"
#include "layer.h"
#include "paint_funcs.h"
@ -70,7 +70,7 @@ gimp_drawable_preview (GimpDrawable *drawable,
TempBuf *tb = gimp_drawable_preview_private (drawable,
PREVIEW_CACHE_PRIME_WIDTH,
PREVIEW_CACHE_PRIME_HEIGHT);
/* Save the 2nd call */
if (width == PREVIEW_CACHE_PRIME_WIDTH &&
height == PREVIEW_CACHE_PRIME_HEIGHT)
@ -128,6 +128,7 @@ gimp_drawable_preview_private (GimpDrawable *drawable,
/* calculate 'acceptable' subsample */
subsample = 1;
/* handle some truncation errors */
if (width < 1) width = 1;
if (height < 1) height = 1;
@ -296,15 +297,18 @@ gimp_drawable_preview_scale (GimpImageBaseType type,
{
map_to_color (2, cmap, s, rgb);
r[RED_PIX] += rgb[RED_PIX] * tot_frac;
r[RED_PIX] += rgb[RED_PIX] * tot_frac;
r[GREEN_PIX] += rgb[GREEN_PIX] * tot_frac;
r[BLUE_PIX] += rgb[BLUE_PIX] * tot_frac;
r[BLUE_PIX] += rgb[BLUE_PIX] * tot_frac;
if (bytes == 4)
r[ALPHA_PIX] += s[ALPHA_I_PIX] * tot_frac;
}
else
for (b = 0; b < bytes; b++)
r[b] += s[b] * tot_frac;
{
for (b = 0; b < bytes; b++)
r[b] += s[b] * tot_frac;
}
/* increment the destination */
if (x_cum + x_rat <= (src_col + 1 + EPSILON))
@ -313,7 +317,6 @@ gimp_drawable_preview_scale (GimpImageBaseType type,
x_cum += x_rat;
j--;
}
/* increment the source */
else
{
@ -335,7 +338,7 @@ gimp_drawable_preview_scale (GimpImageBaseType type,
{
b = bytes;
while (b--)
*d++ = (guchar) ((*r++ * tot_frac)+0.5);
*d++ = (guchar) ((*r++ * tot_frac) + 0.5);
}
dest += destwidth;

View File

@ -24,10 +24,10 @@
#include "apptypes.h"
#include "boundary.h"
#include "channel.h"
#include "drawable.h"
#include "gimpimage.h"
#include "gimpdrawable.h"
#include "gimpdrawablepreview.h"
#include "gimppreviewcache.h"
#include "layer.h"
#include "paint_funcs.h"
@ -70,7 +70,7 @@ gimp_drawable_preview (GimpDrawable *drawable,
TempBuf *tb = gimp_drawable_preview_private (drawable,
PREVIEW_CACHE_PRIME_WIDTH,
PREVIEW_CACHE_PRIME_HEIGHT);
/* Save the 2nd call */
if (width == PREVIEW_CACHE_PRIME_WIDTH &&
height == PREVIEW_CACHE_PRIME_HEIGHT)
@ -128,6 +128,7 @@ gimp_drawable_preview_private (GimpDrawable *drawable,
/* calculate 'acceptable' subsample */
subsample = 1;
/* handle some truncation errors */
if (width < 1) width = 1;
if (height < 1) height = 1;
@ -296,15 +297,18 @@ gimp_drawable_preview_scale (GimpImageBaseType type,
{
map_to_color (2, cmap, s, rgb);
r[RED_PIX] += rgb[RED_PIX] * tot_frac;
r[RED_PIX] += rgb[RED_PIX] * tot_frac;
r[GREEN_PIX] += rgb[GREEN_PIX] * tot_frac;
r[BLUE_PIX] += rgb[BLUE_PIX] * tot_frac;
r[BLUE_PIX] += rgb[BLUE_PIX] * tot_frac;
if (bytes == 4)
r[ALPHA_PIX] += s[ALPHA_I_PIX] * tot_frac;
}
else
for (b = 0; b < bytes; b++)
r[b] += s[b] * tot_frac;
{
for (b = 0; b < bytes; b++)
r[b] += s[b] * tot_frac;
}
/* increment the destination */
if (x_cum + x_rat <= (src_col + 1 + EPSILON))
@ -313,7 +317,6 @@ gimp_drawable_preview_scale (GimpImageBaseType type,
x_cum += x_rat;
j--;
}
/* increment the source */
else
{
@ -335,7 +338,7 @@ gimp_drawable_preview_scale (GimpImageBaseType type,
{
b = bytes;
while (b--)
*d++ = (guchar) ((*r++ * tot_frac)+0.5);
*d++ = (guchar) ((*r++ * tot_frac) + 0.5);
}
dest += destwidth;

View File

@ -39,10 +39,10 @@
#include "channel.h"
#include "cursorutil.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gimage.h"
#include "gimage_mask.h"
#include "gimpdrawable.h"
#include "gimplayermask.h"
#include "gimprc.h"
#include "layer.h"

Some files were not shown because too many files have changed in this diff Show More