miwideline.h revision 040abec2534dadc53ebc8fa378ef03f4feecb7db
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncCopyright 1988, 1998 The Open Group
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncPermission to use, copy, modify, distribute, and sell this software and its
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncdocumentation for any purpose is hereby granted without fee, provided that
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncthe above copyright notice appear in all copies and that both that
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynccopyright notice and this permission notice appear in supporting
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncdocumentation.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncThe above copyright notice and this permission notice shall be included
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncin all copies or substantial portions of the Software.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncIN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncOTHER DEALINGS IN THE SOFTWARE.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncExcept as contained in this notice, the name of The Open Group shall
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncnot be used in advertising or otherwise to promote the sale, use or
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncother dealings in this Software without prior written authorization
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncfrom The Open Group.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync/* Author: Keith Packard, MIT X Consortium */
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * interface data to span-merging polygon filler
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynctypedef struct _SpanData {
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define AppendSpanGroup(pGC, pixel, spanPtr, spanData) { \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Polygon edge description for integer wide-line routines
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynctypedef struct _PolyEdge {
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync int x; /* starting x coordinate */
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync int e; /* initial error term */
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define SQSECANT 108.856472512142 /* 1/sin^2(11/2) - miter limit constant */
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * types for general polygon routines
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynctypedef struct _PolyVertex {
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync double x, y;
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynctypedef struct _PolySlope {
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync double k; /* x0 * dy - y0 * dx */
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Line face description for caps/joins
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynctypedef struct _LineFace {
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * macros for polygon fillers
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define MIPOLYRELOADLEFT if (!left_height && left_count) { \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define MIPOLYRELOADRIGHT if (!right_height && right_count) { \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define MILINESETPIXEL(pDrawable, pGC, pixel, oldPixel) { \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync DoChangeGC (pGC, GCForeground, (XID *) &pixel, FALSE); \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define MILINERESETPIXEL(pDrawable, pGC, pixel, oldPixel) { \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync DoChangeGC (pGC, GCForeground, (XID *) &oldPixel, FALSE); \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync int * /*y1*/,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync int * /*y2*/,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncextern int miPolyBuildEdge(double x0, double y0, double k, int dx, int dy,