comparison src/graph_engine_openvg.c @ 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
comparison
equal deleted inserted replaced
595:aaaaa03af04d 596:aaab76730beb
286 free(canvas); 286 free(canvas);
287 } 287 }
288 288
289 void 289 void
290 mbe_paint(mbe_t *canvas) { 290 mbe_paint(mbe_t *canvas) {
291 291 EGLDisplay display;
292 } 292 EGLint w, h;
293 293 EGLBoolean r;
294 VGPath path;
295
296 _MK_CURRENT_CTX(canvas);
297 _MK_CURRENT_PAINT(canvas);
298
299 display = _VG_DISPLAY();
300
301 r = eglQuerySurface(display, canvas->tgt, EGL_WIDTH, &w);
302 ASSERT(r == EGL_TRUE);
303 r = eglQuerySurface(display, canvas->tgt, EGL_HEIGHT, &h);
304 ASSERT(r == EGL_TRUE);
305
306 vgSeti(VG_SCISSORING, VG_FALSE);
307
308 path = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F,
309 1, 0, 0, 0, VG_PATH_CAPABILITY_ALL);
310 vguRect(path, 0, 0, w, h);
311 vgDrawPath(path, VG_FILL_PATH);
312 vgDestroyPath(path);
313
314 vgSeti(VG_SCISSORING, VG_TRUE);
315 }
316