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

📄 graph.h

📁 电容生产线在线快速批量抽检
💻 H
📖 第 1 页 / 共 2 页
字号:
/* parameters for _wrapon */
#define _GWRAPOFF	0
#define _GWRAPON	1


/* direction parameters for _scrolltextwindow */
#define _GSCROLLUP	1
#define _GSCROLLDOWN	(-1)

/* request maximum number of rows in _settextrows and _setvideomoderows */
#define _MAXTEXTROWS	(-1)

short _far _cdecl _settextrows(short); /* returns # rows set; 0 if error */
void _far _cdecl _settextwindow(short, short, short, short);
void _far _cdecl _gettextwindow(short _far *, short _far *, short _far *, short _far *);
void _far _cdecl _scrolltextwindow(short);
void _far _cdecl _outmem(const unsigned char _far *, short);
void _far _cdecl _outtext(const unsigned char _far *);
short _far _cdecl _wrapon(short);

short _far _cdecl _displaycursor(short);
short _far _cdecl _settextcursor(short);
short _far _cdecl _gettextcursor(void);

struct rccoord _far _cdecl _settextposition(short, short);
struct rccoord _far _cdecl _gettextposition(void);

short _far _cdecl _settextcolor(short);
short _far _cdecl _gettextcolor(void);


/* SCREEN IMAGES */

void _far _cdecl _getimage(short, short, short, short, char _huge *);
void _far _cdecl _putimage(short, short, char _huge *, short);
long _far _cdecl _imagesize(short, short, short, short);

/* "action verbs" for _putimage() and _setwritemode() */
#define _GPSET		3
#define _GPRESET	2
#define _GAND		1
#define _GOR		0
#define _GXOR		4


/* Color values are used with _setbkcolor in graphics modes and also by
   _remappalette and _remapallpalette.  Also known as palette colors.
   Not to be confused with color indices (aka. color attributes).  */

/* universal color values (all color modes): */
#define _BLACK		0x000000L
#define _BLUE		0x2a0000L
#define _GREEN		0x002a00L
#define _CYAN		0x2a2a00L
#define _RED		0x00002aL
#define _MAGENTA	0x2a002aL
#define _BROWN		0x00152aL
#define _WHITE		0x2a2a2aL
#define _GRAY		0x151515L
#define _LIGHTBLUE	0x3F1515L
#define _LIGHTGREEN	0x153f15L
#define _LIGHTCYAN	0x3f3f15L
#define _LIGHTRED	0x15153fL
#define _LIGHTMAGENTA	0x3f153fL
#define _YELLOW		0x153f3fL
#define _BRIGHTWHITE	0x3f3f3fL

/* the following is obsolescent and defined only for backward compatibility */
#define _LIGHTYELLOW	_YELLOW

/* mono mode F (_ERESNOCOLOR) color values: */
#define _MODEFOFF	0L
#define _MODEFOFFTOON	1L
#define _MODEFOFFTOHI	2L
#define _MODEFONTOOFF	3L
#define _MODEFON	4L
#define _MODEFONTOHI	5L
#define _MODEFHITOOFF	6L
#define _MODEFHITOON	7L
#define _MODEFHI	8L

/* mono mode 7 (_TEXTMONO) color values: */
#define _MODE7OFF	0L
#define _MODE7ON	1L
#define _MODE7HI	2L


/* Warning:  these '_xy' entrypoints are undocumented.
   They may or may not be supported in future versions. */
struct xycoord _far _cdecl _moveto_xy(struct xycoord);
short _far _cdecl _lineto_xy(struct xycoord);
short _far _cdecl _rectangle_xy(short,struct xycoord,struct xycoord);
short _far _cdecl _arc_xy(struct xycoord, struct xycoord, struct xycoord, struct xycoord);
short _far _cdecl _ellipse_xy(short, struct xycoord, struct xycoord);
short _far _cdecl _pie_xy(short, struct xycoord, struct xycoord, struct xycoord, struct xycoord);
short _far _cdecl _getpixel_xy(struct xycoord);
short _far _cdecl _setpixel_xy(struct xycoord);
short _far _cdecl _floodfill_xy(struct xycoord, short);
void _far _cdecl _getimage_xy(struct xycoord,struct xycoord, char _huge *);
long _far _cdecl _imagesize_xy(struct xycoord,struct xycoord);
void _far _cdecl _putimage_xy(struct xycoord, char _huge *, short);


/* WINDOW COORDINATE SYSTEM */

#ifndef _WXYCOORD_DEFINED
/* structure for window coordinate pair */
struct _wxycoord {
	double wx;	/* window x coordinate */
	double wy;	/* window y coordinate */
	};
#define _WXYCOORD_DEFINED
#endif


/* define real coordinate window - returns non-zero if successful */
short _far _cdecl _setwindow(short,double,double,double,double);

/* convert from view to window coordinates */
struct _wxycoord _far _cdecl _getwindowcoord(short,short);
struct _wxycoord _far _cdecl _getwindowcoord_xy(struct xycoord);

/* convert from window to view coordinates */
struct xycoord _far _cdecl _getviewcoord_w(double,double);
struct xycoord _far _cdecl _getviewcoord_wxy(const struct _wxycoord _far *);

/*	return the window coordinates of the current graphics output
	position as an _wxycoord structure. no error return. */
struct _wxycoord _far _cdecl _getcurrentposition_w(void);


/* window coordinate entry points for graphics output routines */

/*	returns nonzero if successful; otherwise 0	*/
short _far _cdecl _arc_w(double, double, double, double, double, double, double, double);
short _far _cdecl _arc_wxy(const struct _wxycoord _far *, const struct _wxycoord _far *, const struct _wxycoord _far *, const struct _wxycoord _far *);

/*	returns nonzero if successful; otherwise 0	*/
short _far _cdecl _ellipse_w(short, double, double, double, double);
short _far _cdecl _ellipse_wxy(short, const struct _wxycoord _far *, const struct _wxycoord _far *);

/*	returns nonzero if successful; otherwise 0	*/
short _far _cdecl _floodfill_w(double, double, short);

/*	returns pixel value at given point; -1 if unsuccessful. */
short _far _cdecl _getpixel_w(double, double);

/*	returns nonzero if successful; otherwise 0	*/
short _far _cdecl _lineto_w(double, double);

/*	returns the view coordinates of the previous output
	position as an _xycoord structure. no error return */
struct _wxycoord _far _cdecl _moveto_w(double, double);

/*	returns nonzero if successful; otherwise 0	*/
short _far _cdecl _pie_w(short, double, double, double, double, double, double, double, double);
short _far _cdecl _pie_wxy(short, const struct _wxycoord _far *, const struct _wxycoord _far *, const struct _wxycoord _far *, const struct _wxycoord _far *);

/*	returns nonzero if successful; otherwise 0	*/
short _far _cdecl _rectangle_w(short, double, double, double, double);
short _far _cdecl _rectangle_wxy(short, const struct _wxycoord _far *, const struct _wxycoord _far *);

/*	returns nonzero if successful; otherwise 0	*/
short _far _cdecl _polygon_w(short, const double _far *, short);
short _far _cdecl _polygon_wxy(short, const struct _wxycoord _far *, short);

/*	returns previous color; -1 if unsuccessful */
short _far _cdecl _setpixel_w(double, double);


/* window coordinate image routines */

/*	no return value */
void _far _cdecl _getimage_w(double, double, double, double, char _huge *);
void _far _cdecl _getimage_wxy(const struct _wxycoord _far *, const struct _wxycoord _far *, char _huge *);

/*	returns the image's storage size in bytes */
long _far _cdecl _imagesize_w(double, double, double, double);
long _far _cdecl _imagesize_wxy(const struct _wxycoord _far *, const struct _wxycoord _far *);

/*	no return value */
void _far _cdecl _putimage_w(double, double ,char _huge * ,short);


/* FONTS */

#ifndef _FONTINFO_DEFINED
/* structure for _getfontinfo() */
struct _fontinfo {
	int	type;		/* b0 set = vector,clear = bit map	*/
	int	ascent;		/* pix dist from top to baseline	*/
	int	pixwidth;	/* character width in pixels, 0=prop	*/
	int	pixheight;	/* character height in pixels		*/
	int	avgwidth;	/* average character width in pixels	*/
	char	filename[81];	/* file name including path		*/
	char	facename[32];	/* font name				*/
};
#define _FONTINFO_DEFINED
#endif


/* font function prototypes */
short	_far _cdecl	_registerfonts( const unsigned char _far *);
void	_far _cdecl	_unregisterfonts( void );
short	_far _cdecl	_setfont( const unsigned char _far * );
short	_far _cdecl	_getfontinfo( struct _fontinfo _far * );
void	_far _cdecl	_outgtext( const unsigned char _far * );
short	_far _cdecl	_getgtextextent( const unsigned char _far * );
struct xycoord _far _cdecl _setgtextvector( short, short );
struct xycoord _far _cdecl _getgtextvector(void);

/* restore default packing */
#pragma pack()

⌨️ 快捷键说明

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