[cairo] [PATCH 29/39] [OpenVG] improved coverage of compositing operators

tardyp at gmail.com tardyp at gmail.com
Fri Jul 10 10:02:31 PDT 2009


From: Øyvind Kolås <pippin at gimp.org>

---
 src/cairo-openvg-surface.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/cairo-openvg-surface.c b/src/cairo-openvg-surface.c
index 642f359..bde9657 100644
--- a/src/cairo-openvg-surface.c
+++ b/src/cairo-openvg-surface.c
@@ -305,27 +305,27 @@ static VGBlendMode
 _cairo_openvg_cairo_operator_to_openvg (cairo_operator_t op)
 {
     switch (op) {
-        /*case CAIRO_OPERATOR_CLEAR:
-            return kPrivateCGCompositeClear;*/
         case CAIRO_OPERATOR_SOURCE:
             return VG_BLEND_SRC;
         case CAIRO_OPERATOR_OVER:
             return VG_BLEND_SRC_OVER;
         case CAIRO_OPERATOR_IN:
             return VG_BLEND_SRC_IN;
+        case CAIRO_OPERATOR_DEST_OVER:
+            return VG_BLEND_DST_OVER;
+        case CAIRO_OPERATOR_DEST_IN:
+            return VG_BLEND_DST_IN;
+        case CAIRO_OPERATOR_ADD:
+            return VG_BLEND_ADDITIVE;
+        case CAIRO_OPERATOR_CLEAR:
         case CAIRO_OPERATOR_OUT:
         case CAIRO_OPERATOR_ATOP:
-            /*return VG_BLEND_SRC_ATOP_SH;*/
         case CAIRO_OPERATOR_DEST:
-        case CAIRO_OPERATOR_DEST_OVER:
-        case CAIRO_OPERATOR_DEST_IN:
         case CAIRO_OPERATOR_DEST_OUT:
         case CAIRO_OPERATOR_DEST_ATOP:
         case CAIRO_OPERATOR_XOR:
-        case CAIRO_OPERATOR_ADD:
         case CAIRO_OPERATOR_SATURATE:
-        case CAIRO_OPERATOR_CLEAR:
-            return VG_BLEND_MULTIPLY;
+          return VG_BLEND_SRC_OVER;
     }
 
     return VG_BLEND_SRC_OVER;
-- 
1.6.0.4



More information about the cairo mailing list