[cairo] Win32 build
Hans Breuer
hans at breuer.org
Fri Apr 7 09:13:17 PDT 2006
On 06.04.2006 15:50, Alexander Larsson wrote:
> I couldn't build the current cairo on win32 without the attached patch (or
> something similar) because SHADEBLENDCAPS isn't defined. I'm not sure
> defining WINVER like this is the best thing to do, because I'm not really
> a windows developer, but it makes it work.
>
What we usually do for gdk is defining needed stuff for WINVER above 0x400
by hand. This is done to allow compilation with VC6 provided sdk and
to be sure to handle platform differences at runtime.
Simply defining WINVER to 0x500 would drop the compile time check
and thus silently bind to the newest win32 version (0x500 == win2k,
0x501 ?= winxp)
Similar API handling is also done in cairo: see _composite_alpha_blend in
in src/cairo-win32-surface.c and:
https://bugs.freedesktop.org/show_bug.cgi?id=3926
>
> diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
> old mode 100644
> new mode 100755
> index 310561a..511f961
> --- a/src/cairo-win32-surface.c
> +++ b/src/cairo-win32-surface.c
something like below should be enough for the special case
#ifndef SHADEBLENDCAPS
#define SHADEBLENDCAPS 45
#endif
if (!GetDeviceCaps(dst->dc, SHADEBLENDCAPS))
return CAIRO_INT_STATUS_UNSUPPORTED;
[Sorry no patch, cairo's version control is not compatible
with my current os]
Hans
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it. -- Dilbert
More information about the cairo
mailing list