[cairo] Runtime check for AlphaBlend (win32 backend)

Owen Taylor otaylor at redhat.com
Tue May 17 12:15:04 PDT 2005


On Tue, 2005-05-17 at 21:53 +0300, Tor Lillqvist wrote:
> Tim Rowley writes:
>  > In mozilla we've found that AlphaBlend isn't available or is broken on
>  > older versions of windows.  This patch adds a runtime check for the
>  > function.
> 
> But Cairo uses other NT-only API, too: CreateFontIndirectW(),
> GetGlyphOutlineW(), ModifyWorldTransform(), SetWorldTransform(), and
> SetGraphicsMode(GM_ADVANCED), at least, so that AlphaBlend() change
> won't make it run on Win98, as far as I can see. Is this just by
> accident, or an deliberate design choice? If it is by choice, does
> this mean HEAD GTK+ and GLib can forget about Win9x, too? (I sure
> would hope so...)

I wouldn't call it either accident or deliberate design choice.

It was a deliberate *implementation* choice to implement for newer
versions of Windows ... many things in the implementation are vastly
easier and more efficient using these extra functions, and if 
I wrote Win9x code paths, I couldn't even be sure they would
work on Win9x, since I wasn't testing there.

I think you can mostly get the text stuff working on Win9x - at
least for text that is only rotated and scaled, and not sheared.
(Sheared text on Win9x would likely require dropping to outlines).
But its going to be a separate code path and quite a bit of work.

Getting the metrics right with the current code paths required a
lot of writing test programs and experimentation to figure out
exactly what Windows XP was doing for metrics 

(http://lists.freedesktop.org/archives/cairo/2005-January/002893.html)

Some of that work would likely have to be done again on Win9x when
working on that code path.

In conclusion, I wasn't trying to make an executive "cairo and
GTK+ shall not run on Win98" decision, just get something working
on the systems where most people run. I'd rather leave the 
executive decisions up to those more in touch with the platform.

Regards,
						Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050517/5bb42e39/attachment.pgp


More information about the cairo mailing list