1
/* This file is part of the GNU libxmi package.
3
Copyright (C) 1985, 1986, 1987, 1988, 1989, X Consortium. For an
4
associated permission notice, see the accompanying file README-X.
6
GNU enhancements Copyright (C) 1998, 1999, 2000, 2005, Free Software
9
The GNU libxmi package is free software. You may redistribute it
10
and/or modify it under the terms of the GNU General Public License as
11
published by the Free Software foundation; either version 2, or (at your
12
option) any later version.
14
The GNU libxmi package is distributed in the hope that it will be
15
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
General Public License for more details.
19
You should have received a copy of the GNU General Public License along
20
with the GNU plotutils package; see the file COPYING. If not, write to
21
the Free Software Foundation, Inc., 51 Franklin St., Fifth Floor,
22
Boston, MA 02110-1301, USA. */
1
24
/* Original author: Bob Scheifler, MIT X Consortium, mid 1980s.
2
25
Hacked by Robert S. Maier <rsm@math.arizona.edu>, 1998-99 */
66
89
static const miZeroArcPt _oob_arc_pt = {INT_MAX, INT_MAX, 0};
68
91
/* forward references */
69
static bool miZeroArcSetup ____P((const miArc *arc, miZeroArc *info, bool ok360));
70
static miPoint * miZeroArcPts ____P((const miArc *arc, miPoint *pts));
71
static void miZeroArcDashPts ____P((const miGC *pGC, const miArc *arc, miDashInfo *dinfo, int maxPts, miPoint **pts));
92
static bool miZeroArcSetup (const miArc *arc, miZeroArc *info, bool ok360);
93
static miPoint * miZeroArcPts (const miArc *arc, miPoint *pts);
94
static void miZeroArcDashPts (const miGC *pGC, const miArc *arc, miDashInfo *dinfo, int maxPts, miPoint **pts);
77
100
* `rasterized ellipse' cache. */
81
103
miZeroPolyArc_r (miPaintedSet *paintedSet, const miGC *pGC, int narcs, const miArc *parcs, miEllipseCache *ellipseCache)
83
miZeroPolyArc_r (paintedSet, pGC, narcs, parcs, ellipseCache)
84
miPaintedSet *paintedSet;
88
miEllipseCache *ellipseCache;
204
218
#ifndef NO_NONREENTRANT_POLYARC_SUPPORT
207
220
miZeroPolyArc (miPaintedSet *paintedSet, const miGC *pGC, int narcs, const miArc *parcs)
209
miZeroPolyArc (paintedSet, pGC, narcs, parcs)
210
miPaintedSet *paintedSet;
216
222
if (_mi_ellipseCache == (miEllipseCache *)NULL)
217
223
_mi_ellipseCache = miNewEllipseCache ();
349
349
/* Generate the points that make up a dashed zero-width arc, possibly
350
350
multicolored; write them to pre-allocated storage, indexed by paint
353
/* ARGS: dinfo = updated vars (e.g. dashNum, dashIndex),
354
pts[i] = storage for paint type #i */
354
356
miZeroArcDashPts (const miGC *pGC, const miArc *arc, miDashInfo *dinfo, int maxPts, miPoint **pts)
356
miZeroArcDashPts (pGC, arc, dinfo, maxPts, pts)
359
miDashInfo *dinfo; /* updated vars (e.g. dashNum, dashIndex) */
361
miPoint **pts; /* pts[i] is storage for paint type #i */
365
359
int x, y, a, b, d;
585
579
Generates a miZeroArc struct for any specified arc. */
589
582
miZeroArcSetup (const miArc *arc, miZeroArc *info, bool ok360)
591
miZeroArcSetup (arc, info, ok360)
598
585
int angle1, angle2;