Re: how do you draw an outline of a circle/ellipse
Mark Olesen <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CAExh6bbJ_ndpRCAq7Ef_mD5hma_tN4+6HuzWPidbNZJOFjfM8g@mail.gmail.com> |
I now see the problem and agree with Bill's reasoning. Hopefully, the lock solution will be put into play in a future version. Thanks for the support folks. On Wed, Nov 11, 2015 at 1:32 AM, Mark Olesen <[email protected]> wrote: > I am unable to create an outline of a circle/ellipse. > cairo_stroke below fills instead of creating an outline. > Any ideas? > > double width= 100; > double height= 100; > double x= 100; > double y= 100; > > cairo_save (cr); > cairo_set_source_rgb(cr, 1.0, 0.0, 0.0); > cairo_translate (cr, x + width / 2., y + height / 2.); > cairo_scale (cr, width / 2., height / 2.); > cairo_arc (cr, 0., 0., 1., 0., 2 * M_PI); > cairo_stroke (cr); > cairo_restore (cr); > > Following is the version of cairo I am using: > lrwxrwxrwx 1 root root 21 Oct 31 05:03 /usr/lib/libcairo.so -> > libcairo.so.2.11400.4 > lrwxrwxrwx 1 root root 21 Oct 31 05:03 /usr/lib/libcairo.so.2 -> > libcairo.so.2.11400.4 > -rwxr-xr-x 1 root root 1236288 Oct 31 05:03 /usr/lib/libcairo.so.2.11400.4 > > If I get rid of scale, and put in a value for radius, such as 10, it will > draw the outline. However, I will need cairo_scale to create an ellipse. > > > Thanks in advance, > Mark > -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo