📄 npen4.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 */
/* */
/* NPEN4.c 1.9 */
/* */
/* COMPONENT */
/* */
/* All */
/* */
/* DESCRIPTION */
/* */
/* This file contains the PenDash function. */
/* */
/* 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 "grafdata.h"
/* Function PenDash sets the pen style of the current metaPort
(thePort.pnStyle) to the specified argSTYLE value.
This routine also smart links dashed lines. */
void PenDash(int argSTYLE)
{
short grafErrValue; /* error value */
void mwLID(void);
if (argSTYLE > 7)
{ /* report an error and select dash #1 */
grafErrValue = c_PenDash + c_BadDash;
nuGrafErr(grafErrValue); /* report error */
argSTYLE = 1;
}
if (argSTYLE == 0)
{ /* clear dashing flag */
grafPort.pnFlags &= ~pnDashFlg;
}
else
{ /* set dashing flag */
grafPort.pnFlags |= pnDashFlg;
}
grafPort.pnDash = argSTYLE; /* set shadow port */
grafPort.pnDashCnt = 0; /* reset the dash sequence to the start */
lineDashIDV = (long) mwLID; /* smart link dashed lines */
SETLINESTYLE(grafPort.pnFlags); /* refresh current line style vector */
thePort->pnDash = argSTYLE; /* refresh the ports pattern and penflags */
thePort->pnDashCnt = 0;
thePort->pnFlags = grafPort.pnFlags;
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -