use gimp_rgb_distance() for flat color areas. Fixes bug #144786.
2004-06-22 Sven Neumann <sven@gimp.org> * libgimpwidgets/gimpcolorarea.c (gimp_color_area_set_color): use gimp_rgb_distance() for flat color areas. Fixes bug #144786.
This commit is contained in:

committed by
Sven Neumann

parent
95a88ac3ae
commit
dd81320e5c
@ -1,3 +1,8 @@
|
||||
2004-06-22 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpwidgets/gimpcolorarea.c (gimp_color_area_set_color): use
|
||||
gimp_rgb_distance() for flat color areas. Fixes bug #144786.
|
||||
|
||||
2004-06-22 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* tools/pdbgen/pdb/fileops.pdb: app/pdb/fileops_cmds.c is a
|
||||
|
@ -286,15 +286,23 @@ gimp_color_area_set_color (GimpColorArea *area,
|
||||
g_return_if_fail (GIMP_IS_COLOR_AREA (area));
|
||||
g_return_if_fail (color != NULL);
|
||||
|
||||
if (gimp_rgba_distance (&area->color, color) > 0.000001)
|
||||
if (area->type == GIMP_COLOR_AREA_FLAT)
|
||||
{
|
||||
if (gimp_rgb_distance (&area->color, color) < 0.000001)
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gimp_rgba_distance (&area->color, color) < 0.000001)
|
||||
return;
|
||||
}
|
||||
|
||||
area->color = *color;
|
||||
|
||||
area->needs_render = TRUE;
|
||||
gtk_widget_queue_draw (GTK_WIDGET (area));
|
||||
|
||||
g_signal_emit (area, gimp_color_area_signals[COLOR_CHANGED], 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user