2008-11-12 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/cogl/cogl-color.h: * clutter/cogl/cogl-path.h: * clutter/cogl/cogl-types.h: * clutter/cogl/common/cogl-color.c: Deprecated cogl_color() in favour of cogl_set_source_color() and friends; store the CoglColor components as unsigned bytes instead of fixed point normalized values; add functions for allocating, copying and freeing CoglColor, for use of language bindings. * clutter/cogl/cogl.h.in: * clutter/cogl/cogl-deprecated.h: Added cogl-deprecated.h, an header file containing the deprecation symbols similar to clutter-deprecated.h. * clutter/cogl/gl/Makefile.am: * clutter/cogl/gl/cogl-texture.c: * clutter/cogl/gl/cogl.c: * clutter/cogl/gles/Makefile.am: * clutter/cogl/gles/cogl-texture.c: * clutter/cogl/gles/cogl.c: Update the GL and GLES implementations of COGL after the CoglColor changes. * clutter/clutter-actor.c: * clutter/clutter-clone-texture.c: * clutter/clutter-entry.c: * clutter/clutter-label.c: * clutter/clutter-rectangle.c: * clutter/clutter-texture.c: Do not use CoglColor whenever it is possible, and use cogl_set_source_color4ub() instead. * clutter/pango/cogl-pango-render.c: Ditto as above. * doc/reference/clutter/subclassing-ClutterActor.xml: * doc/reference/cogl/cogl-sections.txt: Update the documentation. * tests/interactive/test-cogl-offscreen.c: * tests/interactive/test-cogl-primitives.c: * tests/interactive/test-cogl-tex-convert.c: * tests/interactive/test-cogl-tex-foreign.c: * tests/interactive/test-cogl-tex-getset.c: * tests/interactive/test-cogl-tex-polygon.c: * tests/interactive/test-cogl-tex-tile.c: * tests/interactive/test-paint-wrapper.c: Drop the usage of CoglColor whenever it is possible.
This commit is contained in:
@ -347,24 +347,20 @@ cogl_pango_ensure_glyph_cache_for_layout (PangoLayout *layout)
|
||||
|
||||
static void
|
||||
cogl_pango_renderer_set_color_for_part (PangoRenderer *renderer,
|
||||
PangoRenderPart part)
|
||||
PangoRenderPart part)
|
||||
{
|
||||
PangoColor *pango_color = pango_renderer_get_color (renderer, part);
|
||||
CoglPangoRenderer *priv = COGL_PANGO_RENDERER (renderer);
|
||||
CoglColor color;
|
||||
|
||||
if (pango_color)
|
||||
{
|
||||
cogl_color_set_from_4ub (&color,
|
||||
pango_color->red >> 8,
|
||||
pango_color->green >> 8,
|
||||
pango_color->blue >> 8,
|
||||
cogl_color_get_alpha_byte (&priv->color));
|
||||
cogl_set_source_color4ub (pango_color->red >> 8,
|
||||
pango_color->green >> 8,
|
||||
pango_color->blue >> 8,
|
||||
cogl_color_get_alpha_byte (&priv->color));
|
||||
}
|
||||
else
|
||||
color = priv->color;
|
||||
|
||||
cogl_color (&color);
|
||||
cogl_set_source_color (&priv->color);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user