[Pixman] font rendering
Gerd Hoffmann
kraxel at redhat.com
Thu Mar 7 23:00:50 PST 2013
On 03/07/13 17:52, Søren Sandmann wrote:
> Gerd Hoffmann <kraxel at redhat.com> writes:
>
>> Is there documentation somewhere describing what the pixman ops exactly do?
>
> Unfortunately, pixman doesn't have as much documentation as it should.
>> What I'm trying now is this:
>>
>> pixman_image_composite(PIXMAN_OP_SRC, bg, NULL, vgafb, ...);
>> pixman_image_composite(PIXMAN_OP_OVER, fg, glyph, vgafb, ...);
>>
>> So the first op fills with the background color, and the second renders
>> the character. Comes close to what I want. Except that the second
>> blends the foreground color with the background color instead of
>> replacing it.
>
> If I understand correctly, what you are doing now should work. Blending
> of the foreground and background colors should only happen if the
> foreground color has alpha != 0xff, or if a glyph pixel has alpha that
> is neither 0x00 nor 0xff. In either case, blending is presumably what
> you want?
Yes, I'm pretty sure bleeding is what I need here as I want keep the
background pixels as-is.
Found it: Dropping the pixman_image_set_component_alpha() call I've
copy+pasted from one of the pixman test apps fixed it. Guess it somehow
overwrote what I had placed in the alpha channel of the mask image.
cheers,
Gerd
More information about the Pixman
mailing list