[cairo] cairo_clip()-related question

Gerdus van Zyl gerdusvanzyl at gmail.com
Tue Nov 25 05:34:19 PST 2008


You seem to be abusing the cairo_save/restore calls and reusing a
cairo context for a transient window which i am not sure will work.
First try splitting out your drawing code to a seperate function that
accepts only a cairo context. Then create a new cairo surface and
context on every fillWinWithCairo but if it's a redrawRequest just add
the clip like you have it before calling drawing function.
You might also try creating an offscreen surface(create_similar) on
paint and just painting the offscreen surface on redraw.

~Gerdus

On Tue, Nov 25, 2008 at 1:58 PM, Alexei Babich <a.babich at rez.ru> wrote:
> Hello, all.
>
> The sample file is here attended.
> In the end of the file there are some commented lines.
> Running the program as it is the drawing appears. In case the lines are uncommented no drawing appears, unless it's expected to.
> Can someone suppose where I am wrong?
>
> Thank you.
> --
> Regards,
> Alexei Babich, circuit engineer, OOO NPP "Rezonans", Chelyabinsk, Russia
> http://www.rez.ru
> Jabber ID: impatt at jabber.ru
>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>


More information about the cairo mailing list