![]() |
![]() |
![]() |
plank Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
void plank_drawing_color_to_gdk_color (PlankDrawingColor *self
,GdkColor *result
); void plank_drawing_color_to_gdk_rgba (PlankDrawingColor *self
,GdkRGBA *result
); gboolean plank_drawing_color_equal (PlankDrawingColor *self
,PlankDrawingColor *color
); void plank_drawing_color_set_hsv (PlankDrawingColor *self
,gdouble h
,gdouble s
,gdouble v
); void plank_drawing_color_set_hue (PlankDrawingColor *self
,gdouble hue
); void plank_drawing_color_set_sat (PlankDrawingColor *self
,gdouble sat
); void plank_drawing_color_set_val (PlankDrawingColor *self
,gdouble val
); void plank_drawing_color_set_alpha (PlankDrawingColor *self
,gdouble alpha
); void plank_drawing_color_get_hsv (PlankDrawingColor *self
,gdouble *h
,gdouble *s
,gdouble *v
); gdouble plank_drawing_color_get_hue (PlankDrawingColor *self
); gdouble plank_drawing_color_get_sat (PlankDrawingColor *self
); gdouble plank_drawing_color_get_val (PlankDrawingColor *self
); void plank_drawing_color_add_hue (PlankDrawingColor *self
,gdouble val
); void plank_drawing_color_set_min_sat (PlankDrawingColor *self
,gdouble sat
); void plank_drawing_color_set_min_value (PlankDrawingColor *self
,gdouble val
); void plank_drawing_color_set_max_sat (PlankDrawingColor *self
,gdouble sat
); void plank_drawing_color_set_max_val (PlankDrawingColor *self
,gdouble val
); void plank_drawing_color_multiply_sat (PlankDrawingColor *self
,gdouble amount
); void plank_drawing_color_brighten_val (PlankDrawingColor *self
,gdouble amount
); void plank_drawing_color_darken_val (PlankDrawingColor *self
,gdouble amount
); void plank_drawing_color_darken_by_sat (PlankDrawingColor *self
,gdouble amount
); gchar * plank_drawing_color_to_string (PlankDrawingColor *self
); void plank_drawing_color_from_gdk_color (GdkColor *color
,PlankDrawingColor *result
); void plank_drawing_color_from_gdk_rgba (GdkRGBA *color
,PlankDrawingColor *result
); void plank_drawing_color_from_string (const gchar *s
,PlankDrawingColor *result
); struct PlankDrawingColor; PlankDrawingColor * plank_drawing_color_dup (const PlankDrawingColor *self
); void plank_drawing_color_free (PlankDrawingColor *self
);
void plank_drawing_color_to_gdk_color (PlankDrawingColor *self
,GdkColor *result
);
Creates a new GdkColor.from this color
|
the PlankDrawingColor instance |
Returns : |
new GdkColor |
void plank_drawing_color_to_gdk_rgba (PlankDrawingColor *self
,GdkRGBA *result
);
Creates a new GdkRGBA.from this color
|
the PlankDrawingColor instance |
Returns : |
new GdkRGBA |
gboolean plank_drawing_color_equal (PlankDrawingColor *self
,PlankDrawingColor *color
);
Check equality with the give color
|
the PlankDrawingColor instance |
|
|
Returns : |
whether the give color equals this color. |
void plank_drawing_color_set_hsv (PlankDrawingColor *self
,gdouble h
,gdouble s
,gdouble v
);
Set HSV color values of this color.
|
the PlankDrawingColor instance |
|
|
|
|
|
void plank_drawing_color_set_hue (PlankDrawingColor *self
,gdouble hue
);
Sets the hue for the color.
|
the PlankDrawingColor instance |
|
. the new hue for the color. [in] |
void plank_drawing_color_set_sat (PlankDrawingColor *self
,gdouble sat
);
Sets the saturation for the color.
|
the PlankDrawingColor instance |
|
. the new saturation for the color. [in] |
void plank_drawing_color_set_val (PlankDrawingColor *self
,gdouble val
);
Sets the value for the color.
|
the PlankDrawingColor instance |
|
. the new value for the color. [in] |
void plank_drawing_color_set_alpha (PlankDrawingColor *self
,gdouble alpha
);
Sets the alpha for the color.
|
the PlankDrawingColor instance |
|
. the new alpha for the color. [in] |
void plank_drawing_color_get_hsv (PlankDrawingColor *self
,gdouble *h
,gdouble *s
,gdouble *v
);
Get HSV color values of this color.
|
the PlankDrawingColor instance |
|
|
|
|
|
gdouble plank_drawing_color_get_hue (PlankDrawingColor *self
);
Returns the hue for the color.
|
the PlankDrawingColor instance |
Returns : |
the hue for the color |
gdouble plank_drawing_color_get_sat (PlankDrawingColor *self
);
Returns the saturation for the color.
|
the PlankDrawingColor instance |
Returns : |
the saturation for the color |
gdouble plank_drawing_color_get_val (PlankDrawingColor *self
);
Returns the value for the color.
|
the PlankDrawingColor instance |
Returns : |
the value for the color |
void plank_drawing_color_add_hue (PlankDrawingColor *self
,gdouble val
);
Increases the color's hue.
|
the PlankDrawingColor instance |
|
. the amount to add to the hue. [in] |
void plank_drawing_color_set_min_sat (PlankDrawingColor *self
,gdouble sat
);
Limits the color's saturation.
|
the PlankDrawingColor instance |
|
. the minimum saturation allowed. [in] |
void plank_drawing_color_set_min_value (PlankDrawingColor *self
,gdouble val
);
Limits the color's value.
|
the PlankDrawingColor instance |
|
. the minimum value allowed. [in] |
void plank_drawing_color_set_max_sat (PlankDrawingColor *self
,gdouble sat
);
Limits the color's saturation.
|
the PlankDrawingColor instance |
|
. the maximum saturation allowed. [in] |
void plank_drawing_color_set_max_val (PlankDrawingColor *self
,gdouble val
);
Limits the color's value.
|
the PlankDrawingColor instance |
|
. the maximum value allowed. [in] |
void plank_drawing_color_multiply_sat (PlankDrawingColor *self
,gdouble amount
);
Multiplies the color's saturation using the amount.
|
the PlankDrawingColor instance |
|
. amount to multiply the saturation by. [in] |
void plank_drawing_color_brighten_val (PlankDrawingColor *self
,gdouble amount
);
Brighten the color's value using the value.
|
the PlankDrawingColor instance |
|
. percent of the value to brighten by. [in] |
void plank_drawing_color_darken_val (PlankDrawingColor *self
,gdouble amount
);
Darkens the color's value using the value.
|
the PlankDrawingColor instance |
|
. percent of the value to darken by. [in] |
void plank_drawing_color_darken_by_sat (PlankDrawingColor *self
,gdouble amount
);
Darkens the color's value using the saturtion.
|
the PlankDrawingColor instance |
|
. percent of the saturation to darken by. [in] |
gchar * plank_drawing_color_to_string (PlankDrawingColor *self
);
Convert color to string formatted like "d
;;d
;;d
;;d
" with numeric entries ranged in 0..255
|
the PlankDrawingColor instance |
Returns : |
the string representation of this color |
void plank_drawing_color_from_gdk_color (GdkColor *color
,PlankDrawingColor *result
);
Creates a new color from a GdkColor.
|
. the color to use. [in] |
Returns : |
new PlankDrawingColor based on the given one |
void plank_drawing_color_from_gdk_rgba (GdkRGBA *color
,PlankDrawingColor *result
);
Creates a new color from a GdkRGBA.
|
. the color to use. [in] |
Returns : |
new PlankDrawingColor based on the given one |
void plank_drawing_color_from_string (const gchar *s
,PlankDrawingColor *result
);
Create new color converted from string formatted like "d
;;d
;;d
;;d
" with numeric entries ranged in 0..255
|
|
Returns : |
new PlankDrawingColor based on the given string |
struct PlankDrawingColor { gdouble R; gdouble G; gdouble B; gdouble A; };
Represents a RGBA color and has methods for manipulating the color.
PlankDrawingColor * plank_drawing_color_dup (const PlankDrawingColor *self
);
Creates a copy of self.
See also: plank_drawing_color_copy()
, plank_drawing_color_destroy()
, plank_drawing_color_free()
|
the instance to duplicate |
Returns : |
a copy of self , free with plank_drawing_color_free()
|
void plank_drawing_color_free (PlankDrawingColor *self
);
Frees the heap-allocated struct.
See also: plank_drawing_color_dup()
, plank_drawing_color_copy()
, plank_drawing_color_destroy()
|
the struct to free |