api change #2, fix #1

This commit is contained in:
Marc Lehmann 1999-10-24 20:49:09 +00:00
parent 1298f31902
commit 88e0cc3155
105 changed files with 212 additions and 195 deletions

View File

@ -1,3 +1,8 @@
Sun Oct 24 16:49:13 CEST 1999 Marc Lehmann <pcg@goof.com>
* tools/pdbgen/pdb/drawable.pdb, all calls: fixed some improperly
renamed pdb functions, most notably gimp_drawable_color.
Sun Oct 24 22:10:16 MEST 1999 Sven Neumann <sven@gimp.org> Sun Oct 24 22:10:16 MEST 1999 Sven Neumann <sven@gimp.org>
* app/channels_dialog.c * app/channels_dialog.c
@ -197,6 +202,7 @@ Thu Oct 19 05:30:11 BST 1999 Nick Lamb <njl195@zepler.org>
* app/image_new.c: Still using RGB_IMAGE instead of GIMAGE (!) * app/image_new.c: Still using RGB_IMAGE instead of GIMAGE (!)
>>>>>>> 1.1725
Mon Oct 18 21:24:47 BST 1999 Andy Thomas <alt@gimp.org> Mon Oct 18 21:24:47 BST 1999 Andy Thomas <alt@gimp.org>
* app/bezier_select.c * app/bezier_select.c
@ -215,8 +221,13 @@ Mon Oct 18 21:24:47 BST 1999 Andy Thomas <alt@gimp.org>
not on the curve the "new point" option will become selected and the not on the curve the "new point" option will become selected and the
new point will be added. new point will be added.
<<<<<<< ChangeLog
2) The "new point" option is defaulted to on when a new image is created
or a new image is selected from the image menu.
=======
2) The "new point" option is defaulted to on when a new image is 2) The "new point" option is defaulted to on when a new image is
created or a new image is selected from the image menu. created or a new image is selected from the image menu.
>>>>>>> 1.1725
3) Move and flip tool now effect the path if it is locked. 3) Move and flip tool now effect the path if it is locked.
@ -5913,7 +5924,7 @@ Sat May 29 23:43:56 PDT 1999 Manish Singh <yosh@gimp.org>
* libgimp/stdplugins-intl.h: #include <locale.h> * libgimp/stdplugins-intl.h: #include <locale.h>
1999-05-30 Jens Lauterbacher <jens@tellux.de> 1999-05-30 Jens Lautenbacher <jens@tellux.de>
Simon Budig <Simon.Budig@unix-ag.org> Simon Budig <Simon.Budig@unix-ag.org>
Michael Natterer <mitschel@cs.tu-berlin.de> Michael Natterer <mitschel@cs.tu-berlin.de>
Adam D. Moss <adam@gimp.org> Adam D. Moss <adam@gimp.org>

View File

@ -398,7 +398,7 @@ desaturate_invoker (Argument *args)
if (success) if (success)
{ {
if (gimp_drawable_color (drawable)) if (gimp_drawable_is_rgb (drawable))
desaturate (drawable); desaturate (drawable);
else else
success = FALSE; success = FALSE;
@ -581,7 +581,7 @@ curves_spline_invoker (Argument *args)
cd.drawable = drawable; cd.drawable = drawable;
cd.channel = channel; cd.channel = channel;
cd.color = gimp_drawable_color (drawable); cd.color = gimp_drawable_is_rgb (drawable);
cd.curve_type = SMOOTH; cd.curve_type = SMOOTH;
for (j = 0; j < num_points / 2; j++) for (j = 0; j < num_points / 2; j++)
@ -691,7 +691,7 @@ curves_explicit_invoker (Argument *args)
cd.drawable = drawable; cd.drawable = drawable;
cd.channel = channel; cd.channel = channel;
cd.color = gimp_drawable_color (drawable); cd.color = gimp_drawable_is_rgb (drawable);
for (j = 0; j < 256; j++) for (j = 0; j < 256; j++)
cd.curve[cd.channel][j] = curve[j]; cd.curve[cd.channel][j] = curve[j];
@ -929,7 +929,7 @@ histogram_invoker (Argument *args)
htd.shell = NULL; htd.shell = NULL;
htd.channel = channel; htd.channel = channel;
htd.drawable = drawable; htd.drawable = drawable;
htd.color = gimp_drawable_color (drawable); htd.color = gimp_drawable_is_rgb (drawable);
htd.histogram = histogram_widget_new (HISTOGRAM_WIDTH, htd.histogram = histogram_widget_new (HISTOGRAM_WIDTH,
HISTOGRAM_HEIGHT); HISTOGRAM_HEIGHT);
@ -1201,7 +1201,7 @@ threshold_invoker (Argument *args)
success = FALSE; success = FALSE;
else else
{ {
td.color = gimp_drawable_color (drawable); td.color = gimp_drawable_is_rgb (drawable);
td.low_threshold = low_threshold; td.low_threshold = low_threshold;
td.high_threshold = high_threshold; td.high_threshold = high_threshold;

View File

@ -522,7 +522,7 @@ gimp_drawable_get_tattoo (const GimpDrawable *drawable)
} }
gboolean gboolean
gimp_drawable_color (GimpDrawable *drawable) gimp_drawable_is_rgb (GimpDrawable *drawable)
{ {
if (gimp_drawable_type (drawable) == RGBA_GIMAGE || if (gimp_drawable_type (drawable) == RGBA_GIMAGE ||
gimp_drawable_type (drawable) == RGB_GIMAGE) gimp_drawable_type (drawable) == RGB_GIMAGE)

View File

@ -50,7 +50,7 @@ gint gimp_drawable_clean (GimpDrawable *);
gboolean gimp_drawable_has_alpha (GimpDrawable *); gboolean gimp_drawable_has_alpha (GimpDrawable *);
GimpImageType gimp_drawable_type (GimpDrawable *); GimpImageType gimp_drawable_type (GimpDrawable *);
GimpImageType gimp_drawable_type_with_alpha (GimpDrawable *); GimpImageType gimp_drawable_type_with_alpha (GimpDrawable *);
gboolean gimp_drawable_color (GimpDrawable *); gboolean gimp_drawable_is_rgb (GimpDrawable *);
gboolean gimp_drawable_is_gray (GimpDrawable *); gboolean gimp_drawable_is_gray (GimpDrawable *);
gboolean gimp_drawable_is_indexed (GimpDrawable *); gboolean gimp_drawable_is_indexed (GimpDrawable *);
TileManager * gimp_drawable_data (GimpDrawable *); TileManager * gimp_drawable_data (GimpDrawable *);

View File

@ -36,7 +36,7 @@ void drawable_apply_image (GimpDrawable *, gint, gint, gint, gint,
#define drawable_type gimp_drawable_type #define drawable_type gimp_drawable_type
#define drawable_has_alpha gimp_drawable_has_alpha #define drawable_has_alpha gimp_drawable_has_alpha
#define drawable_type_with_alpha gimp_drawable_type_with_alpha #define drawable_type_with_alpha gimp_drawable_type_with_alpha
#define drawable_color gimp_drawable_color #define drawable_color gimp_drawable_is_rgb
#define drawable_gray gimp_drawable_is_gray #define drawable_gray gimp_drawable_is_gray
#define drawable_indexed gimp_drawable_is_indexed #define drawable_indexed gimp_drawable_is_indexed
#define drawable_data gimp_drawable_data #define drawable_data gimp_drawable_data

View File

@ -35,9 +35,9 @@ static ProcRecord drawable_image_proc;
static ProcRecord drawable_type_proc; static ProcRecord drawable_type_proc;
static ProcRecord drawable_has_alpha_proc; static ProcRecord drawable_has_alpha_proc;
static ProcRecord drawable_type_with_alpha_proc; static ProcRecord drawable_type_with_alpha_proc;
static ProcRecord drawable_color_proc; static ProcRecord drawable_is_rgb_proc;
static ProcRecord drawable_gray_proc; static ProcRecord drawable_is_gray_proc;
static ProcRecord drawable_indexed_proc; static ProcRecord drawable_is_indexed_proc;
static ProcRecord drawable_bytes_proc; static ProcRecord drawable_bytes_proc;
static ProcRecord drawable_width_proc; static ProcRecord drawable_width_proc;
static ProcRecord drawable_height_proc; static ProcRecord drawable_height_proc;
@ -61,9 +61,9 @@ register_drawable_procs (void)
procedural_db_register (&drawable_type_proc); procedural_db_register (&drawable_type_proc);
procedural_db_register (&drawable_has_alpha_proc); procedural_db_register (&drawable_has_alpha_proc);
procedural_db_register (&drawable_type_with_alpha_proc); procedural_db_register (&drawable_type_with_alpha_proc);
procedural_db_register (&drawable_color_proc); procedural_db_register (&drawable_is_rgb_proc);
procedural_db_register (&drawable_gray_proc); procedural_db_register (&drawable_is_gray_proc);
procedural_db_register (&drawable_indexed_proc); procedural_db_register (&drawable_is_indexed_proc);
procedural_db_register (&drawable_bytes_proc); procedural_db_register (&drawable_bytes_proc);
procedural_db_register (&drawable_width_proc); procedural_db_register (&drawable_width_proc);
procedural_db_register (&drawable_height_proc); procedural_db_register (&drawable_height_proc);
@ -528,20 +528,20 @@ static ProcRecord drawable_type_with_alpha_proc =
}; };
static Argument * static Argument *
drawable_color_invoker (Argument *args) drawable_is_rgb_invoker (Argument *args)
{ {
Argument *return_args; Argument *return_args;
GimpDrawable *drawable; GimpDrawable *drawable;
drawable = gimp_drawable_get_ID (args[0].value.pdb_int); drawable = gimp_drawable_get_ID (args[0].value.pdb_int);
return_args = procedural_db_return_args (&drawable_color_proc, TRUE); return_args = procedural_db_return_args (&drawable_is_rgb_proc, TRUE);
return_args[1].value.pdb_int = drawable_color (drawable); return_args[1].value.pdb_int = drawable_color (drawable);
return return_args; return return_args;
} }
static ProcArg drawable_color_inargs[] = static ProcArg drawable_is_rgb_inargs[] =
{ {
{ {
PDB_DRAWABLE, PDB_DRAWABLE,
@ -550,7 +550,7 @@ static ProcArg drawable_color_inargs[] =
} }
}; };
static ProcArg drawable_color_outargs[] = static ProcArg drawable_is_rgb_outargs[] =
{ {
{ {
PDB_INT32, PDB_INT32,
@ -559,9 +559,9 @@ static ProcArg drawable_color_outargs[] =
} }
}; };
static ProcRecord drawable_color_proc = static ProcRecord drawable_is_rgb_proc =
{ {
"gimp_drawable_color", "gimp_drawable_is_rgb",
"Returns whether the drawable is an RGB type.", "Returns whether the drawable is an RGB type.",
"This procedure returns non-zero if the specified drawable is of type { RGB, RGBA }.", "This procedure returns non-zero if the specified drawable is of type { RGB, RGBA }.",
"Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis",
@ -569,27 +569,27 @@ static ProcRecord drawable_color_proc =
"1995-1996", "1995-1996",
PDB_INTERNAL, PDB_INTERNAL,
1, 1,
drawable_color_inargs, drawable_is_rgb_inargs,
1, 1,
drawable_color_outargs, drawable_is_rgb_outargs,
{ { drawable_color_invoker } } { { drawable_is_rgb_invoker } }
}; };
static Argument * static Argument *
drawable_gray_invoker (Argument *args) drawable_is_gray_invoker (Argument *args)
{ {
Argument *return_args; Argument *return_args;
GimpDrawable *drawable; GimpDrawable *drawable;
drawable = gimp_drawable_get_ID (args[0].value.pdb_int); drawable = gimp_drawable_get_ID (args[0].value.pdb_int);
return_args = procedural_db_return_args (&drawable_gray_proc, TRUE); return_args = procedural_db_return_args (&drawable_is_gray_proc, TRUE);
return_args[1].value.pdb_int = drawable_gray (drawable); return_args[1].value.pdb_int = drawable_gray (drawable);
return return_args; return return_args;
} }
static ProcArg drawable_gray_inargs[] = static ProcArg drawable_is_gray_inargs[] =
{ {
{ {
PDB_DRAWABLE, PDB_DRAWABLE,
@ -598,7 +598,7 @@ static ProcArg drawable_gray_inargs[] =
} }
}; };
static ProcArg drawable_gray_outargs[] = static ProcArg drawable_is_gray_outargs[] =
{ {
{ {
PDB_INT32, PDB_INT32,
@ -607,9 +607,9 @@ static ProcArg drawable_gray_outargs[] =
} }
}; };
static ProcRecord drawable_gray_proc = static ProcRecord drawable_is_gray_proc =
{ {
"gimp_drawable_gray", "gimp_drawable_is_gray",
"Returns whether the drawable is a grayscale type.", "Returns whether the drawable is a grayscale type.",
"This procedure returns non-zero if the specified drawable is of type { Gray, GrayA }.", "This procedure returns non-zero if the specified drawable is of type { Gray, GrayA }.",
"Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis",
@ -617,27 +617,27 @@ static ProcRecord drawable_gray_proc =
"1995-1996", "1995-1996",
PDB_INTERNAL, PDB_INTERNAL,
1, 1,
drawable_gray_inargs, drawable_is_gray_inargs,
1, 1,
drawable_gray_outargs, drawable_is_gray_outargs,
{ { drawable_gray_invoker } } { { drawable_is_gray_invoker } }
}; };
static Argument * static Argument *
drawable_indexed_invoker (Argument *args) drawable_is_indexed_invoker (Argument *args)
{ {
Argument *return_args; Argument *return_args;
GimpDrawable *drawable; GimpDrawable *drawable;
drawable = gimp_drawable_get_ID (args[0].value.pdb_int); drawable = gimp_drawable_get_ID (args[0].value.pdb_int);
return_args = procedural_db_return_args (&drawable_indexed_proc, TRUE); return_args = procedural_db_return_args (&drawable_is_indexed_proc, TRUE);
return_args[1].value.pdb_int = drawable_indexed (drawable); return_args[1].value.pdb_int = drawable_indexed (drawable);
return return_args; return return_args;
} }
static ProcArg drawable_indexed_inargs[] = static ProcArg drawable_is_indexed_inargs[] =
{ {
{ {
PDB_DRAWABLE, PDB_DRAWABLE,
@ -646,7 +646,7 @@ static ProcArg drawable_indexed_inargs[] =
} }
}; };
static ProcArg drawable_indexed_outargs[] = static ProcArg drawable_is_indexed_outargs[] =
{ {
{ {
PDB_INT32, PDB_INT32,
@ -655,9 +655,9 @@ static ProcArg drawable_indexed_outargs[] =
} }
}; };
static ProcRecord drawable_indexed_proc = static ProcRecord drawable_is_indexed_proc =
{ {
"gimp_drawable_indexed", "gimp_drawable_is_indexed",
"Returns whether the drawable is an indexed type.", "Returns whether the drawable is an indexed type.",
"This procedure returns non-zero if the specified drawable is of type { Indexed, IndexedA }.", "This procedure returns non-zero if the specified drawable is of type { Indexed, IndexedA }.",
"Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis",
@ -665,10 +665,10 @@ static ProcRecord drawable_indexed_proc =
"1995-1996", "1995-1996",
PDB_INTERNAL, PDB_INTERNAL,
1, 1,
drawable_indexed_inargs, drawable_is_indexed_inargs,
1, 1,
drawable_indexed_outargs, drawable_is_indexed_outargs,
{ { drawable_indexed_invoker } } { { drawable_is_indexed_invoker } }
}; };
static Argument * static Argument *

View File

@ -522,7 +522,7 @@ gimp_drawable_get_tattoo (const GimpDrawable *drawable)
} }
gboolean gboolean
gimp_drawable_color (GimpDrawable *drawable) gimp_drawable_is_rgb (GimpDrawable *drawable)
{ {
if (gimp_drawable_type (drawable) == RGBA_GIMAGE || if (gimp_drawable_type (drawable) == RGBA_GIMAGE ||
gimp_drawable_type (drawable) == RGB_GIMAGE) gimp_drawable_type (drawable) == RGB_GIMAGE)

View File

@ -50,7 +50,7 @@ gint gimp_drawable_clean (GimpDrawable *);
gboolean gimp_drawable_has_alpha (GimpDrawable *); gboolean gimp_drawable_has_alpha (GimpDrawable *);
GimpImageType gimp_drawable_type (GimpDrawable *); GimpImageType gimp_drawable_type (GimpDrawable *);
GimpImageType gimp_drawable_type_with_alpha (GimpDrawable *); GimpImageType gimp_drawable_type_with_alpha (GimpDrawable *);
gboolean gimp_drawable_color (GimpDrawable *); gboolean gimp_drawable_is_rgb (GimpDrawable *);
gboolean gimp_drawable_is_gray (GimpDrawable *); gboolean gimp_drawable_is_gray (GimpDrawable *);
gboolean gimp_drawable_is_indexed (GimpDrawable *); gboolean gimp_drawable_is_indexed (GimpDrawable *);
TileManager * gimp_drawable_data (GimpDrawable *); TileManager * gimp_drawable_data (GimpDrawable *);

View File

@ -740,7 +740,7 @@ come a long way in two years.
(plug-in-gauss-rle 1 img disp-map blur TRUE TRUE) (plug-in-gauss-rle 1 img disp-map blur TRUE TRUE)
(gimp-levels img disp-map 0 0 255 1.0 96 255) (gimp-levels img disp-map 0 0 255 1.0 96 255)
(if (= (car (gimp-drawable-color bg-layer)) 1) (if (= (car (gimp-drawable-is-rgb bg-layer)) 1)
(gimp-convert-rgb img)) (gimp-convert-rgb img))
(gimp-image-add-layer img bg-layer 2) (gimp-image-add-layer img bg-layer 2)

View File

@ -36,7 +36,7 @@ EXPORTS
gimp_drawable_parasite_attach gimp_drawable_parasite_attach
gimp_drawable_bpp gimp_drawable_bpp
gimp_drawable_is_channel gimp_drawable_is_channel
gimp_drawable_color gimp_drawable_is_rgb
gimp_drawable_delete gimp_drawable_delete
gimp_drawable_detach gimp_drawable_detach
gimp_drawable_parasite_detach gimp_drawable_parasite_detach

View File

@ -694,7 +694,7 @@ guint gimp_drawable_bpp (gint32 drawable_ID);
GDrawableType gimp_drawable_type (gint32 drawable_ID); GDrawableType gimp_drawable_type (gint32 drawable_ID);
gint gimp_drawable_visible (gint32 drawable_ID); gint gimp_drawable_visible (gint32 drawable_ID);
gint gimp_drawable_is_channel (gint32 drawable_ID); gint gimp_drawable_is_channel (gint32 drawable_ID);
gint gimp_drawable_color (gint32 drawable_ID); gint gimp_drawable_is_rgb (gint32 drawable_ID);
gint gimp_drawable_is_gray (gint32 drawable_ID); gint gimp_drawable_is_gray (gint32 drawable_ID);
gint gimp_drawable_has_alpha (gint32 drawable_ID); gint gimp_drawable_has_alpha (gint32 drawable_ID);
gint gimp_drawable_is_indexed (gint32 drawable_ID); gint gimp_drawable_is_indexed (gint32 drawable_ID);

View File

@ -285,13 +285,13 @@ gimp_drawable_is_channel (gint32 drawable_ID)
} }
gint gint
gimp_drawable_color (gint32 drawable_ID) gimp_drawable_is_rgb (gint32 drawable_ID)
{ {
GParam *return_vals; GParam *return_vals;
int nreturn_vals; int nreturn_vals;
int result; int result;
return_vals = gimp_run_procedure ("gimp_drawable_color", return_vals = gimp_run_procedure ("gimp_drawable_is_rgb",
&nreturn_vals, &nreturn_vals,
PARAM_DRAWABLE, drawable_ID, PARAM_DRAWABLE, drawable_ID,
PARAM_END); PARAM_END);

View File

@ -285,13 +285,13 @@ gimp_drawable_is_channel (gint32 drawable_ID)
} }
gint gint
gimp_drawable_color (gint32 drawable_ID) gimp_drawable_is_rgb (gint32 drawable_ID)
{ {
GParam *return_vals; GParam *return_vals;
int nreturn_vals; int nreturn_vals;
int result; int result;
return_vals = gimp_run_procedure ("gimp_drawable_color", return_vals = gimp_run_procedure ("gimp_drawable_is_rgb",
&nreturn_vals, &nreturn_vals,
PARAM_DRAWABLE, drawable_ID, PARAM_DRAWABLE, drawable_ID,
PARAM_END); PARAM_END);

View File

@ -374,7 +374,7 @@ run (char *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is indexed or RGB color */ /* Make sure that the drawable is indexed or RGB color */
if (gimp_drawable_color (drawable->id)) if (gimp_drawable_is_rgb (drawable->id))
{ {
gimp_progress_init (_("AlienMap: Transforming ...")); gimp_progress_init (_("AlienMap: Transforming ..."));

View File

@ -387,7 +387,7 @@ run (char *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is indexed or RGB_MODEL color */ /* Make sure that the drawable is indexed or RGB_MODEL color */
if (gimp_drawable_color (drawable->id)) if (gimp_drawable_is_rgb (drawable->id))
{ {
gimp_progress_init (_("AlienMap2: Transforming ...")); gimp_progress_init (_("AlienMap2: Transforming ..."));

View File

@ -297,7 +297,7 @@ run(char *name,
if (status == STATUS_SUCCESS) { if (status == STATUS_SUCCESS) {
/* Make sure that the drawable is indexed or RGB color */ /* Make sure that the drawable is indexed or RGB color */
if (gimp_drawable_color(drawable->id)) { if (gimp_drawable_is_rgb(drawable->id)) {
gimp_progress_init("Rendering fractal..."); gimp_progress_init("Rendering fractal...");
/* Set the tile cache size */ /* Set the tile cache size */

View File

@ -226,7 +226,7 @@ static void run(gchar *name,
/* Make sure that the drawable is RGBA or RGB color */ /* Make sure that the drawable is RGBA or RGB color */
/* ================================================ */ /* ================================================ */
if (gimp_drawable_color(drawable->id)) if (gimp_drawable_is_rgb(drawable->id))
{ {
/* Set the tile cache size */ /* Set the tile cache size */
/* ======================= */ /* ======================= */

View File

@ -568,7 +568,7 @@ gint box_constrain(gint32 image_id, gint32 drawable_id, gpointer data)
if (drawable_id == -1) if (drawable_id == -1)
return(TRUE); return(TRUE);
return (gimp_drawable_color(drawable_id) && !gimp_drawable_is_indexed(drawable_id)); return (gimp_drawable_is_rgb(drawable_id) && !gimp_drawable_is_indexed(drawable_id));
} }
void box_drawable_callback(gint32 id, gpointer data) void box_drawable_callback(gint32 id, gpointer data)
@ -585,7 +585,7 @@ gint cylinder_constrain(gint32 image_id, gint32 drawable_id, gpointer data)
if (drawable_id == -1) if (drawable_id == -1)
return(TRUE); return(TRUE);
return (gimp_drawable_color(drawable_id) && !gimp_drawable_is_indexed(drawable_id)); return (gimp_drawable_is_rgb(drawable_id) && !gimp_drawable_is_indexed(drawable_id));
} }
void cylinder_drawable_callback(gint32 id, gpointer data) void cylinder_drawable_callback(gint32 id, gpointer data)

View File

@ -155,7 +155,7 @@ run (char *name,
if (status == STATUS_SUCCESS) { if (status == STATUS_SUCCESS) {
/* Make sure that the drawable is RGB color */ /* Make sure that the drawable is RGB color */
if (gimp_drawable_color (drawable->id)) { if (gimp_drawable_is_rgb (drawable->id)) {
gimp_progress_init ("borderaverage"); gimp_progress_init ("borderaverage");
borderaverage (drawable, &result_color[0], &result_color[1], &result_color[2]); borderaverage (drawable, &result_color[0], &result_color[1], &result_color[2]);

View File

@ -98,7 +98,7 @@ static void run(char *name, int n_params, GParam * param, int *nreturn_vals,
image_id = param[1].data.d_image; image_id = param[1].data.d_image;
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color(drawable->id) || if (gimp_drawable_is_rgb(drawable->id) ||
gimp_drawable_is_gray(drawable->id) || gimp_drawable_is_gray(drawable->id) ||
gimp_drawable_is_indexed(drawable->id)) gimp_drawable_is_indexed(drawable->id))
{ {

View File

@ -114,7 +114,7 @@ run (char *name,
image_ID = param[1].data.d_image; image_ID = param[1].data.d_image;
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init (_("Auto-Stretching HSV...")); gimp_progress_init (_("Auto-Stretching HSV..."));
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));

View File

@ -260,7 +260,7 @@ run (gchar *name,
break; break;
} }
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("Adding Blinds ..."); gimp_progress_init ("Adding Blinds ...");

View File

@ -260,7 +260,7 @@ run(char *name, int nparams, GParam *param, int *nreturn_vals,
/* /*
* Make sure the drawable type is appropriate. * Make sure the drawable type is appropriate.
*/ */
if (gimp_drawable_color(drawable->id) || if (gimp_drawable_is_rgb(drawable->id) ||
gimp_drawable_is_gray(drawable->id)) { gimp_drawable_is_gray(drawable->id)) {
switch (run_mode) { switch (run_mode) {

View File

@ -155,7 +155,7 @@ run (char *name,
if (status == STATUS_SUCCESS) { if (status == STATUS_SUCCESS) {
/* Make sure that the drawable is RGB color */ /* Make sure that the drawable is RGB color */
if (gimp_drawable_color (drawable->id)) { if (gimp_drawable_is_rgb (drawable->id)) {
gimp_progress_init ("borderaverage"); gimp_progress_init ("borderaverage");
borderaverage (drawable, &result_color[0], &result_color[1], &result_color[2]); borderaverage (drawable, &result_color[0], &result_color[1], &result_color[2]);

View File

@ -443,7 +443,7 @@ run(char *name,
/* Bumpmap the image */ /* Bumpmap the image */
if (status == STATUS_SUCCESS) { if (status == STATUS_SUCCESS) {
if ((gimp_drawable_color(drawable->id) || if ((gimp_drawable_is_rgb(drawable->id) ||
gimp_drawable_is_gray(drawable->id))) { gimp_drawable_is_gray(drawable->id))) {
/* Set the tile cache size */ /* Set the tile cache size */
@ -1546,7 +1546,7 @@ dialog_constrain(gint32 image_id, gint32 drawable_id, gpointer data)
if (drawable_id == -1) if (drawable_id == -1)
return TRUE; return TRUE;
return (gimp_drawable_color(drawable_id) || gimp_drawable_is_gray(drawable_id)); return (gimp_drawable_is_rgb(drawable_id) || gimp_drawable_is_gray(drawable_id));
} /* dialog_constrain */ } /* dialog_constrain */

View File

@ -110,7 +110,7 @@ run (char *name,
image_ID = param[1].data.d_image; image_ID = param[1].data.d_image;
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init (_("Auto-Stretching Contrast...")); gimp_progress_init (_("Auto-Stretching Contrast..."));
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));

View File

@ -159,7 +159,7 @@ run (gchar *name,
break; break;
} }
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init (_("Adding Checkerboard...")); gimp_progress_init (_("Adding Checkerboard..."));

View File

@ -116,7 +116,7 @@ run (char *name,
image_ID = param[1].data.d_image; image_ID = param[1].data.d_image;
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init (_("Color Enhance...")); gimp_progress_init (_("Color Enhance..."));
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));

View File

@ -234,7 +234,7 @@ static void run(char *name, int n_params, GParam * param,
if (status == STATUS_SUCCESS) { if (status == STATUS_SUCCESS) {
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color(drawable->id) || if (gimp_drawable_is_rgb(drawable->id) ||
gimp_drawable_is_gray(drawable->id)) { gimp_drawable_is_gray(drawable->id)) {
gimp_progress_init(_("Applying convolution")); gimp_progress_init(_("Applying convolution"));
gimp_tile_cache_ntiles(2 * (drawable->width / gimp_tile_cache_ntiles(2 * (drawable->width /
@ -431,7 +431,7 @@ static void doit(void)
height = drawable->height; height = drawable->height;
bytes = drawable->bpp; bytes = drawable->bpp;
if(gimp_drawable_color(drawable->id)) if(gimp_drawable_is_rgb(drawable->id))
for(i=0;i<3;i++) for(i=0;i<3;i++)
chanmask[i]=my_config.channels[i+1]; chanmask[i]=my_config.channels[i+1];
else /* Grayscale */ else /* Grayscale */
@ -605,7 +605,7 @@ static void check_config(void){
for(i=0;i<5;i++) for(i=0;i<5;i++)
if(my_config.channels[i]<0) if(my_config.channels[i]<0)
my_config.channels[i]=0; my_config.channels[i]=0;
if(gimp_drawable_color(drawable->id)) if(gimp_drawable_is_rgb(drawable->id))
my_config.channels[0]=-1; my_config.channels[0]=-1;
else if(gimp_drawable_is_gray(drawable->id)) else if(gimp_drawable_is_gray(drawable->id))
for(i=1;i<4;i++) for(i=1;i<4;i++)

View File

@ -243,7 +243,7 @@ run (char *name,
/* Render the cubism effect */ /* Render the cubism effect */
if ((status == STATUS_SUCCESS) && if ((status == STATUS_SUCCESS) &&
(gimp_drawable_color (active_drawable->id) || gimp_drawable_is_gray (active_drawable->id))) (gimp_drawable_is_rgb (active_drawable->id) || gimp_drawable_is_gray (active_drawable->id)))
{ {
/* set cache size */ /* set cache size */
gimp_tile_cache_ntiles (SQR (4 * cvals.tile_size * cvals.tile_saturation) / SQR (gimp_tile_width ())); gimp_tile_cache_ntiles (SQR (4 * cvals.tile_size * cvals.tile_saturation) / SQR (gimp_tile_width ()));

View File

@ -1340,7 +1340,7 @@ bender_new_dialog (GDrawable *drawable)
cd->rotation = 0.0; /* vertical bend */ cd->rotation = 0.0; /* vertical bend */
cd->drawable = drawable; cd->drawable = drawable;
cd->color = gimp_drawable_color (cd->drawable->id); cd->color = gimp_drawable_is_rgb (cd->drawable->id);
cd->run = FALSE; cd->run = FALSE;
cd->bval_from = NULL; cd->bval_from = NULL;

View File

@ -126,7 +126,7 @@ run (char *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("deinterlace"); gimp_progress_init ("deinterlace");
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));

View File

@ -960,8 +960,8 @@ gint constraintResultSizeAndResultColorOrGray(gint32 imageId,
gimp_drawable_width( dm->params.result)) && gimp_drawable_width( dm->params.result)) &&
(gimp_drawable_height(drawableId) == (gimp_drawable_height(drawableId) ==
gimp_drawable_height(dm->params.result)) && gimp_drawable_height(dm->params.result)) &&
((gimp_drawable_color(drawableId) && ((gimp_drawable_is_rgb(drawableId) &&
(gimp_drawable_color(dm->params.result))) || (gimp_drawable_is_rgb(dm->params.result))) ||
gimp_drawable_is_gray( drawableId)))); gimp_drawable_is_gray( drawableId))));
} }

View File

@ -43,6 +43,9 @@
* Revision History: * Revision History:
* *
* $Log$ * $Log$
* Revision 1.17 1999/10/24 20:48:58 pcg
* api change #2, fix #1
*
* Revision 1.16 1999/10/17 00:07:38 pcg * Revision 1.16 1999/10/17 00:07:38 pcg
* API PATCH #2 or so * API PATCH #2 or so
* *
@ -396,7 +399,7 @@ run(char *name, /* I - Name of filter program. */
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
if ((gimp_drawable_color(drawable->id) || if ((gimp_drawable_is_rgb(drawable->id) ||
gimp_drawable_is_gray(drawable->id))) gimp_drawable_is_gray(drawable->id)))
{ {
/* /*

View File

@ -250,7 +250,7 @@ run(char *name, /* I - Name of filter program. */
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
if ((gimp_drawable_color(drawable->id) || if ((gimp_drawable_is_rgb(drawable->id) ||
gimp_drawable_is_gray(drawable->id))) gimp_drawable_is_gray(drawable->id)))
{ {
/* /*

View File

@ -264,7 +264,7 @@ run(char *name,
/* Create the diffraction pattern */ /* Create the diffraction pattern */
if ((status == STATUS_SUCCESS) && gimp_drawable_color(active_drawable->id)) { if ((status == STATUS_SUCCESS) && gimp_drawable_is_rgb(active_drawable->id)) {
/* Set the tile cache size */ /* Set the tile cache size */
gimp_tile_cache_ntiles((active_drawable->width + gimp_tile_width() - 1) / gimp_tile_width()); gimp_tile_cache_ntiles((active_drawable->width + gimp_tile_width() - 1) / gimp_tile_width());

View File

@ -226,7 +226,7 @@ run (gchar *name,
} }
/* make sure the drawable exist and is not indexed */ /* make sure the drawable exist and is not indexed */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("Edge detection..."); gimp_progress_init ("Edge detection...");
@ -267,7 +267,7 @@ init_tile_buf( TileBuf *buf, GDrawable *drawable )
buf->tile = NULL; buf->tile = NULL;
buf->col = 0; buf->col = 0;
buf->row = 0; buf->row = 0;
if ( gimp_drawable_color( drawable->id ) ) if ( gimp_drawable_is_rgb( drawable->id ) )
buf->bpp = 3; buf->bpp = 3;
else else
buf->bpp = 1; buf->bpp = 1;

View File

@ -322,7 +322,7 @@ engrave_large(GDrawable * drawable, gint height, gint limit)
gimp_drawable_mask_bounds(drawable->id, &x1, &y1, &x2, &y2); gimp_drawable_mask_bounds(drawable->id, &x1, &y1, &x2, &y2);
if (gimp_drawable_color(drawable->id)) if (gimp_drawable_is_rgb(drawable->id))
bpp = 3; bpp = 3;
else else
bpp = 1; bpp = 1;
@ -440,7 +440,7 @@ engrave_small(GDrawable * drawable, gint height, gint limit, gint tile_width)
max_progress = (x2 - x1) * (y2 - y1); max_progress = (x2 - x1) * (y2 - y1);
bpp = drawable->bpp; bpp = drawable->bpp;
if (gimp_drawable_color(drawable->id)) if (gimp_drawable_is_rgb(drawable->id))
color_n = 3; color_n = 3;
else else
color_n = 1; color_n = 1;

View File

@ -197,7 +197,7 @@ void run(char *name, int nparams, GParam *param, int *nreturn_vals, GParam **ret
} }
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
if (gimp_drawable_color(drw->id)) if (gimp_drawable_is_rgb(drw->id))
{ {
gimp_progress_init("Color Exchange..."); gimp_progress_init("Color Exchange...");
gimp_tile_cache_ntiles(2 * (drw->width / gimp_tile_width() + 1)); gimp_tile_cache_ntiles(2 * (drw->width / gimp_tile_width() + 1));

View File

@ -254,7 +254,7 @@ static void run (gchar *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("Render flare..."); gimp_progress_init ("Render flare...");
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));

View File

@ -97,7 +97,7 @@ run (char *name,
status = STATUS_EXECUTION_ERROR; status = STATUS_EXECUTION_ERROR;
} }
else if (gimp_drawable_color (drawable->id) && fp_dialog()) else if (gimp_drawable_is_rgb (drawable->id) && fp_dialog())
{ {
gimp_progress_init ("Applying the Filter Pack..."); gimp_progress_init ("Applying the Filter Pack...");
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));

View File

@ -187,7 +187,7 @@ static void run( char *name, int argc, GParam *args, int *retc, GParam **rets )
pixels_init( drawable ); pixels_init( drawable );
if( !gimp_drawable_color( drawable->id ) && if( !gimp_drawable_is_rgb( drawable->id ) &&
!gimp_drawable_is_gray( drawable->id ) ){ !gimp_drawable_is_gray( drawable->id ) ){
status = STATUS_EXECUTION_ERROR; status = STATUS_EXECUTION_ERROR;
} }

View File

@ -201,7 +201,7 @@ run (gchar *name,
drawable = gimp_drawable_get (param[2].data.d_drawable); drawable = gimp_drawable_get (param[2].data.d_drawable);
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || if (gimp_drawable_is_rgb (drawable->id) ||
gimp_drawable_is_gray (drawable->id)) gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("IIR Gaussian Blur"); gimp_progress_init ("IIR Gaussian Blur");

View File

@ -194,7 +194,7 @@ run (gchar *name,
drawable = gimp_drawable_get (param[2].data.d_drawable); drawable = gimp_drawable_get (param[2].data.d_drawable);
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || if (gimp_drawable_is_rgb (drawable->id) ||
gimp_drawable_is_gray (drawable->id)) gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("RLE Gaussian Blur"); gimp_progress_init ("RLE Gaussian Blur");

View File

@ -170,7 +170,7 @@ static void run (gchar *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("Glass Tile..."); gimp_progress_init ("Glass Tile...");
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));

View File

@ -331,7 +331,7 @@ void run(char *name, int nparams, GParam *param, int *nreturn_vals, GParam **ret
img_has_alpha = gimp_drawable_has_alpha(drawable->id); img_has_alpha = gimp_drawable_has_alpha(drawable->id);
gimp_drawable_mask_bounds(drawable->id, &sel_x1, &sel_y1, &sel_x2, &sel_y2); gimp_drawable_mask_bounds(drawable->id, &sel_x1, &sel_y1, &sel_x2, &sel_y2);
if (!gimp_drawable_color(drawable->id)) if (!gimp_drawable_is_rgb(drawable->id))
status=STATUS_CALLING_ERROR; status=STATUS_CALLING_ERROR;
if (status==STATUS_SUCCESS) { if (status==STATUS_SUCCESS) {

View File

@ -142,7 +142,7 @@ run (gchar *name,
drawable = gimp_drawable_get (param[2].data.d_drawable); drawable = gimp_drawable_get (param[2].data.d_drawable);
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("Gradient Map..."); gimp_progress_init ("Gradient Map...");
gimp_tile_cache_ntiles (TILE_CACHE_SIZE); gimp_tile_cache_ntiles (TILE_CACHE_SIZE);
@ -181,7 +181,7 @@ gradmap (GDrawable *drawable)
gimp_drawable_mask_bounds (drawable->id, &x1, &y1, &x2, &y2); gimp_drawable_mask_bounds (drawable->id, &x1, &y1, &x2, &y2);
bpp = alpha = gimp_drawable_bpp( drawable->id ); bpp = alpha = gimp_drawable_bpp( drawable->id );
color = gimp_drawable_color( drawable->id ); color = gimp_drawable_is_rgb( drawable->id );
has_alpha = gimp_drawable_has_alpha( drawable->id ); has_alpha = gimp_drawable_has_alpha( drawable->id );
if( has_alpha ) if( has_alpha )
alpha--; alpha--;
@ -253,7 +253,7 @@ get_samples (GDrawable *drawable)
f_samples = gimp_gradients_sample_uniform (NSAMPLES); f_samples = gimp_gradients_sample_uniform (NSAMPLES);
bpp = gimp_drawable_bpp (drawable->id); bpp = gimp_drawable_bpp (drawable->id);
color = gimp_drawable_color (drawable->id); color = gimp_drawable_is_rgb (drawable->id);
has_alpha = gimp_drawable_has_alpha (drawable->id); has_alpha = gimp_drawable_has_alpha (drawable->id);
alpha = (has_alpha ? bpp - 1 : bpp); alpha = (has_alpha ? bpp - 1 : bpp);

View File

@ -163,7 +163,7 @@ run (char *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init (_("Drawing Grid...")); gimp_progress_init (_("Drawing Grid..."));
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));

View File

@ -168,7 +168,7 @@ static void run( char *name,
if( status == STATUS_SUCCESS ){ if( status == STATUS_SUCCESS ){
if( gimp_drawable_color( drawable->id ) || if( gimp_drawable_is_rgb( drawable->id ) ||
gimp_drawable_is_gray( drawable->id ) ){ gimp_drawable_is_gray( drawable->id ) ){
gimp_tile_cache_ntiles( 2 * ( drawable->width / gimp_tile_width() + 1 ) ); gimp_tile_cache_ntiles( 2 * ( drawable->width / gimp_tile_width() + 1 ) );

View File

@ -262,7 +262,7 @@ run (char *name,
destdrawable = drawable = gimp_drawable_get (param[2].data.d_drawable); destdrawable = drawable = gimp_drawable_get (param[2].data.d_drawable);
imageID = param[1].data.d_int32; imageID = param[1].data.d_int32;
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) { if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id)) {
switch ( run_mode) { switch ( run_mode) {
case RUN_INTERACTIVE : case RUN_INTERACTIVE :
gimp_get_data("plug_in_iwarp",&iwarp_vals); gimp_get_data("plug_in_iwarp",&iwarp_vals);

View File

@ -105,7 +105,7 @@ run (char *name,
drawable = gimp_drawable_get (param[2].data.d_drawable); drawable = gimp_drawable_get (param[2].data.d_drawable);
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
laplace (drawable); laplace (drawable);

View File

@ -957,7 +957,7 @@ gint effect_image_constrain(gint32 image_id, gint32 drawable_id, gpointer data)
if (drawable_id == -1) if (drawable_id == -1)
return(TRUE); return(TRUE);
return(gimp_drawable_color(drawable_id)); return(gimp_drawable_is_rgb(drawable_id));
} }
void effect_image_callback(gint32 id, gpointer data) void effect_image_callback(gint32 id, gpointer data)
@ -1363,7 +1363,7 @@ static void run(gchar *name,
/* Make sure that the drawable is RGBA or RGB color */ /* Make sure that the drawable is RGBA or RGB color */
/* ================================================ */ /* ================================================ */
if (gimp_drawable_color(drawable->id)) if (gimp_drawable_is_rgb(drawable->id))
{ {
/* Set the tile cache size */ /* Set the tile cache size */
/* ======================= */ /* ======================= */

View File

@ -213,7 +213,7 @@ run (char *name,
/* Make sure the drawable is RGB color */ /* Make sure the drawable is RGB color */
drawable = gimp_drawable_get (param[2].data.d_drawable); drawable = gimp_drawable_get (param[2].data.d_drawable);
if (!gimp_drawable_color (drawable->id)) if (!gimp_drawable_is_rgb (drawable->id))
{ {
gimp_message ("color_adjust/color_map: cannot operate on grey/indexed\ gimp_message ("color_adjust/color_map: cannot operate on grey/indexed\
images"); images");

View File

@ -167,7 +167,7 @@ run (char *name,
hold_max = VALS.max_p; hold_max = VALS.max_p;
hold_min = VALS.max_p ? 0 : 1; hold_min = VALS.max_p ? 0 : 1;
/* Since a channel might be selected, we must check wheter RGB or not. */ /* Since a channel might be selected, we must check wheter RGB or not. */
if (!gimp_drawable_color(drawable_id)) if (!gimp_drawable_is_rgb(drawable_id))
{ {
ERROR_DIALOG (1, "RGB drawable is not selected."); ERROR_DIALOG (1, "RGB drawable is not selected.");
return; return;

View File

@ -260,7 +260,7 @@ run(char *name,
/* Blur the image */ /* Blur the image */
if ((status == STATUS_SUCCESS) && if ((status == STATUS_SUCCESS) &&
(gimp_drawable_color(drawable->id) || (gimp_drawable_is_rgb(drawable->id) ||
gimp_drawable_is_gray(drawable->id))) { gimp_drawable_is_gray(drawable->id))) {
/* Set the tile cache size */ /* Set the tile cache size */

View File

@ -411,7 +411,7 @@ run (char *name,
/* Create the mosaic */ /* Create the mosaic */
if ((status == STATUS_SUCCESS) && if ((status == STATUS_SUCCESS) &&
(gimp_drawable_color (active_drawable->id) || gimp_drawable_is_gray (active_drawable->id))) (gimp_drawable_is_rgb (active_drawable->id) || gimp_drawable_is_gray (active_drawable->id)))
{ {
/* set the tile cache size so that the gaussian blur works well */ /* set the tile cache size so that the gaussian blur works well */
gimp_tile_cache_ntiles (2 * (MAX (active_drawable->width, active_drawable->height) / gimp_tile_cache_ntiles (2 * (MAX (active_drawable->width, active_drawable->height) /

View File

@ -656,7 +656,7 @@ run (gchar *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || if (gimp_drawable_is_rgb (drawable->id) ||
gimp_drawable_is_gray (drawable->id)) gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init("Newsprintifing..."); gimp_progress_init("Newsprintifing...");

View File

@ -192,7 +192,7 @@ run (char *name,
} }
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("Adding Noise..."); gimp_progress_init ("Adding Noise...");
gimp_tile_cache_ntiles (TILE_CACHE_SIZE); gimp_tile_cache_ntiles (TILE_CACHE_SIZE);

View File

@ -110,7 +110,7 @@ run (char *name,
image_ID = param[1].data.d_image; image_ID = param[1].data.d_image;
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init (_("Normalizing...")); gimp_progress_init (_("Normalizing..."));
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));

View File

@ -319,7 +319,7 @@ run (gchar *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("Rendering..."); gimp_progress_init ("Rendering...");
gimp_tile_cache_ntiles (TILE_CACHE_SIZE); gimp_tile_cache_ntiles (TILE_CACHE_SIZE);

View File

@ -193,12 +193,12 @@ run (char *name,
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if ((status == STATUS_SUCCESS) && if ((status == STATUS_SUCCESS) &&
(gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id))) (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id)))
{ {
gimp_progress_init (_("Oil Painting...")); gimp_progress_init (_("Oil Painting..."));
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
if (gimp_drawable_color (drawable->id) && (ovals.mode == MODE_INTEN)) if (gimp_drawable_is_rgb (drawable->id) && (ovals.mode == MODE_INTEN))
oilify_intensity (drawable); oilify_intensity (drawable);
else else
oilify_rgb (drawable); oilify_rgb (drawable);

View File

@ -1198,7 +1198,7 @@ plugin_run ( gchar * name,
p.selection.width = p.selection.x1 - p.selection.x0; p.selection.width = p.selection.x1 - p.selection.x0;
p.selection.height = p.selection.y1 - p.selection.y0; p.selection.height = p.selection.y1 - p.selection.y0;
if( gimp_drawable_color( p.drawable->id ) ){ if( gimp_drawable_is_rgb( p.drawable->id ) ){
switch( p.run_mode ){ switch( p.run_mode ){
case RUN_INTERACTIVE: { case RUN_INTERACTIVE: {
params_load_from_gimp(); params_load_from_gimp();

View File

@ -247,7 +247,7 @@ run (gchar *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("Pixelizing..."); gimp_progress_init ("Pixelizing...");

View File

@ -224,7 +224,7 @@ run (gchar *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("Plasma..."); gimp_progress_init ("Plasma...");
gimp_tile_cache_ntiles (TILE_CACHE_SIZE); gimp_tile_cache_ntiles (TILE_CACHE_SIZE);

View File

@ -342,7 +342,7 @@ run(char *name,
/* Distort the image */ /* Distort the image */
if ((status == STATUS_SUCCESS) && if ((status == STATUS_SUCCESS) &&
(gimp_drawable_color(drawable->id) || (gimp_drawable_is_rgb(drawable->id) ||
gimp_drawable_is_gray(drawable->id))) { gimp_drawable_is_gray(drawable->id))) {
/* Set the tile cache size */ /* Set the tile cache size */

View File

@ -307,7 +307,7 @@ run(char *name, int nparams, GParam *param, int *nreturn_vals,
/* /*
* Make sure the drawable type is appropriate. * Make sure the drawable type is appropriate.
*/ */
if (gimp_drawable_color(drawable->id) || if (gimp_drawable_is_rgb(drawable->id) ||
gimp_drawable_is_gray(drawable->id) || gimp_drawable_is_gray(drawable->id) ||
gimp_drawable_is_indexed(drawable->id)) { gimp_drawable_is_indexed(drawable->id)) {

View File

@ -233,7 +233,7 @@ run (gchar *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("Rippling..."); gimp_progress_init ("Rippling...");

View File

@ -168,7 +168,7 @@ static void run(char *name, int n_params, GParam * param, int *nreturn_vals,
image_id = param[1].data.d_image; image_id = param[1].data.d_image;
/* Make sure that the drawable is gray or RGB or indexed */ /* Make sure that the drawable is gray or RGB or indexed */
if (gimp_drawable_color(drawable->id) || gimp_drawable_is_gray(drawable->id) || gimp_drawable_is_indexed(drawable->id)) { if (gimp_drawable_is_rgb(drawable->id) || gimp_drawable_is_gray(drawable->id) || gimp_drawable_is_indexed(drawable->id)) {
gimp_tile_cache_ntiles(7 + 2*( gimp_tile_cache_ntiles(7 + 2*(

View File

@ -359,7 +359,7 @@ run (gchar *name,
p_clear_tables(); p_clear_tables();
/* Make sure that the dst_drawable is gray or RGB color */ /* Make sure that the dst_drawable is gray or RGB color */
if (gimp_drawable_color (dst_drawable->id) || gimp_drawable_is_gray (dst_drawable->id)) if (gimp_drawable_is_rgb (dst_drawable->id) || gimp_drawable_is_gray (dst_drawable->id))
{ {
gimp_tile_cache_ntiles (TILE_CACHE_SIZE); gimp_tile_cache_ntiles (TILE_CACHE_SIZE);

View File

@ -204,7 +204,7 @@ run (char *name,
{ {
case RUN_INTERACTIVE: case RUN_INTERACTIVE:
gimp_get_data (PLUG_IN_NAME, &VALS); gimp_get_data (PLUG_IN_NAME, &VALS);
if (!gimp_drawable_color(drawable_id)) if (!gimp_drawable_is_rgb(drawable_id))
{ {
scatter_hsv_error_dialog (1, (guchar *)"RGB drawable is not selected."); scatter_hsv_error_dialog (1, (guchar *)"RGB drawable is not selected.");
return; return;

View File

@ -198,7 +198,7 @@ static void run (
drawable = gimp_drawable_get (param[2].data.d_drawable); drawable = gimp_drawable_get (param[2].data.d_drawable);
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || if (gimp_drawable_is_rgb (drawable->id) ||
gimp_drawable_is_gray (drawable->id)) { gimp_drawable_is_gray (drawable->id)) {
gimp_progress_init ("Selective Gaussian Blur"); gimp_progress_init ("Selective Gaussian Blur");

View File

@ -119,7 +119,7 @@ run (char *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is indexed or RGB color */ /* Make sure that the drawable is indexed or RGB color */
if (gimp_drawable_color (drawable->id)) if (gimp_drawable_is_rgb (drawable->id))
{ {
gimp_progress_init ("Semi-Flatten..."); gimp_progress_init ("Semi-Flatten...");
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width ()

View File

@ -44,6 +44,9 @@
* Revision History: * Revision History:
* *
* $Log$ * $Log$
* Revision 1.12 1999/10/24 20:48:59 pcg
* api change #2, fix #1
*
* Revision 1.11 1999/10/17 00:07:40 pcg * Revision 1.11 1999/10/17 00:07:40 pcg
* API PATCH #2 or so * API PATCH #2 or so
* *
@ -355,7 +358,7 @@ run(char *name, /* I - Name of filter program. */
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
if ((gimp_drawable_color(drawable->id) || if ((gimp_drawable_is_rgb(drawable->id) ||
gimp_drawable_is_gray(drawable->id))) gimp_drawable_is_gray(drawable->id)))
{ {
/* /*

View File

@ -198,7 +198,7 @@ run (gchar *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("Shifting..."); gimp_progress_init ("Shifting...");

View File

@ -154,7 +154,7 @@ run (char *name,
if (status == STATUS_SUCCESS) { if (status == STATUS_SUCCESS) {
drawable = gimp_drawable_get(param[2].data.d_drawable); drawable = gimp_drawable_get(param[2].data.d_drawable);
if (gimp_drawable_color(drawable->id)) { if (gimp_drawable_is_rgb(drawable->id)) {
gimp_progress_init ("Deriving smooth palette..."); gimp_progress_init ("Deriving smooth palette...");
gimp_tile_cache_ntiles (2 * (drawable->width + 1) / gimp_tile_width ()); gimp_tile_cache_ntiles (2 * (drawable->width + 1) / gimp_tile_width ());
values[1].data.d_image = doit(drawable, &values[2].data.d_layer); values[1].data.d_image = doit(drawable, &values[2].data.d_layer);

View File

@ -253,7 +253,7 @@ run (char *name, int nparams, GParam *param, int *nreturn_vals,
} }
/* Create texture */ /* Create texture */
if ((status == STATUS_SUCCESS) && (gimp_drawable_color (drawable->id) || if ((status == STATUS_SUCCESS) && (gimp_drawable_is_rgb (drawable->id) ||
gimp_drawable_is_gray (drawable->id))) gimp_drawable_is_gray (drawable->id)))
{ {
/* Set the tile cache size */ /* Set the tile cache size */

View File

@ -201,7 +201,7 @@ run (gchar *name,
drawable = gimp_drawable_get (param[2].data.d_drawable); drawable = gimp_drawable_get (param[2].data.d_drawable);
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
sobel (drawable, bvals.horizontal, bvals.vertical, bvals.keep_sign); sobel (drawable, bvals.horizontal, bvals.vertical, bvals.keep_sign);

View File

@ -306,7 +306,7 @@ run (char *name,
drawable = gimp_drawable_get (param[2].data.d_drawable); drawable = gimp_drawable_get (param[2].data.d_drawable);
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("Sparkling..."); gimp_progress_init ("Sparkling...");
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));

View File

@ -191,7 +191,7 @@ run (gchar *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("Spreading..."); gimp_progress_init ("Spreading...");

View File

@ -236,7 +236,7 @@ run (char *name,
ERROR_DIALOG (1, "The layer preserves transparency."); ERROR_DIALOG (1, "The layer preserves transparency.");
return; return;
} }
if (!gimp_drawable_color (drawable_id) && if (!gimp_drawable_is_rgb (drawable_id) &&
!gimp_drawable_is_gray (drawable_id)) !gimp_drawable_is_gray (drawable_id))
{ {
ERROR_DIALOG (1, "RGBA/GRAYA drawable is not selected."); ERROR_DIALOG (1, "RGBA/GRAYA drawable is not selected.");
@ -284,7 +284,7 @@ MAIN_FUNCTION (gint32 drawable_id)
drawable = gimp_drawable_get (drawable_id); drawable = gimp_drawable_get (drawable_id);
if (! gimp_drawable_has_alpha (drawable_id)) return STATUS_EXECUTION_ERROR; if (! gimp_drawable_has_alpha (drawable_id)) return STATUS_EXECUTION_ERROR;
if (gimp_drawable_color(drawable_id)) if (gimp_drawable_is_rgb(drawable_id))
gap = 3; gap = 3;
else else
gap = 1; gap = 1;

View File

@ -298,7 +298,7 @@ run (gchar *name,
break; break;
} }
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
/* Set the tile cache size */ /* Set the tile cache size */

View File

@ -84,7 +84,7 @@ run (char *name,
drawable = gimp_drawable_get (param[2].data.d_drawable); drawable = gimp_drawable_get (param[2].data.d_drawable);
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
tile(drawable); tile(drawable);

View File

@ -1899,7 +1899,7 @@ run (char *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id)) if (gimp_drawable_is_rgb (drawable->id))
{ {
gimp_progress_init ("Video/RGB..."); gimp_progress_init ("Video/RGB...");
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width ()

View File

@ -254,7 +254,7 @@ run (char *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is indexed or RGB color */ /* Make sure that the drawable is indexed or RGB color */
if (gimp_drawable_color (drawable->id)) if (gimp_drawable_is_rgb (drawable->id))
{ {
if (run_mode != RUN_NONINTERACTIVE) if (run_mode != RUN_NONINTERACTIVE)
gimp_progress_init ("Value Invert..."); gimp_progress_init ("Value Invert...");

View File

@ -330,7 +330,7 @@ run(char *name,
/* Distort the image */ /* Distort the image */
if ((status == STATUS_SUCCESS) && if ((status == STATUS_SUCCESS) &&
(gimp_drawable_color(drawable->id) || (gimp_drawable_is_rgb(drawable->id) ||
gimp_drawable_is_gray(drawable->id))) { gimp_drawable_is_gray(drawable->id))) {
/* Set the tile cache size */ /* Set the tile cache size */

View File

@ -101,7 +101,7 @@ static void run(char *name, int n_params, GParam * param, int *nreturn_vals,
image_id = param[1].data.d_image; image_id = param[1].data.d_image;
/* Make sure that the drawable is gray or RGB or indexed */ /* Make sure that the drawable is gray or RGB or indexed */
if (gimp_drawable_color(drawable->id) || gimp_drawable_is_gray(drawable->id) || gimp_drawable_is_indexed(drawable->id)) { if (gimp_drawable_is_rgb(drawable->id) || gimp_drawable_is_gray(drawable->id) || gimp_drawable_is_indexed(drawable->id)) {
gimp_progress_init(_("ZealousCropping(tm)...")); gimp_progress_init(_("ZealousCropping(tm)..."));
gimp_tile_cache_ntiles(1 + 2*( gimp_tile_cache_ntiles(1 + 2*(

View File

@ -198,7 +198,7 @@ static void run(char *name, int n_params, GParam * param, int *nreturn_vals,
if (status == STATUS_SUCCESS) { if (status == STATUS_SUCCESS) {
if (gimp_drawable_color(drawable->id)) { if (gimp_drawable_is_rgb(drawable->id)) {
gimp_progress_init("Drawing Flame..."); gimp_progress_init("Drawing Flame...");
gimp_tile_cache_ntiles(2 * (drawable->width / gimp_tile_width() + 1)); gimp_tile_cache_ntiles(2 * (drawable->width / gimp_tile_width() + 1));

View File

@ -97,7 +97,7 @@ run (char *name,
status = STATUS_EXECUTION_ERROR; status = STATUS_EXECUTION_ERROR;
} }
else if (gimp_drawable_color (drawable->id) && fp_dialog()) else if (gimp_drawable_is_rgb (drawable->id) && fp_dialog())
{ {
gimp_progress_init ("Applying the Filter Pack..."); gimp_progress_init ("Applying the Filter Pack...");
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));

View File

@ -713,7 +713,7 @@ run (gchar *name,
break; break;
} }
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
/* Set the tile cache size */ /* Set the tile cache size */

View File

@ -756,7 +756,7 @@ plugin_run (gchar *name,
*/ */
drawable = gimp_drawable_get (param[2].data.d_drawable); drawable = gimp_drawable_get (param[2].data.d_drawable);
dinfo.is_color = gimp_drawable_color (drawable->id); dinfo.is_color = gimp_drawable_is_rgb (drawable->id);
dinfo.has_alpha = gimp_drawable_has_alpha (drawable->id); dinfo.has_alpha = gimp_drawable_has_alpha (drawable->id);
gimp_drawable_mask_bounds (drawable->id, &dinfo.x1, &dinfo.y1, gimp_drawable_mask_bounds (drawable->id, &dinfo.x1, &dinfo.y1,
&dinfo.x2, &dinfo.y2); &dinfo.x2, &dinfo.y2);
@ -831,7 +831,7 @@ plugin_run (gchar *name,
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("Gradient Flare..."); gimp_progress_init ("Gradient Flare...");
plugin_do (); plugin_do ();

View File

@ -208,7 +208,7 @@ void savebrush(GtkWidget *wg, gpointer data)
gint validdrawable(gint32 imageid, gint32 drawableid, gpointer data) gint validdrawable(gint32 imageid, gint32 drawableid, gpointer data)
{ {
if(drawableid == -1) return TRUE; if(drawableid == -1) return TRUE;
return (gimp_drawable_color(drawableid) || gimp_drawable_is_gray(drawableid)); return (gimp_drawable_is_rgb(drawableid) || gimp_drawable_is_gray(drawableid));
} }
void reloadbrush(char *fn, struct ppm *p) void reloadbrush(char *fn, struct ppm *p)

View File

@ -168,7 +168,7 @@ run(char *name, int nparams, GParam *param, int *nreturn_vals, GParam **return_v
status = STATUS_EXECUTION_ERROR; status = STATUS_EXECUTION_ERROR;
break; break;
} }
if((status == STATUS_SUCCESS) && (gimp_drawable_color(drawable->id) || gimp_drawable_is_gray(drawable->id))) { if((status == STATUS_SUCCESS) && (gimp_drawable_is_rgb(drawable->id) || gimp_drawable_is_gray(drawable->id))) {
gimpressionist_main(); gimpressionist_main();
gimp_displays_flush (); gimp_displays_flush ();

View File

@ -437,7 +437,7 @@ run (char *name,
/* Render the fractal */ /* Render the fractal */
if ((status == STATUS_SUCCESS) && if ((status == STATUS_SUCCESS) &&
(gimp_drawable_color (active_drawable->id) || gimp_drawable_is_gray (active_drawable->id))) (gimp_drawable_is_rgb (active_drawable->id) || gimp_drawable_is_gray (active_drawable->id)))
{ {
/* set the tile cache size so that the operation works well */ /* set the tile cache size so that the operation works well */
gimp_tile_cache_ntiles (2 * (MAX (active_drawable->width, active_drawable->height) / gimp_tile_cache_ntiles (2 * (MAX (active_drawable->width, active_drawable->height) /

View File

@ -155,7 +155,7 @@ run(char *name, int n_params, GParam *param, int *nreturn_vals,
_image_width = gimp_image_width(param[1].data.d_image); _image_width = gimp_image_width(param[1].data.d_image);
_image_height = gimp_image_height(param[1].data.d_image); _image_height = gimp_image_height(param[1].data.d_image);
_map_info.color = gimp_drawable_color(drawable->id); _map_info.color = gimp_drawable_is_rgb(drawable->id);
run_mode = (GRunModeType) param[0].data.d_int32; run_mode = (GRunModeType) param[0].data.d_int32;

View File

@ -228,7 +228,7 @@ run (gchar *name,
} }
/* color, gray, or indexed... hmm, miss anything? ;) */ /* color, gray, or indexed... hmm, miss anything? ;) */
if (gimp_drawable_color (drawable->id) || gimp_drawable_is_gray (drawable->id) || gimp_drawable_is_indexed (drawable->id)) { if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id) || gimp_drawable_is_indexed (drawable->id)) {
maze (drawable); maze (drawable);

View File

@ -411,7 +411,7 @@ run (char *name,
/* Create the mosaic */ /* Create the mosaic */
if ((status == STATUS_SUCCESS) && if ((status == STATUS_SUCCESS) &&
(gimp_drawable_color (active_drawable->id) || gimp_drawable_is_gray (active_drawable->id))) (gimp_drawable_is_rgb (active_drawable->id) || gimp_drawable_is_gray (active_drawable->id)))
{ {
/* set the tile cache size so that the gaussian blur works well */ /* set the tile cache size so that the gaussian blur works well */
gimp_tile_cache_ntiles (2 * (MAX (active_drawable->width, active_drawable->height) / gimp_tile_cache_ntiles (2 * (MAX (active_drawable->width, active_drawable->height) /

View File

@ -333,7 +333,7 @@ static void run (gchar * name,
drawable = gimp_drawable_get (param[2].data.d_drawable); drawable = gimp_drawable_get (param[2].data.d_drawable);
image_id = param[1].data.d_image; image_id = param[1].data.d_image;
if ((gimp_drawable_color (drawable->id) if ((gimp_drawable_is_rgb (drawable->id)
|| gimp_drawable_is_gray (drawable->id)) || gimp_drawable_is_gray (drawable->id))
&& gimp_drawable_has_alpha (drawable->id)) { && gimp_drawable_has_alpha (drawable->id)) {
@ -798,7 +798,7 @@ static void do_curl_effect (void) {
gpointer pr; gpointer pr;
guchar *grad_samples = NULL; guchar *grad_samples = NULL;
color_image = gimp_drawable_color (drawable->id); color_image = gimp_drawable_is_rgb (drawable->id);
curl_layer = curl_layer =
gimp_drawable_get (gimp_layer_new (image_id, gimp_drawable_get (gimp_layer_new (image_id,
"Curl layer", "Curl layer",
@ -1023,7 +1023,7 @@ static guchar *get_samples (GDrawable *drawable) {
f_samples = gimp_gradients_sample_uniform (NGRADSAMPLES); f_samples = gimp_gradients_sample_uniform (NGRADSAMPLES);
bpp = gimp_drawable_bpp (drawable->id); bpp = gimp_drawable_bpp (drawable->id);
color = gimp_drawable_color (drawable->id); color = gimp_drawable_is_rgb (drawable->id);
has_alpha = gimp_drawable_has_alpha (drawable->id); has_alpha = gimp_drawable_has_alpha (drawable->id);
alpha = (has_alpha ? bpp - 1 : bpp); alpha = (has_alpha ? bpp - 1 : bpp);

View File

@ -2395,7 +2395,7 @@ lay_getattr(self, name)
return (PyObject *)newimgobject(id); return (PyObject *)newimgobject(id);
} }
if (!strcmp(name, "is_color") || !strcmp(name, "is_colour")) if (!strcmp(name, "is_color") || !strcmp(name, "is_colour"))
return PyInt_FromLong(gimp_drawable_color(self->ID)); return PyInt_FromLong(gimp_drawable_is_rgb(self->ID));
if (!strcmp(name, "is_floating_selection")) if (!strcmp(name, "is_floating_selection"))
return PyInt_FromLong( return PyInt_FromLong(
gimp_layer_is_floating_selection(self->ID)); gimp_layer_is_floating_selection(self->ID));
@ -2694,7 +2694,7 @@ chn_getattr(self, name)
return (PyObject *)newimgobject(id); return (PyObject *)newimgobject(id);
} }
if (!strcmp(name, "is_color") || !strcmp(name, "is_colour")) if (!strcmp(name, "is_color") || !strcmp(name, "is_colour"))
return PyInt_FromLong(gimp_drawable_color(self->ID)); return PyInt_FromLong(gimp_drawable_is_rgb(self->ID));
if (!strcmp(name, "is_gray") || !strcmp(name, "is_grey")) if (!strcmp(name, "is_gray") || !strcmp(name, "is_grey"))
return PyInt_FromLong(gimp_drawable_is_gray(self->ID)); return PyInt_FromLong(gimp_drawable_is_gray(self->ID));
if (!strcmp(name, "is_indexed")) if (!strcmp(name, "is_indexed"))

View File

@ -260,7 +260,7 @@ void run(char *name, int nparams, GParam *param, int *nreturn_vals, GParam **ret
{ {
/* call dialog and rotate the colormap */ /* call dialog and rotate the colormap */
if (gimp_drawable_color(Current.drawable->id) && rcm_dialog()) if (gimp_drawable_is_rgb(Current.drawable->id) && rcm_dialog())
{ {
gimp_progress_init(_("Rotating the colormap...")); gimp_progress_init(_("Rotating the colormap..."));

View File

@ -142,7 +142,7 @@
(plug-in-gauss-rle 1 img disp-map blur TRUE TRUE) (plug-in-gauss-rle 1 img disp-map blur TRUE TRUE)
(gimp-levels disp-map 0 0 255 1.0 96 255) (gimp-levels disp-map 0 0 255 1.0 96 255)
(if (= (car (gimp-drawable-color bg-layer)) 1) (if (= (car (gimp-drawable-is-rgb bg-layer)) 1)
(gimp-convert-rgb img)) (gimp-convert-rgb img))

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