Re: composites circle

Lawrence D'Oliveiro <[email protected]>
Newsgroups gmane.comp.lib.cairo
Organization Geek Central
Message-ID <[email protected]>
On Sun, 17 Jan 2016 10:58:06 +0100, Uli Schlachter wrote:

> #include <cairo.h>
> #include <math.h>
> 
> #define WIDTH 75
> #define HEIGHT 170
> 
> static void circle(cairo_t *cr, double xc, double yc, double radius)
> {
> 	cairo_arc(cr, xc, yc, radius, 0, 2 * M_PI);
> }
> [etc]

Just a note that M_PI is not a part of standard C. You need to prefix
the include of math.h with

    #define _XOPEN_SOURCE 500

to ensure it is defined.
-- 
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.