[gegl] text: fix handling of zero alpha values
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] text: fix handling of zero alpha values
- Date: Fri, 23 Dec 2016 13:17:08 +0000 (UTC)
commit 13e4f8a034d0af1521ddb22ad939ed6102c39e60
Author: Ell <ell_se yahoo com>
Date: Fri Dec 23 08:13:32 2016 -0500
text: fix handling of zero alpha values
operations/external/text.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/operations/external/text.c b/operations/external/text.c
index babe4c1..04646d2 100644
--- a/operations/external/text.c
+++ b/operations/external/text.c
@@ -182,9 +182,13 @@ static void text_layout_text (GeglOp *self,
}
else
{
- cairo_translate (cr, 0, vertical_offset);
+ /* When alpha is 0, Pango goes full alpha (by design). Go figure... */
+ if (color[3] > 0)
+ {
+ cairo_translate (cr, 0, vertical_offset);
- pango_cairo_show_layout (cr, layout);
+ pango_cairo_show_layout (cr, layout);
+ }
}
pango_font_description_free (desc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]