mirror of https://github.com/GNOME/gimp.git
applied patch from Shlomi Fish that fixes more regressions in Sparkle
2005-01-06 Sven Neumann <sven@gimp.org> * plug-ins/common/sparkle.c: applied patch from Shlomi Fish that fixes more regressions in Sparkle plug-in (bug #132145).
This commit is contained in:
parent
750d1f9c70
commit
3b6eae4e27
|
@ -1,3 +1,8 @@
|
||||||
|
2005-01-06 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* plug-ins/common/sparkle.c: applied patch from Shlomi Fish that
|
||||||
|
fixes more regressions in Sparkle plug-in (bug #132145).
|
||||||
|
|
||||||
2005-01-05 DindinX <dindinx@gimp.org>
|
2005-01-05 DindinX <dindinx@gimp.org>
|
||||||
|
|
||||||
* libgimpwidgets/gimpscrolledpreview.[ch]: new function:
|
* libgimpwidgets/gimpscrolledpreview.[ch]: new function:
|
||||||
|
|
|
@ -686,7 +686,7 @@ sparkle (GimpDrawable *drawable,
|
||||||
{
|
{
|
||||||
if (has_alpha && s[alpha] == 0)
|
if (has_alpha && s[alpha] == 0)
|
||||||
{
|
{
|
||||||
memset (dest, 0, alpha);
|
memset (d, 0, alpha);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -921,6 +921,7 @@ fspike (GimpPixelRgn *src_rgn,
|
||||||
gint ok;
|
gint ok;
|
||||||
GimpRGB gimp_color;
|
GimpRGB gimp_color;
|
||||||
guchar pixel[MAX_CHANNELS];
|
guchar pixel[MAX_CHANNELS];
|
||||||
|
guchar chosen_color[MAX_CHANNELS];
|
||||||
guchar color[MAX_CHANNELS];
|
guchar color[MAX_CHANNELS];
|
||||||
|
|
||||||
theta = angle;
|
theta = angle;
|
||||||
|
@ -935,24 +936,36 @@ fspike (GimpPixelRgn *src_rgn,
|
||||||
|
|
||||||
case FOREGROUND:
|
case FOREGROUND:
|
||||||
gimp_context_get_foreground (&gimp_color);
|
gimp_context_get_foreground (&gimp_color);
|
||||||
gimp_rgb_get_uchar (&gimp_color, &pixel[0], &pixel[1], &pixel[2]);
|
gimp_rgb_get_uchar (&gimp_color, &chosen_color[0], &chosen_color[1],
|
||||||
|
&chosen_color[2]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BACKGROUND:
|
case BACKGROUND:
|
||||||
gimp_context_get_background (&gimp_color);
|
gimp_context_get_background (&gimp_color);
|
||||||
gimp_rgb_get_uchar (&gimp_color, &pixel[0], &pixel[1], &pixel[2]);
|
gimp_rgb_get_uchar (&gimp_color, &chosen_color[0], &chosen_color[1],
|
||||||
|
&chosen_color[2]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* draw the major spikes */
|
/* draw the major spikes */
|
||||||
for (i = 0; i < svals.spike_pts; i++)
|
for (i = 0; i < svals.spike_pts; i++)
|
||||||
{
|
{
|
||||||
if (svals.colortype == NATURAL)
|
gimp_pixel_rgn_get_pixel (dest_rgn, pixel, xr, yr);
|
||||||
gimp_pixel_rgn_get_pixel (dest_rgn, pixel, xr, yr);
|
|
||||||
|
|
||||||
color[0] = pixel[0];
|
if (svals.colortype == NATURAL)
|
||||||
color[1] = pixel[1];
|
{
|
||||||
color[2] = pixel[2];
|
color[0] = pixel[0];
|
||||||
|
color[1] = pixel[1];
|
||||||
|
color[2] = pixel[2];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
color[0] = chosen_color[0];
|
||||||
|
color[1] = chosen_color[1];
|
||||||
|
color[2] = chosen_color[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
color[3] = pixel[3];
|
||||||
|
|
||||||
if (svals.inverse)
|
if (svals.inverse)
|
||||||
{
|
{
|
||||||
|
@ -960,6 +973,7 @@ fspike (GimpPixelRgn *src_rgn,
|
||||||
color[1] = 255 - color[1];
|
color[1] = 255 - color[1];
|
||||||
color[2] = 255 - color[2];
|
color[2] = 255 - color[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (svals.random_hue > 0.0 || svals.random_saturation > 0.0)
|
if (svals.random_hue > 0.0 || svals.random_saturation > 0.0)
|
||||||
{
|
{
|
||||||
r = 255 - color[0];
|
r = 255 - color[0];
|
||||||
|
|
Loading…
Reference in New Issue