mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
modules: Swap ColorWheel to HSV float
Should resolve #11370 Per Pippin, HSV double is not a valid color model for babl. We need to change to HSV float to resolve the warning when selecting colors on the Color Wheel.
This commit is contained in:
parent
0c32125f1c
commit
7abcc97c6a
3 changed files with 13 additions and 13 deletions
|
@ -147,9 +147,9 @@ colorsel_wheel_set_color (GimpColorSelector *selector,
|
|||
GeglColor *color)
|
||||
{
|
||||
ColorselWheel *wheel = COLORSEL_WHEEL (selector);
|
||||
gdouble hsv[3];
|
||||
gfloat hsv[3];
|
||||
|
||||
gegl_color_get_pixel (color, babl_format_with_space ("HSV double", wheel->format), hsv);
|
||||
gegl_color_get_pixel (color, babl_format_with_space ("HSV float", wheel->format), hsv);
|
||||
g_signal_handlers_block_by_func (wheel->hsv,
|
||||
G_CALLBACK (colorsel_wheel_changed),
|
||||
wheel);
|
||||
|
@ -221,10 +221,10 @@ colorsel_wheel_changed (GimpColorWheel *wheel,
|
|||
GimpColorSelector *selector)
|
||||
{
|
||||
GeglColor *color = gegl_color_new (NULL);
|
||||
gdouble hsv[3];
|
||||
gfloat hsv[3];
|
||||
|
||||
gimp_color_wheel_get_color (wheel, &hsv[0], &hsv[1], &hsv[2]);
|
||||
gegl_color_set_pixel (color, babl_format_with_space ("HSV double",
|
||||
gegl_color_set_pixel (color, babl_format_with_space ("HSV float",
|
||||
COLORSEL_WHEEL (selector)->format),
|
||||
hsv);
|
||||
gimp_color_selector_set_color (selector, color);
|
||||
|
|
|
@ -1341,17 +1341,17 @@ gimp_color_wheel_set_color (GimpColorWheel *wheel,
|
|||
*/
|
||||
void
|
||||
gimp_color_wheel_get_color (GimpColorWheel *wheel,
|
||||
gdouble *h,
|
||||
gdouble *s,
|
||||
gdouble *v)
|
||||
gfloat *h,
|
||||
gfloat *s,
|
||||
gfloat *v)
|
||||
{
|
||||
GimpColorWheelPrivate *priv = gimp_color_wheel_get_instance_private (wheel);
|
||||
|
||||
g_return_if_fail (GIMP_IS_COLOR_WHEEL (wheel));
|
||||
|
||||
if (h) *h = priv->h;
|
||||
if (s) *s = priv->s;
|
||||
if (v) *v = priv->v;
|
||||
if (h) *h = (gfloat) priv->h;
|
||||
if (s) *s = (gfloat) priv->s;
|
||||
if (v) *v = (gfloat) priv->v;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -77,9 +77,9 @@ void gimp_color_wheel_set_color (GimpColorWheel *wheel,
|
|||
double s,
|
||||
double v);
|
||||
void gimp_color_wheel_get_color (GimpColorWheel *wheel,
|
||||
gdouble *h,
|
||||
gdouble *s,
|
||||
gdouble *v);
|
||||
gfloat *h,
|
||||
gfloat *s,
|
||||
gfloat *v);
|
||||
|
||||
void gimp_color_wheel_set_ring_fraction (GimpColorWheel *wheel,
|
||||
gdouble fraction);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue