📄 xpol_5.c
字号:
/*************************************************************************/
/* */
/* Copyright (c) 1997 - 1999 Accelerated Technology, Inc. */
/* */
/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */
/* subject matter of this material. All manufacturing, reproduction, */
/* use, and sales rights pertaining to this subject matter are governed */
/* by the license agreement. The recipient of this software implicitly */
/* accepts the terms of the license. */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* FILE NAME VERSION */
/* */
/* XPOL_5.c 1.9 */
/* */
/* COMPONENT */
/* */
/* All */
/* */
/* DESCRIPTION */
/* */
/* This file contains polygon common stack data. */
/* */
/* AUTHOR */
/* */
/* Robert G. Burrill, Accelerated Technology, Inc. */
/* */
/* DATA STRUCTURES */
/* */
/* None */
/* */
/* FUNCTIONS */
/* */
/* None */
/* */
/* DEPENDENCIES */
/* */
/* None */
/* */
/* HISTORY */
/* */
/* NAME DATE REMARKS */
/* */
/* BobB 11/16/99 Got rid of ANSI compiler warnings */
/* */
/*************************************************************************/
#include "meta_wnd.h"
#include "metconst.h" /* MetaWINDOW Constant & Stucture Definitions */
#include "metports.h" /* MetaWINDOW Port & Bitmap Definitions */
#include "metaproc.h"
#include "grafdata.h"
#include "xpol_4.h"
#include "xpol_5.h"
/* Common stack frame for XPOL4, XPOL5, and XPOL7, so that routines can be
shared among those modules. */
int currentY; /* scan line currently being scanned */
int rectCount; /* # of rects in blitRcd */
rect *highWater; /* last address at which a rect can start in the blitRcd
and not be the last rect in the list */
blitRcd *lclFillRcd; /* local copy of fillRcd */
rect *rectPtr; /* pointer to next free rect in the fillRcd */
rect *rectBase; /* pointer to beginning of rect list in the fillRcd */
rect clpR; /* clip rect */
char sameAsLast; /* 1 if the current line has exactly the same edges as
the preceding line, 0 else */
rect *lastScanPtr; /* points to rect that started the last scan line */
char localTToB; /* 1 if the coord system is local top->bottom, 0 else */
char firstSegment; /* 1 if the first edge is being put into the GET */
char finalWrap; /* 1 if the last and first points are to be connected */
char allLineEdges; /* 1 if all edges in GET are lines, 0 if other
entities are present */
short startX; /* start coordinates for current line */
short startY;
short nextStartX; /* start coordinates for next edge */
short nextStartY;
short endX; /* end coordinates for current line */
short endY;
short addStartX; /* start coordinates for added edge */
short addStartY;
short addEndX; /* end coordinates for added edge */
short addEndY;
short startInX; /* start and end points of the two edges formed around */
short startInY; /* each line segment for wide lines */
short startOutX;
short startOutY;
short endInX;
short endInY;
short endOutX;
short endOutY;
short lastInX; /* end points of the two edges formed around the last*/
short lastInY; /* line segment for wide lines */
short lastOutX;
short lastOutY;
lineEdgeV **ptrToGETPtr; /* offset of global edge table ptr in GET buffer */
metaPort *thePortPtr; /* pointer to the current port */
point *vertexListPtr; /* pointer to current vertex */
short rawLastX; /* user coordinates of last vertex */
short rawLastY;
short finalRawX; /* user coordinates of last vertex connected to in polyline */
short finalRawY;
short finalGblX; /* global coordinates of last vertex connected to in polyline */
short finalGblY;
int lcl2GblXAdj; /* in general polygon filler, adjustments to convert from */
int lcl2GblYAdj; /* local top->bottom to global */
int direction; /* current, last line direction */
int lastDirection; /*0 = 90 degrees
1 = between 0 and 90 degrees
2 = 0 degrees
3 = between 270 and 0 degrees
4 = 270 degrees
5 = between 180 and 270 degrees
6 = 180 degrees
7 = between 90 and 180 degrees */
short halfWidth[4]; /* offsets to edges of square pen */
int deltaX; /* line segment deltas */
int deltaY;
long endAvailForGET; /* pointer to byte after last byte available for edge struc
storage */
short (*addEdgeVector)(void); /* vector called when building the GET to add each
edge to the GET */
char GETEmpty; /* 1 if GET is empty, 0 else */
sbyte lclFillRule; /* 1 for winding rule fill, 0 for odd/even fill */
int numLinesUntilNext; /* # of lines until the next edge starts */
lineEdgeV **AETPtrPtr; /* pointer to AET pointer in low-memory case (at start of
working buffer) */
int lclNpointsparm; /* local copy of npointsparm for counting down */
int lclModeparm; /* local copy of modeparm */
int maxY; /* highest Y coord to be drawn */
short (*updateAETVector)(void); /* vector called to update the AET each time in
low-memory operation */
int countTemp; /* temporary storage for winding edge counts in double
winding rule scanner */
byte buf1[STACK_BUFFER_SIZE]; /* working storage space */
byte *buf1Ptr; /* pointer into buffer */
long bufCntr; /* buffer counter */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -