📄 reg15.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 */
/* */
/* REG15.c 1.9 */
/* */
/* COMPONENT */
/* */
/* All */
/* */
/* DESCRIPTION */
/* */
/* This file contains the NullRegion and EmptyRegion functions. */
/* */
/* AUTHOR */
/* */
/* Giac Dinh, 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 "grafdata.h"
#include "metmacs3.h"
/* Function NullRegion modifies an existing region structure such that it contains no
rectangle list. The original allocated size of the region is not changed. */
void NullRegion( region *argRegion )
{
argRegion->rgnSize = sizeof(region) + 2 * sizeof(rect);
/* Flag as null */
argRegion->rgnFlags = 0;
/* Set bound to 0 */
argRegion->rgnRect.Xmin = 0;
argRegion->rgnRect.Xmax = 0;
argRegion->rgnRect.Ymin = 0;
argRegion->rgnRect.Ymax = 0;
/* Set end pointer first rect in list */
argRegion->rgnListEnd->Xmin = rgnEOS;
argRegion->rgnListEnd->Xmax = rgnEOS;
argRegion->rgnListEnd->Ymin = rgnEOS;
argRegion->rgnListEnd->Ymax = rgnEOS;
/* Se start pointer to last rect in list */
argRegion->rgnList->Xmin = rgnBOS;
argRegion->rgnList->Xmax = rgnBOS;
argRegion->rgnList->Ymin = rgnBOS;
argRegion->rgnList->Ymax = rgnBOS;
return;
}
/* Function EmptyRegion checks an existing region structure
to see if it is a null region. */
int EmptyRegion ( region * argRegion)
{
int value;
if(!(argRegion->rgnFlags & rfNull)) return(0);
value = argRegion->rgnRect.Xmin | argRegion->rgnRect.Xmax |
argRegion->rgnRect.Ymin | argRegion->rgnRect.Ymax;
if(value == 0) return(1);
return(0);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -