# HG changeset patch # User Thinker K.F. Li # Date 1277966937 -28800 # Node ID aaab76730beba8ade512f628266339368b8aa864 # Parent aaaaa03af04d6f11777c1c7a0db5eec0c9be3eaa Define mbe_paint() for VG diff -r aaaaa03af04d -r aaab76730beb src/graph_engine_openvg.c --- a/src/graph_engine_openvg.c Thu Jul 01 14:24:02 2010 +0800 +++ b/src/graph_engine_openvg.c Thu Jul 01 14:48:57 2010 +0800 @@ -288,6 +288,29 @@ void mbe_paint(mbe_t *canvas) { + EGLDisplay display; + EGLint w, h; + EGLBoolean r; + VGPath path; + _MK_CURRENT_CTX(canvas); + _MK_CURRENT_PAINT(canvas); + + display = _VG_DISPLAY(); + + r = eglQuerySurface(display, canvas->tgt, EGL_WIDTH, &w); + ASSERT(r == EGL_TRUE); + r = eglQuerySurface(display, canvas->tgt, EGL_HEIGHT, &h); + ASSERT(r == EGL_TRUE); + + vgSeti(VG_SCISSORING, VG_FALSE); + + path = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F, + 1, 0, 0, 0, VG_PATH_CAPABILITY_ALL); + vguRect(path, 0, 0, w, h); + vgDrawPath(path, VG_FILL_PATH); + vgDestroyPath(path); + + vgSeti(VG_SCISSORING, VG_TRUE); }