[Elementary-dev-community] Why does Cairo.set_source_rgb paint the whole canvas?

2013-04-14 Thread Craig
I posted this question on StackOverflow, but I'm hoping you guys can help answer it as well: I'm playing around with Clutter/cairo and I'm trying to draw a rectangle; however, it appears that theset_source_rgb is automatically painting the whole canvas with its source, regardless of whether or

Re: [Elementary-dev-community] Why does Cairo.set_source_rgb paint the whole canvas?

2013-04-14 Thread Tom Beckmann
The effect you observe is caused by the paint call at the bottom. Remove that and it should work fine. But you also have to insert ctx.set_operator(Cairo.Operator.CLEAR); ctx.paint(); ctx.set_operator(Cairo.Operator.OVER); at the very bottom of the draw method which clears the canvas. Clutter