How to clean cairo_surface_t when i draw line or other, within video play



Hello,

First ,thanks for your reading.

I have a problem,my program have one thread to get IMAGE from v4l2,and
render to drawingarea,
there are some functions request draw line ,poly,ellipse,text,on the
image, in real time,
but need to save the prev drawing.

i put a cairo_surface_t on the IMAGE(as GdkPixmap),created with:

cairo_surface_t*    cairo_surface_create_similar        (cairo_surface_t *other,

cairo_content_t content,(COLOR_ALPHA)
                                                         int width,
                                                         int height);

BUT ,there is one problem, when mouse moving,the drawed line was allow on it.
how can i clear the prev drawing?

i use another surface on it,and drawing one time i clear
it,(cairo_set_operator(CLEAR),cairo_paint),
but it two slow,

how can i do this.

can only clear the path i drawed?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]