[cairo] Truly transparent text with cairo.

KwangYul Seo kwangyul.seo at gmail.com
Mon Mar 17 20:11:22 PDT 2008


Hello,

Is it possible to draw truely transparent texts with cairo? I looked up
cairo_antialias_t, but couldn't find the option I want. When the antialias
option is turned on, cairo blends the background and foreground pixels at
the edge of a letter. Even when the background color is fully transparent,
say rgba (0.0, 0.0, 0.0, 0.0), cairo still thinks it is black and draw the
edge in gray for antialiasing. What I want is to draw a text with a single
color while its edge has alpha for antialiasing.

The following blog article explains the same requirement and the way he
implemented it in PIL.Do I need to use the same technique in cairo too? Or
is there a simple way to do it?

http://nedbatchelder.com/blog/200801/truly_transparent_text_with_pil.html

Thanks,
Kwang Yul Seo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20080318/8894d9f8/attachment.html 


More information about the cairo mailing list