e451f44855759470d6b825172e1b772cbd2a2dbb
[mesa.git] / src / mesa / swrast / s_linetemp.h
1 /* $Id: s_linetemp.h,v 1.5 2001/02/07 18:36:52 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 3.5
6 *
7 * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 */
26
27
28 /*
29 * Line Rasterizer Template
30 *
31 * This file is #include'd to generate custom line rasterizers.
32 *
33 * The following macros may be defined to indicate what auxillary information
34 * must be interplated along the line:
35 * INTERP_Z - if defined, interpolate Z and FOG values
36 * INTERP_RGB - if defined, interpolate RGB values
37 * INTERP_SPEC - if defined, interpolate specular RGB values
38 * INTERP_ALPHA - if defined, interpolate Alpha values
39 * INTERP_INDEX - if defined, interpolate color index values
40 * INTERP_TEX - if defined, interpolate unit 0 texcoords
41 * INTERP_MULTITEX - if defined, interpolate multi-texcoords
42 *
43 * When one can directly address pixels in the color buffer the following
44 * macros can be defined and used to directly compute pixel addresses during
45 * rasterization (see pixelPtr):
46 * PIXEL_TYPE - the datatype of a pixel (GLubyte, GLushort, GLuint)
47 * BYTES_PER_ROW - number of bytes per row in the color buffer
48 * PIXEL_ADDRESS(X,Y) - returns the address of pixel at (X,Y) where
49 * Y==0 at bottom of screen and increases upward.
50 *
51 * Similarly, for direct depth buffer access, this type is used for depth
52 * buffer addressing:
53 * DEPTH_TYPE - either GLushort or GLuint
54 *
55 * Optionally, one may provide one-time setup code
56 * SETUP_CODE - code which is to be executed once per line
57 *
58 * To enable line stippling define STIPPLE = 1
59 * To enable wide lines define WIDE = 1
60 *
61 * To actually "plot" each pixel either the PLOT macro or
62 * (XMAJOR_PLOT and YMAJOR_PLOT macros) must be defined...
63 * PLOT(X,Y) - code to plot a pixel. Example:
64 * if (Z < *zPtr) {
65 * *zPtr = Z;
66 * color = pack_rgb( FixedToInt(r0), FixedToInt(g0),
67 * FixedToInt(b0) );
68 * put_pixel( X, Y, color );
69 * }
70 *
71 * This code was designed for the origin to be in the lower-left corner.
72 *
73 */
74
75
76 /*void line( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )*/
77 {
78 GLint x0 = (GLint) vert0->win[0];
79 GLint x1 = (GLint) vert1->win[0];
80 GLint y0 = (GLint) vert0->win[1];
81 GLint y1 = (GLint) vert1->win[1];
82 GLint dx, dy;
83 #ifdef INTERP_XY
84 GLint xstep, ystep;
85 #endif
86 #ifdef INTERP_Z
87 GLint z0, z1, dz;
88 const GLint depthBits = ctx->Visual.depthBits;
89 const GLint fixedToDepthShift = depthBits <= 16 ? FIXED_SHIFT : 0;
90 # define FixedToDepth(F) ((F) >> fixedToDepthShift)
91 # ifdef DEPTH_TYPE
92 GLint zPtrXstep, zPtrYstep;
93 DEPTH_TYPE *zPtr;
94 # endif
95 GLfixed fog0 = FloatToFixed(vert0->fog);
96 GLfixed dfog = FloatToFixed(vert1->fog) - fog0;
97 #endif
98 #ifdef INTERP_RGB
99 GLfixed r0 = IntToFixed(vert0->color[0]);
100 GLfixed dr = IntToFixed(vert1->color[0]) - r0;
101 GLfixed g0 = IntToFixed(vert0->color[1]);
102 GLfixed dg = IntToFixed(vert1->color[1]) - g0;
103 GLfixed b0 = IntToFixed(vert0->color[2]);
104 GLfixed db = IntToFixed(vert1->color[2]) - b0;
105 #endif
106 #ifdef INTERP_SPEC
107 GLfixed sr0 = IntToFixed(vert0->specular[0]);
108 GLfixed dsr = IntToFixed(vert1->specular[0]) - sr0;
109 GLfixed sg0 = IntToFixed(vert0->specular[1]);
110 GLfixed dsg = IntToFixed(vert1->specular[1]) - sg0;
111 GLfixed sb0 = IntToFixed(vert0->specular[2]);
112 GLfixed dsb = IntToFixed(vert1->specular[2]) - sb0;
113 #endif
114 #ifdef INTERP_ALPHA
115 GLfixed a0 = IntToFixed(vert0->color[3]);
116 GLfixed da = IntToFixed(vert1->color[3]) - a0;
117 #endif
118 #ifdef INTERP_INDEX
119 GLint i0 = vert0->index << 8;
120 GLint di = (GLint) (vert1->index << 8) - i0;
121 #endif
122 #ifdef INTERP_TEX
123 const GLfloat invw0 = vert0->win[3];
124 const GLfloat invw1 = vert1->win[3];
125 GLfloat tex[4];
126 GLfloat dtex[4];
127 GLfloat fragTexcoord[4];
128 #endif
129 #ifdef INTERP_MULTITEX
130 const GLfloat invw0 = vert0->win[3];
131 const GLfloat invw1 = vert1->win[3];
132 GLfloat tex[MAX_TEXTURE_UNITS][4];
133 GLfloat dtex[MAX_TEXTURE_UNITS][4];
134 GLfloat fragTexcoord[MAX_TEXTURE_UNITS][4];
135 #endif
136 #ifdef PIXEL_ADDRESS
137 PIXEL_TYPE *pixelPtr;
138 GLint pixelXstep, pixelYstep;
139 #endif
140 #ifdef STIPPLE
141 SWcontext *swrast = SWRAST_CONTEXT(ctx);
142 #endif
143 #ifdef WIDE
144 /* for wide lines, draw all X in [x+min, x+max] or Y in [y+min, y+max] */
145 GLint width, min, max;
146 width = (GLint) CLAMP( ctx->Line.Width, MIN_LINE_WIDTH, MAX_LINE_WIDTH );
147 min = (width-1) / -2;
148 max = min + width - 1;
149 #endif
150 #ifdef INTERP_TEX
151 {
152 tex[0] = invw0 * vert0->texcoord[0][0];
153 dtex[0] = invw1 * vert1->texcoord[0][0] - tex[0];
154 tex[1] = invw0 * vert0->texcoord[0][1];
155 dtex[1] = invw1 * vert1->texcoord[0][1] - tex[1];
156 tex[2] = invw0 * vert0->texcoord[0][2];
157 dtex[2] = invw1 * vert1->texcoord[0][2] - tex[2];
158 tex[3] = invw0 * vert0->texcoord[0][3];
159 dtex[3] = invw1 * vert1->texcoord[0][3] - tex[3];
160 }
161 #endif
162 #ifdef INTERP_MULTITEX
163 {
164 GLuint u;
165 for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
166 if (ctx->Texture.Unit[u]._ReallyEnabled) {
167 tex[u][0] = invw0 * vert0->texcoord[u][0];
168 dtex[u][0] = invw1 * vert1->texcoord[u][0] - tex[u][0];
169 tex[u][1] = invw0 * vert0->texcoord[u][1];
170 dtex[u][1] = invw1 * vert1->texcoord[u][1] - tex[u][1];
171 tex[u][2] = invw0 * vert0->texcoord[u][2];
172 dtex[u][2] = invw1 * vert1->texcoord[u][2] - tex[u][2];
173 tex[u][3] = invw0 * vert0->texcoord[u][3];
174 dtex[u][3] = invw1 * vert1->texcoord[u][3] - tex[u][3];
175 }
176 }
177 }
178 #endif
179
180
181 /*
182 * Despite being clipped to the view volume, the line's window coordinates
183 * may just lie outside the window bounds. That is, if the legal window
184 * coordinates are [0,W-1][0,H-1], it's possible for x==W and/or y==H.
185 * This quick and dirty code nudges the endpoints inside the window if
186 * necessary.
187 */
188 #ifdef CLIP_HACK
189 {
190 GLint w = ctx->DrawBuffer->Width;
191 GLint h = ctx->DrawBuffer->Height;
192 if ((x0==w) | (x1==w)) {
193 if ((x0==w) & (x1==w))
194 return;
195 x0 -= x0==w;
196 x1 -= x1==w;
197 }
198 if ((y0==h) | (y1==h)) {
199 if ((y0==h) & (y1==h))
200 return;
201 y0 -= y0==h;
202 y1 -= y1==h;
203 }
204 }
205 #endif
206 dx = x1 - x0;
207 dy = y1 - y0;
208 if (dx==0 && dy==0) {
209 return;
210 }
211
212 /*
213 * Setup
214 */
215 #ifdef SETUP_CODE
216 SETUP_CODE
217 #endif
218
219 #ifdef INTERP_Z
220 # ifdef DEPTH_TYPE
221 zPtr = (DEPTH_TYPE *) _mesa_zbuffer_address(ctx, x0, y0);
222 # endif
223 if (depthBits <= 16) {
224 z0 = FloatToFixed(vert0->win[2]);
225 z1 = FloatToFixed(vert1->win[2]);
226 }
227 else {
228 z0 = (int) vert0->win[2];
229 z1 = (int) vert1->win[2];
230 }
231 #endif
232 #ifdef PIXEL_ADDRESS
233 pixelPtr = (PIXEL_TYPE *) PIXEL_ADDRESS(x0,y0);
234 #endif
235
236 if (dx<0) {
237 dx = -dx; /* make positive */
238 #ifdef INTERP_XY
239 xstep = -1;
240 #endif
241 #if defined(INTERP_Z) && defined(DEPTH_TYPE)
242 zPtrXstep = -((GLint)sizeof(DEPTH_TYPE));
243 #endif
244 #ifdef PIXEL_ADDRESS
245 pixelXstep = -((GLint)sizeof(PIXEL_TYPE));
246 #endif
247 }
248 else {
249 #ifdef INTERP_XY
250 xstep = 1;
251 #endif
252 #if defined(INTERP_Z) && defined(DEPTH_TYPE)
253 zPtrXstep = ((GLint)sizeof(DEPTH_TYPE));
254 #endif
255 #ifdef PIXEL_ADDRESS
256 pixelXstep = ((GLint)sizeof(PIXEL_TYPE));
257 #endif
258 }
259
260 if (dy<0) {
261 dy = -dy; /* make positive */
262 #ifdef INTERP_XY
263 ystep = -1;
264 #endif
265 #if defined(INTERP_Z) && defined(DEPTH_TYPE)
266 zPtrYstep = -ctx->DrawBuffer->Width * ((GLint)sizeof(DEPTH_TYPE));
267 #endif
268 #ifdef PIXEL_ADDRESS
269 pixelYstep = BYTES_PER_ROW;
270 #endif
271 }
272 else {
273 #ifdef INTERP_XY
274 ystep = 1;
275 #endif
276 #if defined(INTERP_Z) && defined(DEPTH_TYPE)
277 zPtrYstep = ctx->DrawBuffer->Width * ((GLint)sizeof(DEPTH_TYPE));
278 #endif
279 #ifdef PIXEL_ADDRESS
280 pixelYstep = -(BYTES_PER_ROW);
281 #endif
282 }
283
284 /*
285 * Draw
286 */
287
288 if (dx>dy) {
289 /*** X-major line ***/
290 GLint i;
291 GLint errorInc = dy+dy;
292 GLint error = errorInc-dx;
293 GLint errorDec = error-dx;
294 #ifdef INTERP_Z
295 dz = (z1-z0) / dx;
296 dfog /= dx;
297 #endif
298 #ifdef INTERP_RGB
299 dr /= dx; /* convert from whole line delta to per-pixel delta */
300 dg /= dx;
301 db /= dx;
302 #endif
303 #ifdef INTERP_SPEC
304 dsr /= dx; /* convert from whole line delta to per-pixel delta */
305 dsg /= dx;
306 dsb /= dx;
307 #endif
308 #ifdef INTERP_ALPHA
309 da /= dx;
310 #endif
311 #ifdef INTERP_INDEX
312 di /= dx;
313 #endif
314 #ifdef INTERP_TEX
315 {
316 const GLfloat invDx = 1.0F / (GLfloat) dx;
317 dtex[0] *= invDx;
318 dtex[1] *= invDx;
319 dtex[2] *= invDx;
320 dtex[3] *= invDx;
321 }
322 #endif
323 #ifdef INTERP_MULTITEX
324 {
325 const GLfloat invDx = 1.0F / (GLfloat) dx;
326 GLuint u;
327 for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
328 if (ctx->Texture.Unit[u]._ReallyEnabled) {
329 dtex[u][0] *= invDx;
330 dtex[u][1] *= invDx;
331 dtex[u][2] *= invDx;
332 dtex[u][3] *= invDx;
333 }
334 }
335 }
336 #endif
337
338 for (i=0;i<dx;i++) {
339 #ifdef STIPPLE
340 GLushort m;
341 m = 1 << ((swrast->StippleCounter/ctx->Line.StippleFactor) & 0xf);
342 if (ctx->Line.StipplePattern & m) {
343 #endif
344 #ifdef INTERP_Z
345 GLdepth Z = FixedToDepth(z0);
346 #endif
347 #ifdef INTERP_INDEX
348 GLint I = i0 >> 8;
349 #endif
350 #ifdef INTERP_TEX
351 {
352 const GLfloat invQ = tex[3] ? (1.0F / tex[3]) : 1.0F;
353 fragTexcoord[0] = tex[0] * invQ;
354 fragTexcoord[1] = tex[1] * invQ;
355 fragTexcoord[2] = tex[2] * invQ;
356 fragTexcoord[3] = tex[3];
357 }
358 #endif
359 #ifdef INTERP_MULTITEX
360 {
361 GLuint u;
362 for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
363 if (ctx->Texture.Unit[u]._ReallyEnabled) {
364 const GLfloat invQ = 1.0F / tex[u][3];
365 fragTexcoord[u][0] = tex[u][0] * invQ;
366 fragTexcoord[u][1] = tex[u][1] * invQ;
367 fragTexcoord[u][2] = tex[u][2] * invQ;
368 fragTexcoord[u][3] = tex[u][3];
369 }
370 }
371 }
372 #endif
373 #ifdef WIDE
374 {
375 GLint yy;
376 GLint ymin = y0 + min;
377 GLint ymax = y0 + max;
378 for (yy=ymin;yy<=ymax;yy++) {
379 PLOT( x0, yy );
380 }
381 }
382 #else
383 # ifdef XMAJOR_PLOT
384 XMAJOR_PLOT( x0, y0 );
385 # else
386 PLOT( x0, y0 );
387 # endif
388 #endif /*WIDE*/
389 #ifdef STIPPLE
390 }
391 swrast->StippleCounter++;
392 #endif
393 #ifdef INTERP_XY
394 x0 += xstep;
395 #endif
396 #ifdef INTERP_Z
397 # ifdef DEPTH_TYPE
398 zPtr = (DEPTH_TYPE *) ((GLubyte*) zPtr + zPtrXstep);
399 # endif
400 z0 += dz;
401 fog0 += dfog;
402 #endif
403 #ifdef INTERP_RGB
404 r0 += dr;
405 g0 += dg;
406 b0 += db;
407 #endif
408 #ifdef INTERP_SPEC
409 sr0 += dsr;
410 sg0 += dsg;
411 sb0 += dsb;
412 #endif
413 #ifdef INTERP_ALPHA
414 a0 += da;
415 #endif
416 #ifdef INTERP_INDEX
417 i0 += di;
418 #endif
419 #ifdef INTERP_TEX
420 tex[0] += dtex[0];
421 tex[1] += dtex[1];
422 tex[2] += dtex[2];
423 tex[3] += dtex[3];
424 #endif
425 #ifdef INTERP_MULTITEX
426 {
427 GLuint u;
428 for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
429 if (ctx->Texture.Unit[u]._ReallyEnabled) {
430 tex[u][0] += dtex[u][0];
431 tex[u][1] += dtex[u][1];
432 tex[u][2] += dtex[u][2];
433 tex[u][3] += dtex[u][3];
434 }
435 }
436 }
437 #endif
438
439 #ifdef PIXEL_ADDRESS
440 pixelPtr = (PIXEL_TYPE*) ((GLubyte*) pixelPtr + pixelXstep);
441 #endif
442 if (error<0) {
443 error += errorInc;
444 }
445 else {
446 error += errorDec;
447 #ifdef INTERP_XY
448 y0 += ystep;
449 #endif
450 #if defined(INTERP_Z) && defined(DEPTH_TYPE)
451 zPtr = (DEPTH_TYPE *) ((GLubyte*) zPtr + zPtrYstep);
452 #endif
453 #ifdef PIXEL_ADDRESS
454 pixelPtr = (PIXEL_TYPE*) ((GLubyte*) pixelPtr + pixelYstep);
455 #endif
456 }
457 }
458 }
459 else {
460 /*** Y-major line ***/
461 GLint i;
462 GLint errorInc = dx+dx;
463 GLint error = errorInc-dy;
464 GLint errorDec = error-dy;
465 #ifdef INTERP_Z
466 dz = (z1-z0) / dy;
467 dfog /= dy;
468 #endif
469 #ifdef INTERP_RGB
470 dr /= dy; /* convert from whole line delta to per-pixel delta */
471 dg /= dy;
472 db /= dy;
473 #endif
474 #ifdef INTERP_SPEC
475 dsr /= dy; /* convert from whole line delta to per-pixel delta */
476 dsg /= dy;
477 dsb /= dy;
478 #endif
479 #ifdef INTERP_ALPHA
480 da /= dy;
481 #endif
482 #ifdef INTERP_INDEX
483 di /= dy;
484 #endif
485 #ifdef INTERP_TEX
486 {
487 const GLfloat invDy = 1.0F / (GLfloat) dy;
488 dtex[0] *= invDy;
489 dtex[1] *= invDy;
490 dtex[2] *= invDy;
491 dtex[3] *= invDy;
492 }
493 #endif
494 #ifdef INTERP_MULTITEX
495 {
496 const GLfloat invDy = 1.0F / (GLfloat) dy;
497 GLuint u;
498 for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
499 if (ctx->Texture.Unit[u]._ReallyEnabled) {
500 dtex[u][0] *= invDy;
501 dtex[u][1] *= invDy;
502 dtex[u][2] *= invDy;
503 dtex[u][3] *= invDy;
504 }
505 }
506 }
507 #endif
508
509 for (i=0;i<dy;i++) {
510 #ifdef STIPPLE
511 GLushort m;
512 m = 1 << ((swrast->StippleCounter/ctx->Line.StippleFactor) & 0xf);
513 if (ctx->Line.StipplePattern & m) {
514 #endif
515 #ifdef INTERP_Z
516 GLdepth Z = FixedToDepth(z0);
517 #endif
518 #ifdef INTERP_INDEX
519 GLint I = i0 >> 8;
520 #endif
521 #ifdef INTERP_TEX
522 {
523 const GLfloat invQ = tex[3] ? (1.0F / tex[3]) : 1.0F;
524 fragTexcoord[0] = tex[0] * invQ;
525 fragTexcoord[1] = tex[1] * invQ;
526 fragTexcoord[2] = tex[2] * invQ;
527 fragTexcoord[3] = tex[3];
528 }
529 #endif
530 #ifdef INTERP_MULTITEX
531 {
532 GLuint u;
533 for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
534 if (ctx->Texture.Unit[u]._ReallyEnabled) {
535 const GLfloat invQ = 1.0F / tex[u][3];
536 fragTexcoord[u][0] = tex[u][0] * invQ;
537 fragTexcoord[u][1] = tex[u][1] * invQ;
538 fragTexcoord[u][2] = tex[u][2] * invQ;
539 fragTexcoord[u][3] = tex[u][3];
540 }
541 }
542 }
543 #endif
544 #ifdef WIDE
545 {
546 GLint xx;
547 GLint xmin = x0 + min;
548 GLint xmax = x0 + max;
549 for (xx=xmin;xx<=xmax;xx++) {
550 PLOT( xx, y0 );
551 }
552 }
553 #else
554 # ifdef YMAJOR_PLOT
555 YMAJOR_PLOT( x0, y0 );
556 # else
557 PLOT( x0, y0 );
558 # endif
559 #endif /*WIDE*/
560 #ifdef STIPPLE
561 }
562 swrast->StippleCounter++;
563 #endif
564 #ifdef INTERP_XY
565 y0 += ystep;
566 #endif
567 #ifdef INTERP_Z
568 # ifdef DEPTH_TYPE
569 zPtr = (DEPTH_TYPE *) ((GLubyte*) zPtr + zPtrYstep);
570 # endif
571 z0 += dz;
572 fog0 += dfog;
573 #endif
574 #ifdef INTERP_RGB
575 r0 += dr;
576 g0 += dg;
577 b0 += db;
578 #endif
579 #ifdef INTERP_SPEC
580 sr0 += dsr;
581 sg0 += dsg;
582 sb0 += dsb;
583 #endif
584 #ifdef INTERP_ALPHA
585 a0 += da;
586 #endif
587 #ifdef INTERP_INDEX
588 i0 += di;
589 #endif
590 #ifdef INTERP_TEX
591 tex[0] += dtex[0];
592 tex[1] += dtex[1];
593 tex[2] += dtex[2];
594 tex[3] += dtex[3];
595 #endif
596 #ifdef INTERP_MULTITEX
597 {
598 GLuint u;
599 for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
600 if (ctx->Texture.Unit[u]._ReallyEnabled) {
601 tex[u][0] += dtex[u][0];
602 tex[u][1] += dtex[u][1];
603 tex[u][2] += dtex[u][2];
604 tex[u][3] += dtex[u][3];
605 }
606 }
607 }
608 #endif
609 #ifdef PIXEL_ADDRESS
610 pixelPtr = (PIXEL_TYPE*) ((GLubyte*) pixelPtr + pixelYstep);
611 #endif
612 if (error<0) {
613 error += errorInc;
614 }
615 else {
616 error += errorDec;
617 #ifdef INTERP_XY
618 x0 += xstep;
619 #endif
620 #if defined(INTERP_Z) && defined(DEPTH_TYPE)
621 zPtr = (DEPTH_TYPE *) ((GLubyte*) zPtr + zPtrXstep);
622 #endif
623 #ifdef PIXEL_ADDRESS
624 pixelPtr = (PIXEL_TYPE*) ((GLubyte*) pixelPtr + pixelXstep);
625 #endif
626 }
627 }
628 }
629
630 }
631
632
633 #undef INTERP_XY
634 #undef INTERP_Z
635 #undef INTERP_RGB
636 #undef INTERP_SPEC
637 #undef INTERP_ALPHA
638 #undef INTERP_TEX
639 #undef INTERP_MULTITEX
640 #undef INTERP_INDEX
641 #undef PIXEL_ADDRESS
642 #undef PIXEL_TYPE
643 #undef DEPTH_TYPE
644 #undef BYTES_PER_ROW
645 #undef SETUP_CODE
646 #undef PLOT
647 #undef XMAJOR_PLOT
648 #undef YMAJOR_PLOT
649 #undef CLIP_HACK
650 #undef STIPPLE
651 #undef WIDE
652 #undef FixedToDepth