Mercurial > MadButterfly
comparison src/graph_engine_openvg.c @ 597:3300992b29ff openvg
Define mbe_clear() for VG
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Thu, 01 Jul 2010 15:52:29 +0800 |
parents | aaab76730beb |
children | aba62eb9362d |
comparison
equal
deleted
inserted
replaced
596:aaab76730beb | 597:3300992b29ff |
---|---|
265 return NULL; | 265 return NULL; |
266 } | 266 } |
267 | 267 |
268 canvas->src = NULL; | 268 canvas->src = NULL; |
269 canvas->paint = VG_INVALID_HANDLE; | 269 canvas->paint = VG_INVALID_HANDLE; |
270 canvas->paint_installed = 0; | |
270 canvas->tgt = surface; | 271 canvas->tgt = surface; |
271 canvas->ctx = ctx; | 272 canvas->ctx = ctx; |
272 canvas->path = path; | 273 canvas->path = path; |
273 | 274 |
274 return canvas; | 275 return canvas; |
312 vgDestroyPath(path); | 313 vgDestroyPath(path); |
313 | 314 |
314 vgSeti(VG_SCISSORING, VG_TRUE); | 315 vgSeti(VG_SCISSORING, VG_TRUE); |
315 } | 316 } |
316 | 317 |
318 void | |
319 mbe_clear(mbe_t *canvas) { | |
320 VGPaint paint; | |
321 | |
322 _MK_CURRENT_CTX(canvas); | |
323 | |
324 paint = vgCreatePaint(); | |
325 ASSERT(paint != VG_INVALID_HANDLE); | |
326 vgSetColor(paint, 0); | |
327 | |
328 vgSetPaint(paint, VG_FILL_PATH); | |
329 vgSeti(VG_BLEND_MODE, VG_BLEND_SRC); | |
330 vgDrawPath(canvas->path, VG_FILL_PATH); | |
331 vgSeti(VG_BLEND_MODE, VG_BLEND_SRC_OVER); | |
332 | |
333 vgDestroyPaint(paint); | |
334 | |
335 canvas->paint_installed = 0; | |
336 } |