⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 regclipv.c

📁 nucleus 文件系统,内核和彩色图形系统,在小系统上非常好用
💻 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          */
/*                                                                       */
/*      regclipv.c                                       1.9             */
/*                                                                       */
/* COMPONENT                                                             */
/*                                                                       */
/*      All                                                              */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This file contains common variables for the region-clipping      */
/* routines.                                                             */
/*                                                                       */
/* AUTHOR                                                                */
/*                                                                       */
/*      Robert G. Burrill, Accelerated Technology, Inc.                  */
/*                                                                       */
/* DATA STRUCTURES                                                       */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* FUNCTIONS                                                             */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* DEPENDENCIES                                                          */
/*                                                                       */
/*		None                                                             */
/*                                                                       */
/* HISTORY                                                               */
/*                                                                       */
/*		   NAME            DATE                    REMARKS               */
/*                                                                       */
/*                                                                       */
/*************************************************************************/
#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 "regclipv.h"


char clipToRegionFlag;	/* 1 if region clipping active, 0 else */
char clipToRectFlag;	/* 1 if rect clipping active, 0 else */
char lclbfYXBanded;		/* flag that's 1 if blitRcd data is	YXbanded */
char bDrawStat;			/* base copy of drawStat for region	clipping
						(drawing can toggle drawStat) */
char drawStat;			/* for region clipping */
rect *nextRegionPtr;	/* pointer to region rect at which to start checked
						for the next region clip, going top->bottom,
						left->right */
rect *nextRegionPtrB;	/* pointer to region rect at which to start checked
						for the next region clip, going bottom->top,
						right->left */
rect *tempRegionPtr;	/* offset portion of pointer to region rect at
						which to resume processing after this band in
						certain cases */
rect bRect;				/* copy of destination rect */
rect dRect;				/* destination rect */
rect sRect;				/* source rect */
rect cRect;				/* clipping rect */
short dYminTemp, dYmaxTemp;	/* temp storage for Y extent of	rectangle
						clipped to YX region band */
rect bsRect;			/* copy of source rect */
short sYminTemp,sYmaxTemp;	/* temp storage for Y extent of	source rect
						clipped to YX region band */
int bandYmin;			/* Ymin and Ymax coordinates for */
int bandYmax;			/* current YX band */
short bcXmin,bcYmin,bcXmax,bcYmax;	/* copy of clip rect */
short cdXmin,cdYmin,cdXmax,cdYmax;	/* copy of dest rect, clipped to clip rect */
int blitMayOverlap;
int isLine;
int errTermL;			/* Bresenham's error term variable */
int errTermAdjUpL;		/* Bresenham's error term adjustment
							value when no minor axis move is made */
int errTermAdjDownL;	/* Bresenham's error term adjustment
							value when a minor axis move is
							made (non-negative) */
int majorAxisLengthM1;	/* length of line along major axis-1 */
int lineDir;			/* line direction after clipping:
							0 = r->l, t->b Ymajor
							1 = vertical top->bottom
							2 = l->r, t->b Ymajor
							3 = l->r, t->b diag
							4 = l->r, t->b Xmajor
							5 = horizontal left->right
							6 = r->l, t->b diag
							7 = r->l, t->b Xmajor
							<=3 means Ymajor, >=4 means Xmajor */
int lineEncode;			/* line tic-tac-toe encoding */

void (*FillDrawer)(blitRcd *drwPRec);	/* Fill/Blit drawing routine */
void (*LineDrawer)(void);	/* Line drawing routine */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -