[cairo-commit] src/cairo-surface.c

Emmanuel Pacaud emmanuel at kemper.freedesktop.org
Fri May 5 07:47:07 PDT 2006


 src/cairo-surface.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

New commits:
diff-tree d76701f465669f843c12aee6b533c9fb6399ec99 (from 36fcaa76d66c16fcedddf3c3e967afa3f4a96615)
Author: Emmanuel Pacaud <emmanuel.pacaud at free.fr>
Date:   Fri May 5 16:47:06 2006 +0200

    Use CLEAR operator for initialisation of similar surface with a transparent color.

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 341909f..422152f 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -268,7 +268,10 @@ _cairo_surface_create_similar_solid (cai
 	return (cairo_surface_t*) &_cairo_surface_nil;
     }
 
-    status = _cairo_surface_paint (surface, CAIRO_OPERATOR_SOURCE, source);
+    status = _cairo_surface_paint (surface, 
+				   color == CAIRO_COLOR_TRANSPARENT ? 
+				   CAIRO_OPERATOR_CLEAR : 
+				   CAIRO_OPERATOR_SOURCE, source);
 
     cairo_pattern_destroy (source);
     


More information about the cairo-commit mailing list