1 | /*
|
---|
2 | * Copyright IBM Corporation 1987,1988,1989
|
---|
3 | *
|
---|
4 | * All Rights Reserved
|
---|
5 | *
|
---|
6 | * Permission to use, copy, modify, and distribute this software and its
|
---|
7 | * documentation for any purpose and without fee is hereby granted,
|
---|
8 | * provided that the above copyright notice appear in all copies and that
|
---|
9 | * both that copyright notice and this permission notice appear in
|
---|
10 | * supporting documentation, and that the name of IBM not be
|
---|
11 | * used in advertising or publicity pertaining to distribution of the
|
---|
12 | * software without specific, written prior permission.
|
---|
13 | *
|
---|
14 | * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
---|
15 | * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
---|
16 | * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
---|
17 | * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
---|
18 | * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
---|
19 | * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
---|
20 | * SOFTWARE.
|
---|
21 | *
|
---|
22 | */
|
---|
23 | /* $XConsortium: ppcSpMcro.h /main/3 1996/02/21 17:58:36 kaleb $ */
|
---|
24 |
|
---|
25 | /* This screwy macro is used in all the spans routines and you find
|
---|
26 | it all over the place, so it is a macro just to tidy things up.
|
---|
27 | */
|
---|
28 |
|
---|
29 | #define SETSPANPTRS(IN,N,IPW,PW,IPPT,PPT,FPW,FPPT,FSORT) \
|
---|
30 | { \
|
---|
31 | N = IN * miFindMaxBand(pGC->pCompositeClip); \
|
---|
32 | if(!(PW = (int *)ALLOCATE_LOCAL(N * sizeof(int)))) \
|
---|
33 | return; \
|
---|
34 | if(!(PPT = (DDXPointRec *)ALLOCATE_LOCAL(N * sizeof(DDXPointRec)))) \
|
---|
35 | { \
|
---|
36 | DEALLOCATE_LOCAL(PW); \
|
---|
37 | return; \
|
---|
38 | } \
|
---|
39 | FPW = PW; \
|
---|
40 | FPPT = PPT; \
|
---|
41 | N = miClipSpans(pGC->pCompositeClip, IPPT, IPW, IN, \
|
---|
42 | PPT, PW, FSORT); \
|
---|
43 | }
|
---|
44 |
|
---|