1
0
Fork 0

Replace cogl_color_set_from_* with cogl_color_init_from_*

The former is not yet "officially" deprecated by the latter, but it's
confusing to have them both in the code base.
This commit is contained in:
Emmanuele Bassi 2010-09-03 16:55:12 +01:00
parent e950d2feec
commit 73a94a7a79
4 changed files with 15 additions and 15 deletions

View file

@ -3530,7 +3530,7 @@ cogl_material_set_color4ub (CoglMaterial *material,
guint8 alpha)
{
CoglColor color;
cogl_color_set_from_4ub (&color, red, green, blue, alpha);
cogl_color_init_from_4ub (&color, red, green, blue, alpha);
cogl_material_set_color (material, &color);
}
@ -3542,7 +3542,7 @@ cogl_material_set_color4f (CoglMaterial *material,
float alpha)
{
CoglColor color;
cogl_color_set_from_4f (&color, red, green, blue, alpha);
cogl_color_init_from_4f (&color, red, green, blue, alpha);
cogl_material_set_color (material, &color);
}

View file

@ -1048,7 +1048,7 @@ cogl_set_source_texture (CoglHandle texture_handle)
g_return_if_fail (texture_handle != NULL);
cogl_material_set_layer (ctx->simple_material, 0, texture_handle);
cogl_color_set_from_4ub (&white, 0xff, 0xff, 0xff, 0xff);
cogl_color_init_from_4ub (&white, 0xff, 0xff, 0xff, 0xff);
cogl_material_set_color (ctx->simple_material, &white);
cogl_set_source (ctx->simple_material);
}
@ -1061,7 +1061,7 @@ cogl_set_source_color4ub (guint8 red,
{
CoglColor c = { 0, };
cogl_color_set_from_4ub (&c, red, green, blue, alpha);
cogl_color_init_from_4ub (&c, red, green, blue, alpha);
cogl_set_source_color (&c);
}
@ -1073,7 +1073,7 @@ cogl_set_source_color4f (float red,
{
CoglColor c = { 0, };
cogl_color_set_from_4f (&c, red, green, blue, alpha);
cogl_color_init_from_4f (&c, red, green, blue, alpha);
cogl_set_source_color (&c);
}

View file

@ -337,11 +337,11 @@ _cogl_pango_display_list_render (CoglPangoDisplayList *dl,
if (node->color_override)
/* Use the override color but preserve the alpha from the
draw color */
cogl_color_set_from_4ub (&draw_color,
cogl_color_get_red_byte (&node->color),
cogl_color_get_green_byte (&node->color),
cogl_color_get_blue_byte (&node->color),
cogl_color_get_alpha_byte (color));
cogl_color_init_from_4ub (&draw_color,
cogl_color_get_red_byte (&node->color),
cogl_color_get_green_byte (&node->color),
cogl_color_get_blue_byte (&node->color),
cogl_color_get_alpha_byte (color));
else
draw_color = *color;
cogl_color_premultiply (&draw_color);

View file

@ -569,11 +569,11 @@ cogl_pango_renderer_set_color_for_part (PangoRenderer *renderer,
{
CoglColor color;
cogl_color_set_from_4ub (&color,
pango_color->red >> 8,
pango_color->green >> 8,
pango_color->blue >> 8,
0xff);
cogl_color_init_from_4ub (&color,
pango_color->red >> 8,
pango_color->green >> 8,
pango_color->blue >> 8,
0xff);
_cogl_pango_display_list_set_color_override (priv->display_list, &color);
}