Commit 9bac8faf authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

app/core/Makefile.am new files. Changed function names to be consistent.

2001-11-28  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpimage-projection.[ch]: new files. Changed function
	names to be consistent.

	* app/core/gimpimage.[ch]: removed the projection stuff
	here. Removed the gimp_image_composite_blah() functions becauee
	they were just calling the resp. gimp_image_projection ones.

	* app/core/gimpimage-contiguous-region.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-crop.c
	* app/core/gimppalette-import.c
	* app/undo.c
	* app/display/gimpdisplay.c
	* app/display/gimpdisplayshell-render.c
	* app/gui/info-window.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpiscissorstool.c: changed accordingly.
parent e9c3bb45
2001-11-28 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/gimpimage-projection.[ch]: new files. Changed function
names to be consistent.
* app/core/gimpimage.[ch]: removed the projection stuff
here. Removed the gimp_image_composite_blah() functions becauee
they were just calling the resp. gimp_image_projection ones.
* app/core/gimpimage-contiguous-region.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-crop.c
* app/core/gimppalette-import.c
* app/undo.c
* app/display/gimpdisplay.c
* app/display/gimpdisplayshell-render.c
* app/gui/info-window.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpiscissorstool.c: changed accordingly.
2001-11-28 Michael Natterer <mitch@gimp.org>
* themes/Default/images/Makefile.am
......
......@@ -91,6 +91,8 @@ libappcore_a_sources = @STRIP_BEGIN@ \
gimpimage-mask-select.h \
gimpimage-new.c \
gimpimage-new.h \
gimpimage-projection.c \
gimpimage-projection.h \
gimpimage-undo.c \
gimpimage-undo.h \
gimpimagefile.c \
......
......@@ -33,6 +33,7 @@
#include "gimpchannel.h"
#include "gimpimage.h"
#include "gimpimage-contiguous-region.h"
#include "gimpimage-projection.h"
/* local function prototypes */
......@@ -98,9 +99,9 @@ gimp_image_contiguous_region_by_seed (GimpImage *gimage,
if (sample_merged)
{
pixel_region_init (&srcPR, gimp_image_composite (gimage), 0, 0,
pixel_region_init (&srcPR, gimp_image_projection (gimage), 0, 0,
gimage->width, gimage->height, FALSE);
type = gimp_image_composite_type (gimage);
type = gimp_image_projection_type (gimage);
has_alpha = (type == RGBA_GIMAGE ||
type == GRAYA_GIMAGE ||
type == INDEXEDA_GIMAGE);
......@@ -178,15 +179,15 @@ gimp_image_contiguous_region_by_color (GimpImage *gimage,
/* Get the image information */
if (sample_merged)
{
bytes = gimp_image_composite_bytes (gimage);
d_type = gimp_image_composite_type (gimage);
bytes = gimp_image_projection_bytes (gimage);
d_type = gimp_image_projection_type (gimage);
has_alpha = (d_type == RGBA_GIMAGE ||
d_type == GRAYA_GIMAGE ||
d_type == INDEXEDA_GIMAGE);
indexed = d_type == INDEXEDA_GIMAGE || d_type == INDEXED_GIMAGE;
width = gimage->width;
height = gimage->height;
pixel_region_init (&imagePR, gimp_image_composite (gimage),
pixel_region_init (&imagePR, gimp_image_projection (gimage),
0, 0, width, height, FALSE);
}
else
......
......@@ -112,6 +112,7 @@
#include "gimpimage.h"
#include "gimpimage-convert.h"
#include "gimpimage-convert-fsdither.h"
#include "gimpimage-projection.h"
#include "gimplist.h"
#include "gimplayer.h"
#include "gimppalette.h"
......@@ -927,7 +928,7 @@ gimp_image_convert (GimpImage *gimage,
quantobj->delete_func (quantobj);
/* Make sure the projection is up to date */
gimp_image_projection_realloc (gimage);
gimp_image_projection_allocate (gimage);
/* Rigor the floating selection */
if (floating_layer)
......
......@@ -32,6 +32,7 @@
#include "gimpimage.h"
#include "gimpimage-crop.h"
#include "gimpimage-mask.h"
#include "gimpimage-projection.h"
#include "gimplayer.h"
#include "gimplist.h"
......@@ -204,7 +205,7 @@ gimp_image_crop (GimpImage *gimage,
}
/* Make sure the projection matches the gimage size */
gimp_image_projection_realloc (gimage);
gimp_image_projection_allocate (gimage);
/* rigor the floating layer */
if (floating_layer)
......@@ -287,9 +288,9 @@ gimp_image_crop_auto_shrink (GimpImage *gimage,
else
{
has_alpha = TRUE;
bytes = gimp_image_composite_bytes (gimage);
bytes = gimp_image_projection_bytes (gimage);
get_color_obj = G_OBJECT (gimage);
get_color_func = (GetColorFunc) gimp_image_get_color_at;
get_color_func = (GetColorFunc) gimp_image_projection_get_color_at;
}
switch (gimp_image_crop_guess_bgcolor (get_color_obj, get_color_func,
......@@ -314,7 +315,7 @@ gimp_image_crop_auto_shrink (GimpImage *gimage,
pixel_region_init (&PR, gimp_drawable_data (active_drawable),
x1, y1, width, height, FALSE);
else
pixel_region_init (&PR, gimp_image_composite (gimage),
pixel_region_init (&PR, gimp_image_projection (gimage),
x1, y1, width, height, FALSE);
/* The following could be optimized further by processing
......
This diff is collapsed.
......@@ -244,9 +244,6 @@ void gimp_image_get_foreground (const GimpImage *gimage,
void gimp_image_get_background (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *bg);
guchar * gimp_image_get_color_at (GimpImage *gimage,
gint x,
gint y);
void gimp_image_get_color (const GimpImage *gimage,
GimpImageType d_type,
guchar *rgb,
......@@ -350,6 +347,9 @@ void gimp_image_set_component_active (GimpImage *gimage,
gboolean active);
gboolean gimp_image_get_component_active (const GimpImage *gimage,
ChannelType type);
void gimp_image_get_active_components (GimpImage *gimage,
GimpDrawable *drawable,
gint *active);
void gimp_image_set_component_visible (GimpImage *gimage,
ChannelType type,
......@@ -408,33 +408,10 @@ gboolean gimp_image_add_channel (GimpImage *gimage,
void gimp_image_remove_channel (GimpImage *gimage,
GimpChannel *channel);
void gimp_image_invalidate_without_render (GimpImage *gimage,
gint x,
gint y,
gint w,
gint h,
gint x1,
gint y1,
gint x2,
gint y2);
void gimp_image_invalidate (GimpImage *gimage,
gint x,
gint y,
gint w,
gint h,
gint x1,
gint y1,
gint x2,
gint y2);
void gimp_image_validate (TileManager *tm,
Tile *tile);
void gimp_image_invalidate_layer_previews (GimpImage *gimage);
void gimp_image_invalidate_channel_previews (GimpImage *gimage);
/* Access functions */
gboolean gimp_image_is_empty (const GimpImage *gimage);
......@@ -457,21 +434,6 @@ void gimp_image_clean_all (GimpImage *gimage);
GimpLayer * gimp_image_floating_sel (const GimpImage *gimage);
guchar * gimp_image_cmap (const GimpImage *gimage);
/* projection access functions */
TileManager * gimp_image_projection (GimpImage *gimage);
GimpImageType gimp_image_projection_type (const GimpImage *gimage);
gint gimp_image_projection_bytes (const GimpImage *gimage);
gint gimp_image_projection_opacity (const GimpImage *gimage);
void gimp_image_projection_realloc (GimpImage *gimage);
/* composite access functions */
TileManager * gimp_image_composite (GimpImage *gimage);
GimpImageType gimp_image_composite_type (const GimpImage *gimage);
gint gimp_image_composite_bytes (const GimpImage *gimage);
gboolean gimp_image_preview_valid (const GimpImage *gimage);
......
This diff is collapsed.
......@@ -244,9 +244,6 @@ void gimp_image_get_foreground (const GimpImage *gimage,
void gimp_image_get_background (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *bg);
guchar * gimp_image_get_color_at (GimpImage *gimage,
gint x,
gint y);
void gimp_image_get_color (const GimpImage *gimage,
GimpImageType d_type,
guchar *rgb,
......@@ -350,6 +347,9 @@ void gimp_image_set_component_active (GimpImage *gimage,
gboolean active);
gboolean gimp_image_get_component_active (const GimpImage *gimage,
ChannelType type);
void gimp_image_get_active_components (GimpImage *gimage,
GimpDrawable *drawable,
gint *active);
void gimp_image_set_component_visible (GimpImage *gimage,
ChannelType type,
......@@ -408,33 +408,10 @@ gboolean gimp_image_add_channel (GimpImage *gimage,
void gimp_image_remove_channel (GimpImage *gimage,
GimpChannel *channel);
void gimp_image_invalidate_without_render (GimpImage *gimage,
gint x,
gint y,
gint w,
gint h,
gint x1,
gint y1,
gint x2,
gint y2);
void gimp_image_invalidate (GimpImage *gimage,
gint x,
gint y,
gint w,
gint h,
gint x1,
gint y1,
gint x2,
gint y2);
void gimp_image_validate (TileManager *tm,
Tile *tile);
void gimp_image_invalidate_layer_previews (GimpImage *gimage);
void gimp_image_invalidate_channel_previews (GimpImage *gimage);
/* Access functions */
gboolean gimp_image_is_empty (const GimpImage *gimage);
......@@ -457,21 +434,6 @@ void gimp_image_clean_all (GimpImage *gimage);
GimpLayer * gimp_image_floating_sel (const GimpImage *gimage);
guchar * gimp_image_cmap (const GimpImage *gimage);
/* projection access functions */
TileManager * gimp_image_projection (GimpImage *gimage);
GimpImageType gimp_image_projection_type (const GimpImage *gimage);
gint gimp_image_projection_bytes (const GimpImage *gimage);
gint gimp_image_projection_opacity (const GimpImage *gimage);
void gimp_image_projection_realloc (GimpImage *gimage);
/* composite access functions */
TileManager * gimp_image_composite (GimpImage *gimage);
GimpImageType gimp_image_composite_type (const GimpImage *gimage);
gint gimp_image_composite_bytes (const GimpImage *gimage);
gboolean gimp_image_preview_valid (const GimpImage *gimage);
......
......@@ -28,6 +28,7 @@
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
#include "core/gimpimage-projection.h"
#include "core/gimptoolinfo.h"
#include "gui/info-dialog.h"
......@@ -561,10 +562,10 @@ pick_color_do (GimpImage *gimage,
}
else
{
sample_type = gimp_image_composite_type (gimage);
sample_type = gimp_image_projection_type (gimage);
is_indexed = FALSE;
get_color_func = (GetColorFunc) gimp_image_get_color_at;
get_color_func = (GetColorFunc) gimp_image_projection_get_color_at;
get_color_obj = GIMP_OBJECT (gimage);
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -244,9 +244,6 @@ void gimp_image_get_foreground (const GimpImage *gimage,
void gimp_image_get_background (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *bg);
guchar * gimp_image_get_color_at (GimpImage *gimage,
gint x,
gint y);
void gimp_image_get_color (const GimpImage *gimage,
GimpImageType d_type,
guchar *rgb,
......@@ -350,6 +347,9 @@ void gimp_image_set_component_active (GimpImage *gimage,
gboolean active);
gboolean gimp_image_get_component_active (const GimpImage *gimage,
ChannelType type);
void gimp_image_get_active_components (GimpImage *gimage,
GimpDrawable *drawable,
gint *active);
void gimp_image_set_component_visible (GimpImage *gimage,
ChannelType type,
......@@ -408,33 +408,10 @@ gboolean gimp_image_add_channel (GimpImage *gimage,
void gimp_image_remove_channel (GimpImage *gimage,
GimpChannel *channel);
void gimp_image_invalidate_without_render (GimpImage *gimage,
gint x,
gint y,
gint w,
gint h,
gint x1,
gint y1,
gint x2,
gint y2);
void gimp_image_invalidate (GimpImage *gimage,
gint x,
gint y,
gint w,
gint h,
gint x1,
gint y1,
gint x2,
gint y2);
void gimp_image_validate (TileManager *tm,
Tile *tile);
void gimp_image_invalidate_layer_previews (GimpImage *gimage);
void gimp_image_invalidate_channel_previews (GimpImage *gimage);
/* Access functions */
gboolean gimp_image_is_empty (const GimpImage *gimage);
......@@ -457,21 +434,6 @@ void gimp_image_clean_all (GimpImage *gimage);
GimpLayer * gimp_image_floating_sel (const GimpImage *gimage);
guchar * gimp_image_cmap (const GimpImage *gimage);
/* projection access functions */
TileManager * gimp_image_projection (GimpImage *gimage);
GimpImageType gimp_image_projection_type (const GimpImage *gimage);
gint gimp_image_projection_bytes (const GimpImage *gimage);
gint gimp_image_projection_opacity (const GimpImage *gimage);
void gimp_image_projection_realloc (GimpImage *gimage);
/* composite access functions */
TileManager * gimp_image_composite (GimpImage *gimage);
GimpImageType gimp_image_composite_type (const GimpImage *gimage);
gint gimp_image_composite_bytes (const GimpImage *gimage);
gboolean gimp_image_preview_valid (const GimpImage *gimage);
......
This diff is collapsed.
......@@ -244,9 +244,6 @@ void gimp_image_get_foreground (const GimpImage *gimage,
void gimp_image_get_background (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *bg);
guchar * gimp_image_get_color_at (GimpImage *gimage,
gint x,
gint y);
void gimp_image_get_color (const GimpImage *gimage,
GimpImageType d_type,
guchar *rgb,
......@@ -350,6 +347,9 @@ void gimp_image_set_component_active (GimpImage *gimage,
gboolean active);
gboolean gimp_image_get_component_active (const GimpImage *gimage,
ChannelType type);
void gimp_image_get_active_components (GimpImage *gimage,
GimpDrawable *drawable,
gint *active);
void gimp_image_set_component_visible (GimpImage *gimage,
ChannelType type,
......@@ -408,33 +408,10 @@ gboolean gimp_image_add_channel (GimpImage *gimage,
void gimp_image_remove_channel (GimpImage *gimage,
GimpChannel *channel);
void gimp_image_invalidate_without_render (GimpImage *gimage,
gint x,
gint y,
gint w,
gint h,
gint x1,
gint y1,
gint x2,
gint y2);
void gimp_image_invalidate (GimpImage *gimage,
gint x,
gint y,
gint w,
gint h,
gint x1,
gint y1,
gint x2,
gint y2);
void gimp_image_validate (TileManager *tm,
Tile *tile);
void gimp_image_invalidate_layer_previews (GimpImage *gimage);
void gimp_image_invalidate_channel_previews (GimpImage *gimage);
/* Access functions */
gboolean gimp_image_is_empty (const GimpImage *gimage);
......@@ -457,21 +434,6 @@ void gimp_image_clean_all (GimpImage *gimage);
GimpLayer * gimp_image_floating_sel (const GimpImage *gimage);
guchar * gimp_image_cmap (const GimpImage *gimage);
/* projection access functions */
TileManager * gimp_image_projection (GimpImage *gimage);
GimpImageType gimp_image_projection_type (const GimpImage *gimage);
gint gimp_image_projection_bytes (const GimpImage *gimage);
gint gimp_image_projection_opacity (const GimpImage *gimage);
void gimp_image_projection_realloc (GimpImage *gimage);
/* composite access functions */
TileManager * gimp_image_composite (GimpImage *gimage);
GimpImageType gimp_image_composite_type (const GimpImage *gimage);
gint gimp_image_composite_bytes (const GimpImage *gimage);
gboolean gimp_image_preview_valid (const GimpImage *gimage);
......
......@@ -40,6 +40,7 @@
#include "core/gimpcoreconfig.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
#include "core/gimpimage-projection.h"
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
#include "core/gimpparasite.h"
......@@ -2314,7 +2315,7 @@ undo_pop_gimage_mod (GimpImage *gimage,
data[2] = gimage->base_type;
gimage->base_type = tmp;
gimp_image_projection_realloc (gimage);
gimp_image_projection_allocate (gimage);
gimage_mask_invalidate (gimage);
......
This diff is collapsed.
......@@ -244,9 +244,6 @@ void gimp_image_get_foreground (const GimpImage *gimage,
void gimp_image_get_background (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *bg);
guchar * gimp_image_get_color_at (GimpImage *gimage,
gint x,
gint y);
void gimp_image_get_color (const GimpImage *gimage,
GimpImageType d_type,
guchar *rgb,
......@@ -350,6 +347,9 @@ void gimp_image_set_component_active (GimpImage *gimage,
gboolean active);
gboolean gimp_image_get_component_active (const GimpImage *gimage,
ChannelType type);
void gimp_image_get_active_components (GimpImage *gimage,
GimpDrawable *drawable,
gint *active);
void gimp_image_set_component_visible (GimpImage *gimage,
ChannelType type,
......@@ -408,33 +408,10 @@ gboolean gimp_image_add_channel (GimpImage *gimage,
void gimp_image_remove_channel (GimpImage *gimage,
GimpChannel *channel);
void gimp_image_invalidate_without_render (GimpImage *gimage,
gint x,
gint y,
gint w,
gint h,
gint x1,
gint y1,
gint x2,
gint y2);
void gimp_image_invalidate (GimpImage *gimage,
gint x,
gint y,
gint w,
gint h,
gint x1,
gint y1,
gint x2,
gint y2);
void gimp_image_validate (TileManager *tm,
Tile *tile);
void gimp_image_invalidate_layer_previews (GimpImage *gimage);
void gimp_image_invalidate_channel_previews (GimpImage *gimage);
/* Access functions */
gboolean gimp_image_is_empty (const GimpImage *gimage);
......@@ -457,21 +434,6 @@ void gimp_image_clean_all (GimpImage *gimage);
GimpLayer * gimp_image_floating_sel (const GimpImage *gimage);
guchar * gimp_image_cmap (const GimpImage *gimage);
/* projection access functions */
TileManager * gimp_image_projection (GimpImage *gimage);
GimpImageType gimp_image_projection_type (const GimpImage *gimage);
gint gimp_image_projection_bytes (const GimpImage *gimage);
gint gimp_image_projection_opacity (const GimpImage *gimage);
void gimp_image_projection_realloc (GimpImage *gimage);
/* composite access functions */
TileManager * gimp_image_composite (GimpImage *gimage);
GimpImageType gimp_image_composite_type (const GimpImage *gimage);
gint gimp_image_composite_bytes (const GimpImage *gimage);
gboolean gimp_image_preview_valid (const GimpImage *gimage);
......
......@@ -31,6 +31,7 @@
#include "gimpcontainer.h"
#include "gimpgradient.h"
#include "gimpimage.h"
#include "gimpimage-projection.h"
#include "gimppalette.h"
#include "libgimp/gimpintl.h"
......@@ -277,14 +278,14 @@ gimp_palette_import_from_image (GimpImage *gimage,
g_return_val_if_fail (threshold > 0, NULL);
/* Get the image information */
bytes = gimp_image_composite_bytes (gimage);
d_type = gimp_image_composite_type (gimage);
bytes = gimp_image_projection_bytes (gimage);
d_type = gimp_image_projection_type (gimage);
has_alpha = GIMP_IMAGE_TYPE_HAS_ALPHA (d_type);
indexed = d_type == INDEXEDA_GIMAGE || d_type == INDEXED_GIMAGE;
width = gimage->width;
height = gimage->height;
pixel_region_init (&imagePR, gimp_image_composite (gimage), 0, 0,
pixel_region_init (&imagePR, gimp_image_projection (gimage), 0, 0,
width, height, FALSE);
alpha = bytes - 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment