Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | gwy_color_wheel_new () |
void | gwy_color_wheel_get_color () |
void | gwy_color_wheel_set_color () |
gdouble | gwy_color_wheel_get_hue () |
void | gwy_color_wheel_set_hue () |
GwyColorWheel is an HSV colour selector consiting of a hue ring with a saturation/value triangle inside.
GtkWidget *
gwy_color_wheel_new (void
);
Creates a new spherical wheel.
The widget takes up all the space allocated for it.
void gwy_color_wheel_get_color (GwyColorWheel *wheel
,GwyRGBA *color
);
Obtains the current colour of a colour wheel.
The alpha component is always whatever was last set using gwy_color_wheel_set_color()
because the colour wheel
does not have any means to modify alpha.
void gwy_color_wheel_set_color (GwyColorWheel *wheel
,const GwyRGBA *color
);
Sets the current colour of a colour wheel.
The alpha component is preserved but ignored.
gdouble
gwy_color_wheel_get_hue (GwyColorWheel *wheel
);
Gets the rotation hue value of a colour wheel.
The rotation hue corresponds to the wheel rotation. It is generally the same as the actual hue, except for completely unsaturated (grey) colours. The hue is undefined and conventionally it is defined as 0. However, the wheel tries to avoid sudden changes of orientation when a colour becomes desaturated. Therefore, it may preserve the orientation corresponding to the last colour which has non-zero saturation.
Use gwy_color_wheel_get_color()
and gtk_rgb_to_hsv()
to obtain the conventional hue value. Use this function to
obtain the orientation of the wheel if you need it.
void gwy_color_wheel_set_hue (GwyColorWheel *wheel
,gdouble hue
);
Sets the rotation hue value of a colour wheel.
This function is seldom needed. See gwy_color_wheel_get_hue()
for discussion.
“color-changed”
signalvoid user_function (GwyColorWheel *gwywheel, gpointer user_data)
The ::color-changed signal is emitted when the color changes.
gwywheel |
The GwyColorWheel which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First