← Back to team overview

elementary-dev-community team mailing list archive

Why does Cairo.set_source_rgb paint the whole canvas?

 

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 not I tell it to
draw a rectangle (that is, even when I remove the ctx.rectangle() and
ctx.fill()lines, the rectangle is still drawn). Why is this? And what do I
need to do to have the rectangle do the painting rather than the
set_source_rgb?

The source can be found in the original SO question here:
http://stackoverflow.com/questions/16007420/why-does-cairo-set-source-rgb-paint-the-whole-canvas

Please advise, because I'm stumped!

Thanks List!
- Craig

Follow ups