Alpha in Pango Color
- From: William Kappler <wekapple ncsu edu>
- To: gtk-i18n-list gnome org
- Subject: Alpha in Pango Color
- Date: Fri, 7 Aug 2015 19:10:22 -0400
Hello,
I am seeking a way to encode the alpha channel of color into text, so that it can vary within a Pango layout like color. As far as I can tell, this is not supported directly by Pango. If I set an alpha via cairo_set_source_rgba() there is no way to later change it: the markup only offers 3-component hex colors.
I took a brief look at the source and it seems a non-trivial matter to add such functionality. I was unable to trace down where exactly the color attribute ends up affecting the text color. As I said, though, this was a brief look.
Ideally, foreground and background would take both three-component and four-component colors (#NNNNNN or #NNNNNNNN), but an additional alpha tag would be an option as well.
I ask because I am currently attempting to apply Pango-Cairo as the text rendering engine in an open source game engine I am working on. I figure alpha has little impact on most of Pango's applications - but in the context of 3D, it is quite important.
Does anyone have any thoughts or advice on this topic? I would be willing to write a patch to this effect if that is of interest.
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]