[gegl] gegl:text: Give sRGB colors to pango
- From: Daniel Sabo <daniels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl:text: Give sRGB colors to pango
- Date: Thu, 10 Oct 2013 09:58:18 +0000 (UTC)
commit 66f8054f2247567c7d6134a2e069db852c2b671a
Author: Daniel Sabo <DanielSabo gmail com>
Date: Thu Oct 10 02:56:58 2013 -0700
gegl:text: Give sRGB colors to pango
operations/external/text.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/operations/external/text.c b/operations/external/text.c
index b9b17f2..19ec92c 100644
--- a/operations/external/text.c
+++ b/operations/external/text.c
@@ -91,7 +91,6 @@ static void text_layout_text (GeglChant *self,
PangoAttrList *attrs;
PangoAttribute *attr = NULL;
gchar *string;
- gfloat color[4];
gint alignment = 0;
/* Create a PangoLayout, set the font and text */
@@ -123,10 +122,11 @@ static void text_layout_text (GeglChant *self,
attrs = pango_attr_list_new ();
if (attrs)
{
- gegl_color_get_pixel (o->color, babl_format ("RGBA float"), color);
- attr = pango_attr_foreground_new ((guint16) (color[0] * 65535),
- (guint16) (color[1] * 65535),
- (guint16) (color[2] * 65535));
+ guint16 color[3];
+
+ gegl_color_get_pixel (o->color, babl_format ("R'G'B' u16"), color);
+ attr = pango_attr_foreground_new (color[0], color[1], color[2]);
+
if (attr)
{
attr->start_index = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]