[cairo] Alpha channel for text under win32
otaylor at redhat.com
Wed Apr 13 08:11:25 PDT 2005
On Wed, 2005-04-13 at 16:49 +1000, Jason Thomas wrote:
> Just FYI, AFAIK GDI+ appears to have support.
Yep, software-only support.
> My requirements are:
> Linux + Windows
> Quick, byte level access to a cairo generated RGBA image
> I have to use the RGBA externally to cairo for blending.
> The win32 alpha channel looks OK except only for fonts,
> it even appears to be used in CAIRO_FORMAT_RGB24 mode.
> Since other renderers use freetype? (X&Glitz) they
> must also be in a similar position as I don't think
> lib freetype handles an alpha channel unless you
> use direct rendering which is pretty expensive.
FreeType is not used by the Win32 backend.
> >Can you just use an image surface?
> If I understand you correctly means do my blending in cairo?
> Unfortunately I don't have the option.
> > and the only use of the DC would be when
> > calling AlphaBlend.
> Well you do have the color/alpha data in the DC's DIB, which you can setup
> in the DC prior to passing to cairo,
> so you can do anything you like with the color/alpha data as externally you
> have access to this.
If all you want is access to the bits, use an image surface, not a win32
surface. In some distant future, Cairo may use Direct/X to do
accelerated drawing to a ARGB buffer under win32, but it doesn't
currently, and won't any time soon.
> Does anyone know if pixmaps/surfaces under X suffer from the same problem?
> i.e. alpha for all primatives but Text?
No, it's not an X problem. It's not really a cairo/win32 problem either,
I believe, just a bug in your hacked version of Cairo... you'd need ot
debug your _cairo_win32_scaled_font_show_glyphs().
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050413/0a174236/attachment.pgp
More information about the cairo