* BUG: Make gb.gtk compile with cairo version < 1.10.


git-svn-id: svn://localhost/gambas/trunk@5377 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2012-11-26 08:27:27 +00:00
parent 7326cc894b
commit 9938807f14

View file

@ -177,6 +177,7 @@ typedef
double dy;
double bx;
double by;
bool invert;
}
GB_PAINT_EXTRA;
@ -528,14 +529,17 @@ static void Background(GB_PAINT *d, int set, GB_COLOR *color)
static void Invert(GB_PAINT *d, int set, int *invert)
{
#if CAIRO_MAJOR >= 2 || (CAIRO_MAJOR == 1 && CAIRO_MINOR >= 10)
if (set)
{
cairo_set_operator(CONTEXT(d), *invert ? CAIRO_OPERATOR_DIFFERENCE : CAIRO_OPERATOR_OVER);
}
else
{
*invert = cairo_get_operator(CONTEXT(d)) == CAIRO_OPERATOR_DIFFERENCE;
}
#else
if (set)
EXTRA(d)->invert = *invert;
else
*invert = EXTRA(d)->invert;
#endif
}