Mercurial > MadButterfly
changeset 596:aaab76730beb openvg
Define mbe_paint() for VG
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Thu, 01 Jul 2010 14:48:57 +0800 |
parents | aaaaa03af04d |
children | 3300992b29ff |
files | src/graph_engine_openvg.c |
diffstat | 1 files changed, 23 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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); }