3 * Copyright (C) 2001-2009 Jim Evins <evins@snaught.com>.
5 * This file is part of gLabels.
7 * gLabels is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * gLabels is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with gLabels. If not, see <http://www.gnu.org/licenses/>.
23 #include "cairo-ellipse-path.h"
30 /*===========================================*/
31 /* Private macros and constants. */
32 /*===========================================*/
37 /*===========================================*/
39 /*===========================================*/
42 /*===========================================*/
44 /*===========================================*/
47 /*===========================================*/
48 /* Local function prototypes */
49 /*===========================================*/
52 /*****************************************************************************/
53 /* Create ellipse path */
54 /*****************************************************************************/
56 gl_cairo_ellipse_path (cairo_t *cr,
63 gl_debug (DEBUG_VIEW, "START");
66 cairo_move_to (cr, 2*rx, ry);
67 for (i_theta = ARC_FINE; i_theta <= 360; i_theta += ARC_FINE) {
68 x = rx + rx * cos (i_theta * G_PI / 180.0);
69 y = ry + ry * sin (i_theta * G_PI / 180.0);
70 cairo_line_to (cr, x, y);
72 cairo_close_path (cr);
74 gl_debug (DEBUG_VIEW, "END");
80 * Local Variables: -- emacs
82 * c-basic-offset: 8 -- emacs
83 * tab-width: 8 -- emacs
84 * indent-tabs-mode: nil -- emacs