[cairo] CAIRO_OPERATOR_CLEAR is not limited by clipping.

Thinker thinker at branda.to
Wed Mar 4 09:28:36 PST 2009


Hi All,

I had find that API reference tells us that CAIRO_OPERATOR_CLEAR is
bounded.  It means CAIRO_OPERATOR_CLEAR is bounded by the mask.  It is
affected clipping.  But, I found that clipping is not work for a
CAIRO_OPERATOR_CLEAR  operator.  I had try it on FreeBSD with cairo-1.8.6,1.

My program looks like

    for(i = 0; i < n_dirty_areas; i++) {
        area = dirty_areas[i];
        cairo_rectangle(cr, area->x, area->y, area->w, area->h);
    }
    cairo_clip(cr);

    old_op = cairo_get_operator(canvas);
    cairo_set_operator(canvas, CAIRO_OPERATOR_CLEAR);
    cairo_paint(canvas);
    cairo_set_operator(canvas, old_op);

It is supposed to only clear parts defined by dirty_areas.  But, it
clears every pixels in target surface.  Is it normal?  Is it a know
issue?  Do you have any idea?



More information about the cairo mailing list