Trees | Indices | Help |
---|
|
Bit depth independet RGBA colors
RGBA
is a bit depth independent representation of
an RGB or RGBA color, using floating point values from the [0,1]
interval.
RGBA
is not an object, but a simple struct that
can be allocated on stack on created with g_new() or malloc(). Helper
functions for conversion between RGBA
and
GdkColor
(RGBA.to_gdk_color
(), RGBA.from_gdk_color
()) and for
Container
storage by component (RGBA.store_to_container(), RGBA.get_from_container()) are provided.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
Creates RGBA colour specification. This is mostly useful for language bindings.
Since: 2.47 |
Makes a copy of a rgba structure. The result must be freed using RGBA.free().
|
Converts a rgba to a Gdk opacity value.
|
Linearly interpolates two colors, including alpha blending. Correct blending of two not fully opaque colors is tricky. Always use this function, not simple independent interpolation of r, g, b, and a.
|
Gets RGBA color components from a container. This is a convenience function to get the components in the common arrangement.
|
Stores RGBA color components to a container. This is a convenience function to store the components in the common arrangement.
|
Sets foreground color of a Gdk graphics context from a RGBA color. This is a convenience wrapper around gdk_gc_set_rgb_fg_color(), see its documentation for details and caveats.
|
Sets foreground color of a Gdk graphics context from a RGBA color. This is a convenience wrapper around gdk_gc_set_rgb_bg_color(), see its documentation for details and caveats.
|
Formats the R, G and B components of a RGBA color to hexadecimal string. The component order is R, G and B. The output has always exactly 6 bytes and does not include any "#" prefix which is used in some contexts.
Since: 2.32 |
Formats all components of a RGBA color to hexadecimal string. The component order is A, R, G and B. Note that while this order is a common it is by no means universal. The output has always exactly 8 bytes and does not include any "#" prefix which is used in some contexts.
Since: 2.32 |
Converts a RGBA color to pixbuf pixel. The returned pixel value includes opacity. If
Since: 2.49 |
Converts a pixbuf pixel value to a RGBA color. The conversion includes opacity. If the opacity channel is undefined
or should be ignored, you need to either set the lowest byte of
Since: 2.49 |
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 | http://epydoc.sourceforge.net |