[cairo] cairo_clip()-related question

Alexei Babich a.babich at rez.ru
Thu Nov 27 03:44:27 PST 2008


> There is cairo_copy_path
> (http://www.cairographics.o
>rg/manual/cairo-paths.html#c
>airo-copy-path) and
> cairo_append_path
Thank you very much! I didn't know that the path could be detached from
context (suppose I was reading the documentation quite inattantively). Now I
managed to do what was needed.

> but if
> you could explain what the
> problem is there might be a
> better way.
I need to draw widgets with cairo on not powerful ARM-cpu with FPU emulation
(in linux-kernel mode); image displaying backend is X11\Xrender.
In this connection I need to minimize computing load both in case of doubles
and X11\Xrender drawing calls by cairo.For this purpose I'm trying to part
the whole task on widget drawing into two parts:
1) the initial image construction (path, context, surface, etc) and its
storage;
2) redrawing _only_broken_ part of the widget on Xdamage event. The redraw of
this part would peformed by means of rectangle masking in such a way as to
minimize calculations (as it seems to me, cairo_clip() must work faster than
through-the-surface-with-transparent-area filtration as such filtration
wouldn't performed by X-render promptly).

-- 
Regards,
Alexei Babich, circuit engineer, OOO NPP "Rezonans", Chelyabinsk, Russia
http://www.rez.ru
Jabber ID: impatt at jabber.ru


More information about the cairo mailing list