[PATCH] Fixed paint_with_alpha bug with SOURCE operator=0A=
Antoine Azar
cairo at antoineazar.com
Thu May 1 02:49:32 PDT 2008
=0A=
---=0A=
src/cairo.c | 10 ++++++++++=0A=
1 files changed, 10 insertions(+), 0 deletions(-)=0A=
=0A=
diff --git a/src/cairo.c b/src/cairo.c=0A=
index 6c73e2c..e9d3ee4 100644=0A=
--- a/src/cairo.c=0A=
+++ b/src/cairo.c=0A=
@@ -1994,9 +1994,19 @@ cairo_paint_with_alpha (cairo_t *cr,=0A=
_cairo_color_init_rgba (&color, 1., 1., 1., alpha);=0A=
_cairo_pattern_init_solid (&pattern.solid, &color, =
CAIRO_CONTENT_ALPHA);=0A=
=0A=
+ if(cairo_get_operator(cr) =3D=3D CAIRO_OPERATOR_SOURCE)=0A=
+ {=0A=
+ cairo_push_group(cr);
+ cairo_mask(cr, &pattern.base);
+ cairo_pop_group_to_source(cr);
+ cairo_paint(cr);=0A=
+ }=0A=
+ else=0A=
+ {=0A=
status =3D _cairo_gstate_mask (cr->gstate, &pattern.base);=0A=
if (status)=0A=
_cairo_set_error (cr, status);=0A=
+ }=0A=
=0A=
_cairo_pattern_fini (&pattern.base);=0A=
}=0A=
-- =0A=
1.5.4.rc3.941.gebb79=0A=
=0A=
--Boundary_(ID_+ffc0ck2xR540y7Ge2hUjA)--
More information about the cairo
mailing list