From 73a94a7a79292c5d900832f9b4068c20995278c7 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 3 Sep 2010 16:55:12 +0100 Subject: [PATCH] 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. --- cogl/cogl-material.c | 4 ++-- cogl/cogl.c | 6 +++--- pango/cogl-pango-display-list.c | 10 +++++----- pango/cogl-pango-render.c | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cogl/cogl-material.c b/cogl/cogl-material.c index 2ecf08c51..b21f4311b 100644 --- a/cogl/cogl-material.c +++ b/cogl/cogl-material.c @@ -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); } diff --git a/cogl/cogl.c b/cogl/cogl.c index 229acde52..600572511 100644 --- a/cogl/cogl.c +++ b/cogl/cogl.c @@ -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); } diff --git a/pango/cogl-pango-display-list.c b/pango/cogl-pango-display-list.c index 965418a35..180aa4142 100644 --- a/pango/cogl-pango-display-list.c +++ b/pango/cogl-pango-display-list.c @@ -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); diff --git a/pango/cogl-pango-render.c b/pango/cogl-pango-render.c index 5a554a268..606840432 100644 --- a/pango/cogl-pango-render.c +++ b/pango/cogl-pango-render.c @@ -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); }