Re: Alpha in Pango Color
- From: Behdad Esfahbod <behdad esfahbod gmail com>
- To: William Kappler <wekapple ncsu edu>, gtk-i18n-list gnome org, Matthias Clasen <mclasen redhat com>
- Subject: Re: Alpha in Pango Color
- Date: Sat, 08 Aug 2015 11:36:38 +0200
Hi William,
Currently Pango doesn't support alpha in colors. At this point, it might make
sense to add a separate PANGO_ATTR_ALPHA, instead of an RGBA type.
I'd take a patch. Matthias, is this something you can possibly implement?
Shouldn't take long to implement and test...
b
On 15-08-08 01:10 AM, William Kappler wrote:
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.
:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
William E. Kappler II
LinkedIn <https://www.linkedin.com/in/williamkappler> · Blog
<http://williamkappler.blogspot.com/> · Project Website
<https://github.com/WilliamKappler/onathacar/wiki>
_______________________________________________
gtk-i18n-list mailing list
gtk-i18n-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-i18n-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]