Mercurial > MadButterfly
comparison src/graph_engine_openvg.c @ 608:6c74bc371e37 openvg
paint with alpha for OpenVG
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Mon, 05 Jul 2010 10:56:23 +0800 |
parents | 51dc49fd34a8 |
children | e78bff7d23d3 |
comparison
equal
deleted
inserted
replaced
607:51dc49fd34a8 | 608:6c74bc371e37 |
---|---|
444 eglDestroyContext(display, canvas->ctx); | 444 eglDestroyContext(display, canvas->ctx); |
445 canvas->tgt->asso_mbe = NULL; /* remove association */ | 445 canvas->tgt->asso_mbe = NULL; /* remove association */ |
446 free(canvas); | 446 free(canvas); |
447 } | 447 } |
448 | 448 |
449 /* | |
450 * This implementation support only paint with image paint. OpenVG | |
451 * does not support paint path with an alpha value. But, it supports | |
452 * to draw image with an alpha value. | |
453 */ | |
454 void | |
455 mbe_paint_with_alpha(mbe_t *canvas, co_comp_t alpha) { | |
456 VGImage vg_img; | |
457 _ge_openvg_img_t *ge_img; | |
458 | |
459 _MK_CURRENT_CTX(canvas); | |
460 | |
461 ASSERT(canvas->src != NULL && canvas->src->asso_img != NULL); | |
462 ge_img = canvas->src->asso_img; | |
463 vg_img = ge_img->img; | |
464 | |
465 vgDrawImage(vg_img); | |
466 } | |
467 | |
449 void | 468 void |
450 mbe_paint(mbe_t *canvas) { | 469 mbe_paint(mbe_t *canvas) { |
451 EGLDisplay display; | 470 EGLDisplay display; |
452 EGLint w, h; | 471 EGLint w, h; |
453 EGLBoolean r; | 472 EGLBoolean r; |