diff src/graph_engine_openvg.c @ 622:39bd74da7f92 openvg

mbe_copy_source() for OpenVG
author Thinker K.F. Li <thinker@branda.to>
date Fri, 09 Jul 2010 11:50:48 +0800
parents 7020ed3c3e37
children 97bf0ff7a038
line wrap: on
line diff
--- a/src/graph_engine_openvg.c	Fri Jul 09 10:45:23 2010 +0800
+++ b/src/graph_engine_openvg.c	Fri Jul 09 11:50:48 2010 +0800
@@ -651,6 +651,21 @@
     free(surface);
 }
 
+void
+mbe_copy_source(mbe_t *src_canvas, mbe_t *dst_canvas) {
+    VGImage vg_img;
+    
+    ASSERT(src_canvas->tgt->asso_img != NULL);
+    
+    _MK_CURRENT_CTX(dst_canvas);
+    
+    vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE);
+    vgLoadIdentity();
+    
+    vg_img = src_canvas->tgt->asso_img;
+    vgDrawImage(vg_img);
+}
+
 mbe_t *
 mbe_create(mbe_surface_t *surface) {
     EGLDisplay display;