📄 metconst.h
字号:
#define coordAbs 0
#define ruleWinding 1 /* polygon fill rule defs */
#define ruleOddEven 0
/* ---------------------- Pen Defines ---------------------- */
#define shapeRect 0 /* PenShape() definitions */
#define shapeOval 1 /* */
#define penThin 0,0 /* PenSize() thin lines */
#define dashOnOff 0 /* On-off style dashing */
#define dashDouble 1 /* Double dashing */
typedef struct _dashRcd /* Dash Style Record */
{short dashSize; /* # of elements in dashList */
short dashRsvd; /* (reserved for future use) */
Byte *dashList; /* ptr to list of on/off counts */
} dashRcd;
typedef struct _dashes /* List of Dash Records */
{dashRcd dash[8]; /* List of 8 dash records */
} dashes;
/* --------------- Images, Patterns, Cursor ---------------- */
typedef unsigned char image; /* "image" data type equate */
typedef struct _imageHeader/* Image Header record structure */
{short imWidth; /* Pixel width (X) */
short imHeight; /* Pixel height (Y) */
char imAlign; /* Image alignment */
char imFlags; /* Image flags */
short imRowBytes; /* Bytes per row */
short imBits; /* Bits per pixel */
short imPlanes; /* Planes per pixel */
/* image imData[]; */ /* (image data, variable length)*/
} imageHeader;
typedef struct _patRcd /* Pattern Image definition */
{short patWidth; /* must be 1..31 */
short patHeight; /* must be 1..31 */
char patAlign; /* must be zero */
char patFlags; /* must be zero */
short patRowBytes; /* must be widthxbits rounded up*/
short patBits; /* value of 1 or match dest */
short patPlanes; /* value of 1 or match dest */
/* image patData[]; */ /* pattern data bytes (variable)*/
} patRcd;
typedef struct _patList /* Pattern List structure */
{patRcd *patPtr[32]; /* pointers to pattern images */
char patAlignX[32]; /* pattern X alignments */
char patAlignY[32]; /* pattern Y alignments */
} patList;
typedef struct _cursor /* Cursor Image definition */
{short curWidth; /* must be 16 or 32 */
short curHeight; /* must be 16 or 32 */
char curAlign; /* must be 0 */
char curFlags; /* must be 0 */
short curRowBytes; /* must be 2 or 4 */
short curBits; /* must be 1 */
short curPlanes; /* must be 1 */
/* image curData[]; */ /* cursor data bytes (variable) */
} cursor;
typedef struct _cursorRcd /* Cursor Record definition */
{short hotX; /* cursor align point X */
short hotY; /* cursor align point Y */
cursor scrnMask; /* cursor background image */
cursor cursMask; /* cursor foreground image */
} cursorRcd;
typedef struct _segPts /* (Poly-) Segment structure */
{short sX1; /* start X */
short sY1; /* start Y */
short sX2; /* end X */
short sY2; /* end Y */
short sCap; /* cap style */
} segPts;
#define capBoth 0 /* "Segment" cap styles */
#define capNotFirst -1
#define capNotLast 1
/* ---------------- RGB Palette Programming ---------------- */
typedef struct _palData /* Palette data structure */
{Word palRed; /* red intensity */
Word palGreen; /* green intensity */
Word palBlue; /* blue intensity */
} palData;
/* --------------- Input device and Event system ----------- */
typedef struct _mwEvent /* Event record structure */
{short eventTime; /* System time stamp */
Byte eventType; /* Event type flags */
Byte eventSource; /* Event source device ID */
short eventChar; /* Keyboard Character code */
short eventScan; /* Keyboard Scan code */
short eventState; /* Keyboard State info */
short eventButtons; /* Positional device buttons */
short eventX; /* Positional device X */
short eventY; /* Positional device Y */
short eventUser[2]; /* User defined event data */
} mwEvent;
/* Event Type and Mask flags */
#define evntNONE 0x00 /* no events pending */
#define evntMOVE 0x01 /* input movement */
#define evntPRESS 0x02 /* button press */
#define evntRELEASE 0x04 /* button release */
#define evntKEYDN 0x08 /* key press */
#define evntKEYUP 0x10 /* key release */
#define evntUSER1 0x20 /* user program event 1 */
#define evntUSER2 0x40 /* user program event 2 */
#define evntALL 0xFF /* MaskEvent() - enable all */
/* "eventButtons" mouse buttons */
#define swLeft 1
#define swRight 2
#define swMiddle 4 /* (not on 2 button mice) */
#define swAll 7
/* ------------------- FileQuery record -------------------- */
typedef struct _dirRec /* FileQuery - directory record */
{short fileTime; /* File create time */
short fileDate; /* File create date */
long fileSize; /* File size (bytes) */
char fileAttr; /* File attribute */
char fileName[15]; /* "FILENAME.EXT\0" */
} dirRec;
/* ------------------- HardCopy record -------------------- */
typedef struct _HCInfoRec
{short hcPins; /* Number of elements in print swath */
short hcInlen; /* Number of bytes in "hcInit" string */
Byte hcInit[32]; /* Sent to init printer for output */
short hcRslen; /* Number of bytes in "hcReset" string */
Byte hcReset[16]; /* Sent to reset after output complete */
short hcHdlen; /* Number of bytes in "hcHeader" string */
Byte hcHeader[16]; /* Sent before every line */
short hcPstlen; /* Number of bytes in "hcPstam" string */
Byte hcPstam[16]; /* Sent after length specification */
short hcTrlen; /* Number of bytes in "hcTrailer" string */
Byte hcTrailer[16]; /* Sent after every line */
short hcMode; /* Operational mode bits */
Byte hcSIG[2]; /* Set to 'HC' for validity check */
short hcXlatCount; /* Number of entries in "hcXlatTable" */
int *hcXlatTable; /* Pointer to color translation table */
} HCInfoRec; /* (required if hcXlatCount is non-zero) */
/* Defines for .hcMode bit field */
#define HC_ROT 0x01 /* Rotate picture 90-degrees CCW */
#define HC_FG 0x02 /* XlatTable is list to print(1)/mask(0) */
#define HC_INV 0x04 /* Invert output picture image colors */
#define HC_ASC 0x10 /* Emit ASCII length instead of hex */
/* ------------------------- regions ----------------------- */
typedef struct _region /* "Region" structure type */
{long rgnAlloc; /* Space allocated for rgnList */
long rgnSize; /* Space used in rgnList */
long rgnFlags; /* Region "flags" */
rect rgnRect; /* Bounding limits of region */
rect *rgnList; /* Pointers to first and last */
rect *rgnListEnd; /* entries in region list. */
} region;
/* --------- Extended Pen Definitions for Oval Pen --------- */
#define capFlat 0 /* "PenCap()" definitions */
#define capSquare 2
#define capRound 3
#define joinRound 0 /* "PenJoin()" definitions */
#define joinBevel 1
#define joinMiter 2
/* ------- Defines for custom input impementations ------- */
typedef struct _mouseRcd /* Input device record */
{mwEvent mrEvent; /* this devices event entry */
Word mrEventMask; /* devices event types mask */
Word mrFlags; /* device flags */
rect mrLimits; /* limit rectangle */
Word mrScale[2]; /* x,y scaling factors */
void ( *mrInputMgr )(); /* vector to input manager */
void ( *mrCallBack )(); /* system event handler */
Word mrUsr[10]; /* used by input managers */
} mouseRcd ;
typedef struct _fxdpnt /* Fixed point math type */
{short fr; /* fractional part */
short wh; /* whole part */
} fxdpnt;
/* End of File - METCONST.H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -