Mercurial > MadButterfly
diff src/graph_engine_cairo.c @ 586:b42d69ab8857 openvg
Replace mbe_clip() with mbe_scissoring()
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 30 Jun 2010 13:28:53 +0800 |
parents | e813ac222f48 |
children | ac2e6468a22a |
line wrap: on
line diff
--- a/src/graph_engine_cairo.c Wed Jun 30 09:52:22 2010 +0800 +++ b/src/graph_engine_cairo.c Wed Jun 30 13:28:53 2010 +0800 @@ -152,3 +152,18 @@ return ptn; } + +void +mbe_scissoring(mbe_t *canvas, int n_areas, area_t **areas) { + area_t *area; + int i; + + cairo_new_path(canvas); + + for(i = 0; i < n_areas; i++) { + area = areas[i]; + cairo_rectangle(canvas, area->x, area->y, area->w, area->h); + } + + cairo_clip(canvas); +}