[cairo] plotting a donut in cairo
Travis Griggs
tgriggs at cincom.com
Tue Nov 18 23:49:20 PST 2008
On Nov 18, 2008, at 9:30 PM, Charles سمير Doutriaux wrote:
> Hello,
>
> I'm having a problem on cairo plotting a "Donut".
>
> The way i'm rendering it on my X surface is that basicaly rawing the
> outside circle and then going inside and drawing the inside circle,
> Then I fill this.
>
> On my X it works great (but i think this section is still using xgks
> not cairo)
>
> ON cairo output, the whole thing is filled (png and postscript at
> least)
>
> I was wondering what the best way would be to fx this? Leave a tiny
> little space between the first and ast ponit of the outter circle?
>
> Any suggestion welcome.
Scribe TWO circles. The outside one in one direction and the inner in
the OPPOSITE direction. Then you can draw (fill) just once. Exploiting
this "negative clip" is one of my favorite cairo tricks.
HTH
--
Travis Griggs
Objologist
"The project was so plagued by politics and ego that when the
engineers requested technical oversight, our manager hired a
psychologist instead." -- Ron Avitzur
More information about the cairo
mailing list