040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync/*
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Copyright IBM Corporation 1987,1988,1989
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * All Rights Reserved
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Permission to use, copy, modify, and distribute this software and its
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * documentation for any purpose and without fee is hereby granted,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * provided that the above copyright notice appear in all copies and that
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * both that copyright notice and this permission notice appear in
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * supporting documentation, and that the name of IBM not be
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * used in advertising or publicity pertaining to distribution of the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * software without specific, written prior permission.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * SOFTWARE.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync*/
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync/* This screwy macro is used in all the spans routines and you find
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync it all over the place, so it is a macro just to tidy things up.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync*/
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define SETSPANPTRS(IN,N,IPW,PW,IPPT,PPT,FPW,FPPT,FSORT) \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync { \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync N = IN * miFindMaxBand(pGC->pCompositeClip); \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync if(!(PW = (int *)xalloc(N * sizeof(int)))) \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync return; \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync if(!(PPT = (DDXPointRec *)xalloc(N * sizeof(DDXPointRec)))) \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync { \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync free(PW); \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync return; \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync } \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync FPW = PW; \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync FPPT = PPT; \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync N = miClipSpans(pGC->pCompositeClip, IPPT, IPW, IN, \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync PPT, PW, FSORT); \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync }
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync