Re: Drawing a multicolor spline
Andrea Canciani <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CAN_5=BA-9xnSkt65B5EUsxQ068JBV3Q5PocJerjtEwVqj9=tCA@mail.gmail.com> |
On Wed, Apr 25, 2012 at 8:35 PM, Davide Calaminici <[email protected]> wrote: > Hello, > > i'm trying to learn cairo graphics doing some test here and there. > > I want to draw a spline or bezier, simulating a Windows screen saver like > Mistify or Ribbons. > Anyone have a simple sample code in c for this? Some sample code on how to draw Bezier curves can be found here: http://cairographics.org/samples/curve_to/ If you want the spline to be multicolor, you will need to draw it with a source that is not solid black, but some kind of pattern. A different approach might be that of painting a gradient mesh pattern (possibly without even using a mask). Sample code can be found here: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-mesh Andrea > > Thank you very much > > -- > cairo mailing list > [email protected] > http://lists.cairographics.org/mailman/listinfo/cairo -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo