Use gdouble in a [0.0..1.0] range for opacity values in the whole core's

2002-03-03  Michael Natterer  <mitch@gimp.org>

	Use gdouble in a [0.0..1.0] range for opacity values in the whole
	core's API. Convert them using (opacity * 255.999) when passing
	them to base/ and paint-funcs/

	Affected functions:

	* app/core/gimpchannel.[ch]: gimp_channel_[set|get]_opacity()
	* app/core/gimpimage.[ch]: gimp_image_[apply|replace]_image()
	* app/paint/gimppaintcore.[ch]: gimp_paint_core_[paste|replace]_canvas()

	* app/core/core-types.h: added defines GIMP_OPACITY_TRANSPARENT
	and GIMP_OPACITY_OPAQUE, just like the ones from
	paint-funcs/paint-funcs-types.h

	* app/gimprc.c
	* app/image_map.c
	* app/core/gimpcontext.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable.c
	* app/core/gimpedit.c
	* app/core/gimplayer.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimppalette.c
	* app/paint/gimpairbrush.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimpsmudge.c
	* app/tools/gimpinktool.c
	* app/widgets/gimpcolorpanel.c
	* app/widgets/gimplayerlistitem.c
	* app/widgets/gimppreview.c
	* app/xcf/xcf-load.c: changed accordingly, use the new constants.
This commit is contained in:
Michael Natterer 2002-03-03 17:38:12 +00:00 committed by Michael Natterer
parent 8a48904a4f
commit ce643d2722
46 changed files with 226 additions and 164 deletions

View File

@ -1,3 +1,42 @@
2002-03-03 Michael Natterer <mitch@gimp.org>
Use gdouble in a [0.0..1.0] range for opacity values in the whole
core's API. Convert them using (opacity * 255.999) when passing
them to base/ and paint-funcs/
Affected functions:
* app/core/gimpchannel.[ch]: gimp_channel_[set|get]_opacity()
* app/core/gimpimage.[ch]: gimp_image_[apply|replace]_image()
* app/paint/gimppaintcore.[ch]: gimp_paint_core_[paste|replace]_canvas()
* app/core/core-types.h: added defines GIMP_OPACITY_TRANSPARENT
and GIMP_OPACITY_OPAQUE, just like the ones from
paint-funcs/paint-funcs-types.h
* app/gimprc.c
* app/image_map.c
* app/core/gimpcontext.c
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable.c
* app/core/gimpedit.c
* app/core/gimplayer.c
* app/core/gimplayer-floating-sel.c
* app/core/gimppalette.c
* app/paint/gimpairbrush.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimperaser.c
* app/paint/gimppaintbrush.c
* app/paint/gimpsmudge.c
* app/tools/gimpinktool.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimplayerlistitem.c
* app/widgets/gimppreview.c
* app/xcf/xcf-load.c: changed accordingly, use the new constants.
2002-03-03 Sven Neumann <sven@gimp.org>
* plug-ins/webbrowser/Makefile.am

View File

@ -28,6 +28,12 @@
#include "core/core-enums.h"
/* defines */
#define GIMP_OPACITY_TRANSPARENT 0.0
#define GIMP_OPACITY_OPAQUE 1.0
/* enums */
typedef enum /*< chop=ADD_ >*/

View File

@ -302,8 +302,9 @@ gimp_edit_clear (GimpImage *gimage,
color_region (&bufPR, col);
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), FALSE);
gimp_image_apply_image (gimage, drawable, &bufPR, TRUE, OPAQUE_OPACITY,
GIMP_ERASE_MODE, NULL, x1, y1);
gimp_image_apply_image (gimage, drawable, &bufPR, TRUE,
GIMP_OPACITY_OPAQUE, GIMP_ERASE_MODE,
NULL, x1, y1);
/* update the image */
gimp_drawable_update (drawable,
@ -376,8 +377,9 @@ gimp_edit_fill (GimpImage *gimage,
color_region (&bufPR, col);
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), FALSE);
gimp_image_apply_image (gimage, drawable, &bufPR, TRUE, OPAQUE_OPACITY,
GIMP_NORMAL_MODE, NULL, x1, y1);
gimp_image_apply_image (gimage, drawable, &bufPR, TRUE,
GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE,
NULL, x1, y1);
/* update the image */
gimp_drawable_update (drawable,

View File

@ -108,7 +108,7 @@ gimp_channel_class_init (GimpChannelClass *klass)
static void
gimp_channel_init (GimpChannel *channel)
{
gimp_rgba_set (&channel->color, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&channel->color, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
channel->show_masked = FALSE;
@ -258,23 +258,23 @@ gimp_channel_get_color (const GimpChannel *channel)
return &channel->color;
}
gint
gdouble
gimp_channel_get_opacity (const GimpChannel *channel)
{
g_return_val_if_fail (GIMP_IS_CHANNEL (channel), 0);
return (gint) (channel->color.a * 100.999);
return channel->color.a;
}
void
gimp_channel_set_opacity (GimpChannel *channel,
gint opacity)
gdouble opacity)
{
g_return_if_fail (GIMP_IS_CHANNEL (channel));
opacity = CLAMP (opacity, 0, 100);
opacity = CLAMP (opacity, GIMP_OPACITY_TRANSPARENT, GIMP_OPACITY_OPAQUE);
channel->color.a = opacity / 100.0;
channel->color.a = opacity;
}
void

View File

@ -76,9 +76,9 @@ GimpChannel * gimp_channel_copy (const GimpChannel *channel,
GType new_type,
gboolean dummy);
gint gimp_channel_get_opacity (const GimpChannel *channel);
gdouble gimp_channel_get_opacity (const GimpChannel *channel);
void gimp_channel_set_opacity (GimpChannel *channel,
gint opacity);
gdouble opacity);
const GimpRGB * gimp_channel_get_color (const GimpChannel *channel);
void gimp_channel_set_color (GimpChannel *channel,

View File

@ -108,7 +108,7 @@ gimp_channel_class_init (GimpChannelClass *klass)
static void
gimp_channel_init (GimpChannel *channel)
{
gimp_rgba_set (&channel->color, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&channel->color, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
channel->show_masked = FALSE;
@ -258,23 +258,23 @@ gimp_channel_get_color (const GimpChannel *channel)
return &channel->color;
}
gint
gdouble
gimp_channel_get_opacity (const GimpChannel *channel)
{
g_return_val_if_fail (GIMP_IS_CHANNEL (channel), 0);
return (gint) (channel->color.a * 100.999);
return channel->color.a;
}
void
gimp_channel_set_opacity (GimpChannel *channel,
gint opacity)
gdouble opacity)
{
g_return_if_fail (GIMP_IS_CHANNEL (channel));
opacity = CLAMP (opacity, 0, 100);
opacity = CLAMP (opacity, GIMP_OPACITY_TRANSPARENT, GIMP_OPACITY_OPAQUE);
channel->color.a = opacity / 100.0;
channel->color.a = opacity;
}
void

View File

@ -76,9 +76,9 @@ GimpChannel * gimp_channel_copy (const GimpChannel *channel,
GType new_type,
gboolean dummy);
gint gimp_channel_get_opacity (const GimpChannel *channel);
gdouble gimp_channel_get_opacity (const GimpChannel *channel);
void gimp_channel_set_opacity (GimpChannel *channel,
gint opacity);
gdouble opacity);
const GimpRGB * gimp_channel_get_color (const GimpChannel *channel);
void gimp_channel_set_color (GimpChannel *channel,

View File

@ -653,10 +653,10 @@ gimp_context_init (GimpContext *context)
context->tool_info = NULL;
context->tool_name = NULL;
gimp_rgba_set (&context->foreground, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&context->background, 1.0, 1.0, 1.0, 1.0);
gimp_rgba_set (&context->foreground, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
gimp_rgba_set (&context->background, 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE);
context->opacity = 1.0;
context->opacity = GIMP_OPACITY_OPAQUE;
context->paint_mode = GIMP_NORMAL_MODE;
context->brush = NULL;
@ -1707,8 +1707,8 @@ gimp_context_set_default_colors (GimpContext *context)
context_find_defined (context, GIMP_CONTEXT_FOREGROUND_MASK);
context_find_defined (bg_context, GIMP_CONTEXT_BACKGROUND_MASK);
gimp_rgba_set (&fg, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&bg, 1.0, 1.0, 1.0, 1.0);
gimp_rgba_set (&fg, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
gimp_rgba_set (&bg, 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE);
gimp_context_real_set_foreground (context, &fg);
gimp_context_real_set_background (bg_context, &bg);
@ -1740,7 +1740,7 @@ gimp_context_swap_colors (GimpContext *context)
gdouble
gimp_context_get_opacity (GimpContext *context)
{
g_return_val_if_fail (GIMP_IS_CONTEXT (context), 1.0);
g_return_val_if_fail (GIMP_IS_CONTEXT (context), GIMP_OPACITY_OPAQUE);
return context->opacity;
}

View File

@ -229,7 +229,7 @@ gimp_drawable_blend (GimpDrawable *drawable,
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), FALSE);
gimp_image_apply_image (gimage, drawable, &bufPR, TRUE,
opacity * 255, paint_mode,
opacity, paint_mode,
NULL, x1, y1);
/* update the image */

View File

@ -299,8 +299,8 @@ gimp_drawable_bucket_fill_full (GimpDrawable *drawable,
/* Apply it to the image */
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), FALSE);
gimp_image_apply_image (gimage, drawable, &bufPR, TRUE,
opacity * 255,
paint_mode, NULL, x1, y1);
opacity, paint_mode,
NULL, x1, y1);
tile_manager_destroy (buf_tiles);
/* update the image */

View File

@ -418,8 +418,9 @@ gimp_drawable_merge_shadow (GimpDrawable *drawable,
gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
pixel_region_init (&shadowPR, gimage->shadow, x1, y1,
(x2 - x1), (y2 - y1), FALSE);
gimp_image_apply_image (gimage, drawable, &shadowPR, undo, OPAQUE_OPACITY,
GIMP_REPLACE_MODE, NULL, x1, y1);
gimp_image_apply_image (gimage, drawable, &shadowPR, undo,
GIMP_OPACITY_OPAQUE, GIMP_REPLACE_MODE,
NULL, x1, y1);
}
void
@ -503,7 +504,7 @@ gimp_drawable_fill_by_type (GimpDrawable *drawable,
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
color.a = 1.0;
color.a = GIMP_OPACITY_OPAQUE;
switch (fill_type)
{
@ -520,7 +521,7 @@ gimp_drawable_fill_by_type (GimpDrawable *drawable,
break;
case TRANSPARENT_FILL:
gimp_rgba_set (&color, 0.0, 0.0, 0.0, 0.0);
gimp_rgba_set (&color, 0.0, 0.0, 0.0, GIMP_OPACITY_TRANSPARENT);
break;
case NO_FILL:

View File

@ -302,8 +302,9 @@ gimp_edit_clear (GimpImage *gimage,
color_region (&bufPR, col);
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), FALSE);
gimp_image_apply_image (gimage, drawable, &bufPR, TRUE, OPAQUE_OPACITY,
GIMP_ERASE_MODE, NULL, x1, y1);
gimp_image_apply_image (gimage, drawable, &bufPR, TRUE,
GIMP_OPACITY_OPAQUE, GIMP_ERASE_MODE,
NULL, x1, y1);
/* update the image */
gimp_drawable_update (drawable,
@ -376,8 +377,9 @@ gimp_edit_fill (GimpImage *gimage,
color_region (&bufPR, col);
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), FALSE);
gimp_image_apply_image (gimage, drawable, &bufPR, TRUE, OPAQUE_OPACITY,
GIMP_NORMAL_MODE, NULL, x1, y1);
gimp_image_apply_image (gimage, drawable, &bufPR, TRUE,
GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE,
NULL, x1, y1);
/* update the image */
gimp_drawable_update (drawable,

View File

@ -1754,7 +1754,7 @@ gimp_image_apply_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean push_undo,
gint opacity,
gdouble opacity,
GimpLayerModeEffects mode,
/* alternative to using drawable tiles as src1: */
TileManager *src1_tiles,
@ -1847,12 +1847,14 @@ gimp_image_apply_image (GimpImage *gimage,
(x2 - x1), (y2 - y1),
FALSE);
combine_regions (&src1PR, src2PR, &destPR, &maskPR, NULL,
opacity, mode, active_components, operation);
opacity * 255.999, mode,
active_components, operation);
}
else
{
combine_regions (&src1PR, src2PR, &destPR, NULL, NULL,
opacity, mode, active_components, operation);
opacity * 255.999, mode,
active_components, operation);
}
}
@ -1867,7 +1869,7 @@ gimp_image_replace_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean push_undo,
gint opacity,
gdouble opacity,
PixelRegion *maskPR,
gint x,
gint y)
@ -1980,14 +1982,16 @@ gimp_image_replace_image (GimpImage *gimage,
tempPR.data = temp_data;
combine_regions_replace (&src1PR, src2PR, &destPR, &tempPR, NULL,
opacity, active_components, operation);
opacity * 255.999,
active_components, operation);
g_free (temp_data);
}
else
{
combine_regions_replace (&src1PR, src2PR, &destPR, maskPR, NULL,
opacity, active_components, operation);
opacity * 255.999,
active_components, operation);
}
}

View File

@ -338,7 +338,7 @@ void gimp_image_apply_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean undo,
gint opacity,
gdouble opacity,
GimpLayerModeEffects mode,
TileManager *src1_tiles,
gint x,
@ -347,7 +347,7 @@ void gimp_image_replace_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean undo,
gint opacity,
gdouble opacity,
PixelRegion *maskPR,
gint x,
gint y);

View File

@ -411,8 +411,9 @@ image_map_do (gpointer data)
/* apply the results */
pixel_region_init (&shadowPR, gimage->shadow, x, y, w, h, FALSE);
gimp_image_apply_image (gimage, image_map->drawable, &shadowPR,
FALSE, OPAQUE_OPACITY, GIMP_REPLACE_MODE, NULL,
gimp_image_apply_image (gimage, image_map->drawable, &shadowPR, FALSE,
GIMP_OPACITY_OPAQUE, GIMP_REPLACE_MODE,
NULL,
x, y);
/* display the results */

View File

@ -466,7 +466,7 @@ floating_sel_composite (GimpLayer *layer,
*/
gimp_image_apply_image (gimage, layer->fs.drawable, &fsPR,
undo,
layer->opacity,
(gdouble) layer->opacity / 255.0,
layer->mode,
NULL,
(x1 - offx), (y1 - offy));

View File

@ -604,7 +604,7 @@ gimp_layer_create_mask (const GimpLayer *layer,
GimpLayerMask *mask;
GimpImage *gimage;
gchar *mask_name;
GimpRGB black = { 0.0, 0.0, 0.0, 1.0 };
GimpRGB black = { 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE };
gimage = gimp_item_get_image (GIMP_ITEM (layer));
@ -1480,7 +1480,7 @@ gimp_layer_set_opacity (GimpLayer *layer,
gdouble
gimp_layer_get_opacity (const GimpLayer *layer)
{
g_return_val_if_fail (GIMP_IS_LAYER (layer), 1.0);
g_return_val_if_fail (GIMP_IS_LAYER (layer), GIMP_OPACITY_OPAQUE);
return (gdouble) layer->opacity / 255.0;
}

View File

@ -576,7 +576,7 @@ gimp_palette_delete_entry (GimpPalette *palette,
{
GimpRGB color;
gimp_rgba_set (&color, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&color, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
gimp_palette_add_entry (palette,
_("Black"),

View File

@ -576,7 +576,7 @@ gimp_palette_delete_entry (GimpPalette *palette,
{
GimpRGB color;
gimp_rgba_set (&color, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&color, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
gimp_palette_add_entry (palette,
_("Black"),

View File

@ -576,7 +576,7 @@ gimp_palette_delete_entry (GimpPalette *palette,
{
GimpRGB color;
gimp_rgba_set (&color, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&color, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
gimp_palette_add_entry (palette,
_("Black"),

View File

@ -439,7 +439,7 @@ color_notebook_new (const gchar *title,
GTK_SHRINK, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (button);
gimp_rgba_set (&bw, 1.0, 1.0, 1.0, 1.0);
gimp_rgba_set (&bw, 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE);
color_area = gimp_color_area_new (&bw,
GIMP_COLOR_AREA_FLAT,
GDK_BUTTON2_MASK);
@ -458,7 +458,7 @@ color_notebook_new (const gchar *title,
GTK_SHRINK, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (button);
gimp_rgba_set (&bw, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&bw, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
color_area = gimp_color_area_new (&bw,
GIMP_COLOR_AREA_FLAT,
GDK_BUTTON2_MASK);
@ -1321,7 +1321,7 @@ color_history_init (void)
gint i;
for (i = 0; i < COLOR_HISTORY_SIZE; i++)
gimp_rgba_set (&color_history[i], 1.0, 1.0, 1.0, 1.0);
gimp_rgba_set (&color_history[i], 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE);
color_history_initialized = TRUE;
}

View File

@ -1395,7 +1395,7 @@ parse_units (gpointer val1p,
static gint
parse_color (GimpRGB *color)
{
gdouble col[4] = { 0.0, 0.0, 0.0, 1.0 };
gdouble col[4] = { 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE };
gint token;
gint i;
gint n_channels;
@ -1727,8 +1727,8 @@ parse_device (gpointer val1p,
GdkDeviceKey *keys = NULL;
gchar *tool_name = NULL;
GimpRGB foreground = { 1.0, 1.0, 1.0, 1.0 };
GimpRGB background = { 0.0, 0.0, 0.0, 1.0 };
GimpRGB foreground = { 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE };
GimpRGB background = { 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE };
gchar *brush_name = NULL;
gchar *pattern_name = NULL;
gchar *gradient_name = NULL;
@ -1844,7 +1844,7 @@ parse_device (gpointer val1p,
if (parse_color (&foreground) == ERROR)
goto error;
foreground.a = 1.0;
foreground.a = GIMP_OPACITY_OPAQUE;
}
else if (!strcmp ("background", token_sym))
{
@ -1853,7 +1853,7 @@ parse_device (gpointer val1p,
if (parse_color (&background) == ERROR)
goto error;
background.a = 1.0;
background.a = GIMP_OPACITY_OPAQUE;
}
else if (!strcmp ("brush", token_sym))
{

View File

@ -439,7 +439,7 @@ color_notebook_new (const gchar *title,
GTK_SHRINK, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (button);
gimp_rgba_set (&bw, 1.0, 1.0, 1.0, 1.0);
gimp_rgba_set (&bw, 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE);
color_area = gimp_color_area_new (&bw,
GIMP_COLOR_AREA_FLAT,
GDK_BUTTON2_MASK);
@ -458,7 +458,7 @@ color_notebook_new (const gchar *title,
GTK_SHRINK, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (button);
gimp_rgba_set (&bw, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&bw, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
color_area = gimp_color_area_new (&bw,
GIMP_COLOR_AREA_FLAT,
GDK_BUTTON2_MASK);
@ -1321,7 +1321,7 @@ color_history_init (void)
gint i;
for (i = 0; i < COLOR_HISTORY_SIZE; i++)
gimp_rgba_set (&color_history[i], 1.0, 1.0, 1.0, 1.0);
gimp_rgba_set (&color_history[i], 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE);
color_history_initialized = TRUE;
}

View File

@ -466,52 +466,52 @@ gradient_editor_new (Gimp *gimp)
editor->saved_colors[0].r = 0.0; /* Black */
editor->saved_colors[0].g = 0.0;
editor->saved_colors[0].b = 0.0;
editor->saved_colors[0].a = 1.0;
editor->saved_colors[0].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[1].r = 0.5; /* 50% Gray */
editor->saved_colors[1].g = 0.5;
editor->saved_colors[1].b = 0.5;
editor->saved_colors[1].a = 1.0;
editor->saved_colors[1].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[2].r = 1.0; /* White */
editor->saved_colors[2].g = 1.0;
editor->saved_colors[2].b = 1.0;
editor->saved_colors[2].a = 1.0;
editor->saved_colors[2].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[3].r = 0.0; /* Clear */
editor->saved_colors[3].g = 0.0;
editor->saved_colors[3].b = 0.0;
editor->saved_colors[3].a = 0.0;
editor->saved_colors[3].a = GIMP_OPACITY_TRANSPARENT;
editor->saved_colors[4].r = 1.0; /* Red */
editor->saved_colors[4].g = 0.0;
editor->saved_colors[4].b = 0.0;
editor->saved_colors[4].a = 1.0;
editor->saved_colors[4].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[5].r = 1.0; /* Yellow */
editor->saved_colors[5].g = 1.0;
editor->saved_colors[5].b = 0.0;
editor->saved_colors[5].a = 1.0;
editor->saved_colors[5].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[6].r = 0.0; /* Green */
editor->saved_colors[6].g = 1.0;
editor->saved_colors[6].b = 0.0;
editor->saved_colors[6].a = 1.0;
editor->saved_colors[6].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[7].r = 0.0; /* Cyan */
editor->saved_colors[7].g = 1.0;
editor->saved_colors[7].b = 1.0;
editor->saved_colors[7].a = 1.0;
editor->saved_colors[7].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[8].r = 0.0; /* Blue */
editor->saved_colors[8].g = 0.0;
editor->saved_colors[8].b = 1.0;
editor->saved_colors[8].a = 1.0;
editor->saved_colors[8].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[9].r = 1.0; /* Magenta */
editor->saved_colors[9].g = 0.0;
editor->saved_colors[9].b = 1.0;
editor->saved_colors[9].a = 1.0;
editor->saved_colors[9].a = GIMP_OPACITY_OPAQUE;
if (gimp_container_num_children (gimp->gradient_factory->container))
{

View File

@ -411,8 +411,9 @@ image_map_do (gpointer data)
/* apply the results */
pixel_region_init (&shadowPR, gimage->shadow, x, y, w, h, FALSE);
gimp_image_apply_image (gimage, image_map->drawable, &shadowPR,
FALSE, OPAQUE_OPACITY, GIMP_REPLACE_MODE, NULL,
gimp_image_apply_image (gimage, image_map->drawable, &shadowPR, FALSE,
GIMP_OPACITY_OPAQUE, GIMP_REPLACE_MODE,
NULL,
x, y);
/* display the results */

View File

@ -268,7 +268,7 @@ gimp_airbrush_motion (GimpPaintCore *paint_core,
paint_appl_mode = paint_options->incremental ? INCREMENTAL : CONSTANT;
pressure = ((GimpAirbrushOptions *) paint_options)->pressure;
pressure = ((GimpAirbrushOptions *) paint_options)->pressure / 100.0;
if (paint_options->pressure_options->size)
scale = paint_core->cur_coords.pressure;
@ -319,8 +319,8 @@ gimp_airbrush_motion (GimpPaintCore *paint_core,
/* paste the newly painted area to the image */
gimp_paint_core_paste_canvas (paint_core, drawable,
MIN (pressure, 255),
gimp_context_get_opacity (context) * 255,
MIN (pressure, GIMP_OPACITY_OPAQUE),
gimp_context_get_opacity (context),
gimp_context_get_paint_mode (context),
SOFT, scale, paint_appl_mode);
}

View File

@ -291,7 +291,7 @@ gimp_clone_motion (GimpPaintCore *paint_core,
gint has_alpha = -1;
PixelRegion srcPR, destPR;
GimpPattern *pattern;
gint opacity;
gdouble opacity;
gdouble scale;
pr = NULL;
@ -435,14 +435,15 @@ gimp_clone_motion (GimpPaintCore *paint_core,
}
}
opacity = 255.0 * gimp_context_get_opacity (context);
opacity = gimp_context_get_opacity (context);
if (pressure_options->opacity)
opacity = opacity * 2.0 * paint_core->cur_coords.pressure;
/* paste the newly painted canvas to the gimage which is being worked on */
gimp_paint_core_paste_canvas (paint_core, drawable,
MIN (opacity, 255),
gimp_context_get_opacity (context) * 255,
MIN (opacity, GIMP_OPACITY_OPAQUE),
gimp_context_get_opacity (context),
gimp_context_get_paint_mode (context),
pressure_options->pressure ? PRESSURE : SOFT,
scale, CONSTANT);

View File

@ -415,8 +415,8 @@ gimp_convolve_motion (GimpPaintCore *paint_core,
/* paste the newly painted canvas to the gimage which is being worked on */
gimp_paint_core_replace_canvas (paint_core, drawable,
OPAQUE_OPACITY,
gimp_context_get_opacity (context) * 255,
GIMP_OPACITY_OPAQUE,
gimp_context_get_opacity (context),
pressure_options->pressure ? PRESSURE : SOFT,
scale,
INCREMENTAL);

View File

@ -224,7 +224,7 @@ gimp_dodgeburn_motion (GimpPaintCore *paint_core,
TempBuf *orig;
PixelRegion srcPR, destPR, tempPR;
guchar *temp_data;
gint opacity;
gdouble opacity;
gdouble scale;
if (! (gimage = gimp_item_get_image (GIMP_ITEM (drawable))))
@ -304,16 +304,15 @@ gimp_dodgeburn_motion (GimpPaintCore *paint_core,
else
copy_region (&tempPR, &destPR);
opacity =
255 * gimp_context_get_opacity (gimp_get_current_context (gimage->gimp));
opacity = gimp_context_get_opacity (gimp_get_current_context (gimage->gimp));
if (pressure_options->opacity)
opacity = opacity * 2.0 * paint_core->cur_coords.pressure;
/* Replace the newly dodgedburned area (canvas_buf) to the gimage*/
gimp_paint_core_replace_canvas (paint_core, drawable,
MIN (opacity, 255),
OPAQUE_OPACITY,
MIN (opacity, GIMP_OPACITY_OPAQUE),
GIMP_OPACITY_OPAQUE,
pressure_options->pressure ? PRESSURE : SOFT,
scale, CONSTANT);
@ -354,7 +353,7 @@ gimp_dodgeburn_midtones_lut_func (gpointer user_data,
if (exposure < 0)
factor = 1.0 - exposure * (.333333);
else
factor = 1/(1.0 + exposure);
factor = 1 / (1.0 + exposure);
return pow (value, factor);
}

View File

@ -143,7 +143,7 @@ gimp_eraser_motion (GimpPaintCore *paint_core,
GimpPressureOptions *pressure_options;
GimpImage *gimage;
GimpContext *context;
gint opacity;
gdouble opacity;
TempBuf *area;
guchar col[MAX_CHANNELS];
gdouble scale;
@ -175,7 +175,7 @@ gimp_eraser_motion (GimpPaintCore *paint_core,
color_pixels (temp_buf_data (area), col,
area->width * area->height, area->bytes);
opacity = 255 * gimp_context_get_opacity (context);
opacity = gimp_context_get_opacity (context);
if (pressure_options->opacity)
opacity = opacity * 2.0 * paint_core->cur_coords.pressure;
@ -184,8 +184,8 @@ gimp_eraser_motion (GimpPaintCore *paint_core,
* worked on
*/
gimp_paint_core_paste_canvas (paint_core, drawable,
MIN (opacity, 255),
gimp_context_get_opacity (context) * 255,
MIN (opacity, GIMP_OPACITY_OPAQUE),
gimp_context_get_opacity (context),
options->anti_erase ? GIMP_ANTI_ERASE_MODE : GIMP_ERASE_MODE,
options->hard ? HARD : (pressure_options->pressure ? PRESSURE : SOFT),
scale,

View File

@ -1289,7 +1289,7 @@ ink_paste (GimpInkTool *ink_tool,
/* apply the paint area to the gimage */
gimp_image_apply_image (gimage, drawable, &srcPR,
FALSE,
(int) (gimp_context_get_opacity (context) * 255),
gimp_context_get_opacity (context),
gimp_context_get_paint_mode (context),
undo_tiles, /* specify an alternative src1 */
canvas_buf->x, canvas_buf->y);

View File

@ -214,8 +214,7 @@ gimp_paintbrush_motion (GimpPaintCore *paint_core,
guchar temp_blend = OPAQUE_OPACITY;
guchar col[MAX_CHANNELS];
GimpRGB color;
gint mode;
gint opacity;
gdouble opacity;
gdouble scale;
PaintApplicationMode paint_appl_mode = incremental ? INCREMENTAL : CONSTANT;
@ -248,7 +247,6 @@ gimp_paintbrush_motion (GimpPaintCore *paint_core,
{
/* set the alpha channel */
temp_blend = local_blend;
mode = gradient_type;
if (gradient_length)
{
@ -265,7 +263,7 @@ gimp_paintbrush_motion (GimpPaintCore *paint_core,
gradient,
gradient_length,
&color,
mode);
gradient_type);
temp_blend = (gint) ((color.a * local_blend));
@ -299,14 +297,14 @@ gimp_paintbrush_motion (GimpPaintCore *paint_core,
area->width * area->height, area->bytes);
}
opacity = (gdouble) temp_blend;
opacity = (gdouble) temp_blend / 255.0;
if (pressure_options->opacity)
opacity = opacity * 2.0 * paint_core->cur_coords.pressure;
gimp_paint_core_paste_canvas (paint_core, drawable,
MIN (opacity, 255),
gimp_context_get_opacity (context) * 255,
MIN (opacity, GIMP_OPACITY_OPAQUE),
gimp_context_get_opacity (context),
gimp_context_get_paint_mode (context),
pressure_options->pressure ? PRESSURE : SOFT,
scale, paint_appl_mode);

View File

@ -95,23 +95,23 @@ static MaskBuf * gimp_paint_core_get_brush_mask (GimpPaintCore *core,
static void gimp_paint_core_paste (GimpPaintCore *core,
MaskBuf *brush_mask,
GimpDrawable *drawable,
gint brush_opacity,
gint image_opacity,
gdouble brush_opacity,
gdouble image_opacity,
GimpLayerModeEffects paint_mode,
PaintApplicationMode mode);
static void gimp_paint_core_replace (GimpPaintCore *core,
MaskBuf *brush_mask,
GimpDrawable *drawable,
gint brush_opacity,
gint image_opacity,
gdouble brush_opacity,
gdouble image_opacity,
PaintApplicationMode mode);
static void brush_to_canvas_tiles (GimpPaintCore *core,
MaskBuf *brush_mask,
gint brush_opacity);
gdouble brush_opacity);
static void brush_to_canvas_buf (GimpPaintCore *core,
MaskBuf *brush_mask,
gint brush_opacity);
gdouble brush_opacity);
static void canvas_tiles_to_canvas_buf (GimpPaintCore *core);
static void set_undo_tiles (GimpPaintCore *core,
@ -793,8 +793,8 @@ gimp_paint_core_get_orig_image (GimpPaintCore *core,
void
gimp_paint_core_paste_canvas (GimpPaintCore *core,
GimpDrawable *drawable,
gint brush_opacity,
gint image_opacity,
gdouble brush_opacity,
gdouble image_opacity,
GimpLayerModeEffects paint_mode,
BrushApplicationMode brush_hardness,
gdouble brush_scale,
@ -809,7 +809,9 @@ gimp_paint_core_paste_canvas (GimpPaintCore *core,
/* paste the canvas buf */
gimp_paint_core_paste (core, brush_mask, drawable,
brush_opacity, image_opacity, paint_mode, mode);
brush_opacity,
image_opacity, paint_mode,
mode);
}
/* Similar to gimp_paint_core_paste_canvas, but replaces the alpha channel
@ -819,8 +821,8 @@ gimp_paint_core_paste_canvas (GimpPaintCore *core,
void
gimp_paint_core_replace_canvas (GimpPaintCore *core,
GimpDrawable *drawable,
gint brush_opacity,
gint image_opacity,
gdouble brush_opacity,
gdouble image_opacity,
BrushApplicationMode brush_hardness,
gdouble brush_scale,
PaintApplicationMode mode)
@ -834,7 +836,8 @@ gimp_paint_core_replace_canvas (GimpPaintCore *core,
/* paste the canvas buf */
gimp_paint_core_replace (core, brush_mask, drawable,
brush_opacity, image_opacity, mode);
brush_opacity,
image_opacity, mode);
}
@ -1237,8 +1240,8 @@ static void
gimp_paint_core_paste (GimpPaintCore *core,
MaskBuf *brush_mask,
GimpDrawable *drawable,
gint brush_opacity,
gint image_opacity,
gdouble brush_opacity,
gdouble image_opacity,
GimpLayerModeEffects paint_mode,
PaintApplicationMode mode)
{
@ -1291,7 +1294,8 @@ gimp_paint_core_paste (GimpPaintCore *core,
/* apply the paint area to the gimage */
gimp_image_apply_image (gimage, drawable, &srcPR,
FALSE, image_opacity, paint_mode,
FALSE,
image_opacity, paint_mode,
alt, /* specify an alternative src1 */
core->canvas_buf->x,
core->canvas_buf->y);
@ -1326,8 +1330,8 @@ static void
gimp_paint_core_replace (GimpPaintCore *core,
MaskBuf *brush_mask,
GimpDrawable *drawable,
gint brush_opacity,
gint image_opacity,
gdouble brush_opacity,
gdouble image_opacity,
PaintApplicationMode mode)
{
GimpImage *gimage;
@ -1340,7 +1344,8 @@ gimp_paint_core_replace (GimpPaintCore *core,
if (! gimp_drawable_has_alpha (drawable))
{
gimp_paint_core_paste (core, brush_mask, drawable,
brush_opacity, image_opacity, GIMP_NORMAL_MODE,
brush_opacity,
image_opacity, GIMP_NORMAL_MODE,
mode);
return;
}
@ -1401,7 +1406,8 @@ gimp_paint_core_replace (GimpPaintCore *core,
/* apply the paint area to the gimage */
gimp_image_replace_image (gimage, drawable, &srcPR,
FALSE, image_opacity,
FALSE,
image_opacity,
&maskPR,
core->canvas_buf->x,
core->canvas_buf->y);
@ -1453,7 +1459,7 @@ canvas_tiles_to_canvas_buf (GimpPaintCore *core)
static void
brush_to_canvas_tiles (GimpPaintCore *core,
MaskBuf *brush_mask,
gint brush_opacity)
gdouble brush_opacity)
{
PixelRegion srcPR;
PixelRegion maskPR;
@ -1485,13 +1491,13 @@ brush_to_canvas_tiles (GimpPaintCore *core,
xoff * maskPR.bytes);
/* combine the mask to the canvas tiles */
combine_mask_and_region (&srcPR, &maskPR, brush_opacity);
combine_mask_and_region (&srcPR, &maskPR, brush_opacity * 255.999);
}
static void
brush_to_canvas_buf (GimpPaintCore *core,
MaskBuf *brush_mask,
gint brush_opacity)
gdouble brush_opacity)
{
PixelRegion srcPR;
PixelRegion maskPR;
@ -1523,7 +1529,7 @@ brush_to_canvas_buf (GimpPaintCore *core,
maskPR.data = mask_buf_data (brush_mask) + yoff * maskPR.rowstride + xoff * maskPR.bytes;
/* apply the mask */
apply_mask_to_region (&srcPR, &maskPR, brush_opacity);
apply_mask_to_region (&srcPR, &maskPR, brush_opacity * 255.999);
}
static void

View File

@ -178,16 +178,16 @@ TempBuf * gimp_paint_core_get_orig_image (GimpPaintCore *core,
gint y2);
void gimp_paint_core_paste_canvas (GimpPaintCore *core,
GimpDrawable *drawable,
gint brush_opacity,
gint image_opacity,
gdouble brush_opacity,
gdouble image_opacity,
GimpLayerModeEffects paint_mode,
BrushApplicationMode brush_hardness,
gdouble brush_scale,
PaintApplicationMode mode);
void gimp_paint_core_replace_canvas (GimpPaintCore *core,
GimpDrawable *drawable,
gint brush_opacity,
gint image_opacity,
gdouble brush_opacity,
gdouble image_opacity,
BrushApplicationMode brush_hardness,
gdouble brush_scale,
PaintApplicationMode mode);

View File

@ -258,7 +258,7 @@ gimp_smudge_motion (GimpPaintCore *paint_core,
TempBuf *area;
PixelRegion srcPR, destPR, tempPR;
gdouble rate;
gint opacity;
gdouble opacity;
gint x, y, w, h;
gimage = gimp_item_get_image (GIMP_ITEM (drawable));
@ -335,14 +335,15 @@ gimp_smudge_motion (GimpPaintCore *paint_core,
else
copy_region (&tempPR, &destPR);
opacity = 255 * gimp_context_get_opacity (context);
opacity = gimp_context_get_opacity (context);
if (pressure_options->opacity)
opacity = opacity * 2.0 * paint_core->cur_coords.pressure;
/*Replace the newly made paint area to the gimage*/
gimp_paint_core_replace_canvas (paint_core, drawable,
MIN (opacity, 255),
OPAQUE_OPACITY,
MIN (opacity, GIMP_OPACITY_OPAQUE),
GIMP_OPACITY_OPAQUE,
pressure_options->pressure ? PRESSURE : SOFT,
1.0, INCREMENTAL);
}

View File

@ -291,7 +291,7 @@ gimp_clone_motion (GimpPaintCore *paint_core,
gint has_alpha = -1;
PixelRegion srcPR, destPR;
GimpPattern *pattern;
gint opacity;
gdouble opacity;
gdouble scale;
pr = NULL;
@ -435,14 +435,15 @@ gimp_clone_motion (GimpPaintCore *paint_core,
}
}
opacity = 255.0 * gimp_context_get_opacity (context);
opacity = gimp_context_get_opacity (context);
if (pressure_options->opacity)
opacity = opacity * 2.0 * paint_core->cur_coords.pressure;
/* paste the newly painted canvas to the gimage which is being worked on */
gimp_paint_core_paste_canvas (paint_core, drawable,
MIN (opacity, 255),
gimp_context_get_opacity (context) * 255,
MIN (opacity, GIMP_OPACITY_OPAQUE),
gimp_context_get_opacity (context),
gimp_context_get_paint_mode (context),
pressure_options->pressure ? PRESSURE : SOFT,
scale, CONSTANT);

View File

@ -1289,7 +1289,7 @@ ink_paste (GimpInkTool *ink_tool,
/* apply the paint area to the gimage */
gimp_image_apply_image (gimage, drawable, &srcPR,
FALSE,
(int) (gimp_context_get_opacity (context) * 255),
gimp_context_get_opacity (context),
gimp_context_get_paint_mode (context),
undo_tiles, /* specify an alternative src1 */
canvas_buf->x, canvas_buf->y);

View File

@ -439,7 +439,7 @@ color_notebook_new (const gchar *title,
GTK_SHRINK, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (button);
gimp_rgba_set (&bw, 1.0, 1.0, 1.0, 1.0);
gimp_rgba_set (&bw, 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE);
color_area = gimp_color_area_new (&bw,
GIMP_COLOR_AREA_FLAT,
GDK_BUTTON2_MASK);
@ -458,7 +458,7 @@ color_notebook_new (const gchar *title,
GTK_SHRINK, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (button);
gimp_rgba_set (&bw, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&bw, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
color_area = gimp_color_area_new (&bw,
GIMP_COLOR_AREA_FLAT,
GDK_BUTTON2_MASK);
@ -1321,7 +1321,7 @@ color_history_init (void)
gint i;
for (i = 0; i < COLOR_HISTORY_SIZE; i++)
gimp_rgba_set (&color_history[i], 1.0, 1.0, 1.0, 1.0);
gimp_rgba_set (&color_history[i], 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE);
color_history_initialized = TRUE;
}

View File

@ -155,8 +155,8 @@ gimp_color_panel_button_press (GtkWidget *widget,
gimp_context_get_foreground (gimp_get_user_context (the_gimp), &fg);
gimp_context_get_background (gimp_get_user_context (the_gimp), &bg);
gimp_rgba_set (&black, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&white, 1.0, 1.0, 1.0, 1.0);
gimp_rgba_set (&black, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
gimp_rgba_set (&white, 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE);
gimp_item_factory_set_color (color_button->item_factory,
"/Foreground Color", &fg, FALSE);

View File

@ -466,52 +466,52 @@ gradient_editor_new (Gimp *gimp)
editor->saved_colors[0].r = 0.0; /* Black */
editor->saved_colors[0].g = 0.0;
editor->saved_colors[0].b = 0.0;
editor->saved_colors[0].a = 1.0;
editor->saved_colors[0].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[1].r = 0.5; /* 50% Gray */
editor->saved_colors[1].g = 0.5;
editor->saved_colors[1].b = 0.5;
editor->saved_colors[1].a = 1.0;
editor->saved_colors[1].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[2].r = 1.0; /* White */
editor->saved_colors[2].g = 1.0;
editor->saved_colors[2].b = 1.0;
editor->saved_colors[2].a = 1.0;
editor->saved_colors[2].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[3].r = 0.0; /* Clear */
editor->saved_colors[3].g = 0.0;
editor->saved_colors[3].b = 0.0;
editor->saved_colors[3].a = 0.0;
editor->saved_colors[3].a = GIMP_OPACITY_TRANSPARENT;
editor->saved_colors[4].r = 1.0; /* Red */
editor->saved_colors[4].g = 0.0;
editor->saved_colors[4].b = 0.0;
editor->saved_colors[4].a = 1.0;
editor->saved_colors[4].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[5].r = 1.0; /* Yellow */
editor->saved_colors[5].g = 1.0;
editor->saved_colors[5].b = 0.0;
editor->saved_colors[5].a = 1.0;
editor->saved_colors[5].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[6].r = 0.0; /* Green */
editor->saved_colors[6].g = 1.0;
editor->saved_colors[6].b = 0.0;
editor->saved_colors[6].a = 1.0;
editor->saved_colors[6].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[7].r = 0.0; /* Cyan */
editor->saved_colors[7].g = 1.0;
editor->saved_colors[7].b = 1.0;
editor->saved_colors[7].a = 1.0;
editor->saved_colors[7].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[8].r = 0.0; /* Blue */
editor->saved_colors[8].g = 0.0;
editor->saved_colors[8].b = 1.0;
editor->saved_colors[8].a = 1.0;
editor->saved_colors[8].a = GIMP_OPACITY_OPAQUE;
editor->saved_colors[9].r = 1.0; /* Magenta */
editor->saved_colors[9].g = 0.0;
editor->saved_colors[9].b = 1.0;
editor->saved_colors[9].a = 1.0;
editor->saved_colors[9].a = GIMP_OPACITY_OPAQUE;
if (gimp_container_num_children (gimp->gradient_factory->container))
{

View File

@ -138,10 +138,10 @@ gimp_layer_list_item_class_init (GimpLayerListItemClass *klass)
list_item_class->set_viewable = gimp_layer_list_item_set_viewable;
list_item_class->set_preview_size = gimp_layer_list_item_set_preview_size;
gimp_rgba_set (&black_color, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&white_color, 1.0, 1.0, 1.0, 1.0);
gimp_rgba_set (&green_color, 0.0, 1.0, 0.0, 1.0);
gimp_rgba_set (&red_color, 1.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&black_color, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
gimp_rgba_set (&white_color, 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE);
gimp_rgba_set (&green_color, 0.0, 1.0, 0.0, GIMP_OPACITY_OPAQUE);
gimp_rgba_set (&red_color, 1.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
}
static void

View File

@ -235,7 +235,7 @@ gimp_preview_init (GimpPreview *preview)
preview->border_width = 0;
preview->dot_for_dot = TRUE;
gimp_rgba_set (&preview->border_color, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&preview->border_color, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
preview->is_popup = FALSE;
preview->clickable = FALSE;

View File

@ -235,7 +235,7 @@ gimp_preview_init (GimpPreview *preview)
preview->border_width = 0;
preview->dot_for_dot = TRUE;
gimp_rgba_set (&preview->border_color, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&preview->border_color, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
preview->is_popup = FALSE;
preview->clickable = FALSE;

View File

@ -235,7 +235,7 @@ gimp_preview_init (GimpPreview *preview)
preview->border_width = 0;
preview->dot_for_dot = TRUE;
gimp_rgba_set (&preview->border_color, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&preview->border_color, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
preview->is_popup = FALSE;
preview->clickable = FALSE;

View File

@ -235,7 +235,7 @@ gimp_preview_init (GimpPreview *preview)
preview->border_width = 0;
preview->dot_for_dot = TRUE;
gimp_rgba_set (&preview->border_color, 0.0, 0.0, 0.0, 1.0);
gimp_rgba_set (&preview->border_color, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
preview->is_popup = FALSE;
preview->clickable = FALSE;

View File

@ -929,7 +929,7 @@ xcf_load_channel (XcfInfo *info,
gint height;
gint add_floating_sel;
gchar *name;
GimpRGB color = { 0.0, 0.0, 0.0, 1.0 };
GimpRGB color = { 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE };
/* check and see if this is the drawable the floating selection
* is attached to. if it is then we'll do the attachment at
@ -986,7 +986,7 @@ xcf_load_layer_mask (XcfInfo *info,
gint height;
gint add_floating_sel;
gchar *name;
GimpRGB color = { 0.0, 0.0, 0.0, 1.0 };
GimpRGB color = { 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE };
/* check and see if this is the drawable the floating selection
* is attached to. if it is then we'll do the attachment at