how do you draw an outline of a circle/ellipse

Mark Olesen <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAExh6bb-4oe4py+c4eDzRgRHArbf1qv4J14mhY-357+434z6jQ@mail.gmail.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.