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

📄 device.h

📁 嵌入式图形处理系统,emgui嵌入式图形处理系统,
💻 H
字号:
/*
 *  Screen Device Layer
 *
 *
 *  COPYRIGHT (c) 2001 - 2010.
 *  emTech System Corporation.
 *
 *  The license and distribution terms for this file may be
 *  found in found in the file LICENSE.
 */

/*	Huangf emcore@263.net
 */

#ifndef		__DEVICE_h
#define		__DEVICE_h

#define 	GRARC								0x0001	/* arc*/
#define	 	GROUTLINE							0x0002
#define 	GRARCOUTLINE						0x0003	/* arc + outline*/
#define 	GRPIE								0x0004	/* pie (filled)*/
#define 	GRELLIPSE							0x0008	/* ellipse outline*/
#define 	GRELLIPSEFILL						0x0010	/* ellipse filled*/

#define 	GRLEFTTOP							0x10
#define 	GRLEFTBOTTOM						0x20
#define		GRRIGHTTOP							0x40
#define 	GRRIGHTBOTTOM						0x80		


struct _emscreendevice;
typedef struct _emscreendevice *PSD;

typedef struct _emscreendevice {
	PSD			(*Open)(PSD psd);
	void 		(*Close)(PSD psd);
	void		(*DrawPixel)(unsigned short *base, int x, int y, unsigned char c, int xorm);
	int			(*ReadPixel)(unsigned short *base, int x, int y);
	int			(*DrawHorzLine)(unsigned short *base, int x1, int y, int x2, unsigned char c, int xorm);
	int			(*DrawVertLine)(unsigned short *base, int x, int y1, int y2, unsigned char c, int mode);
	int			(*FillRect)(unsigned short *base, int x1, int y1, int x2, int y2, int c); 
	int			(*DrawBitmap)(unsigned short *base, int x0, int y0, int w, int h, unsigned char *pcc, int mode); 
	void		(*SwitchDrawArea)(void *base);
	void		(*SaveDrawArea)(char *, char *, int, int, int, int);
	void		(*RestoreDrawArea)(char *, char *, int, int, int, int);
	int			(*CalcMemGCSize)(int, int, int, int);
} SCREENDEVICE;

int			ScreenOpen();
void		ScreenClose();
void 		DrawPixel(
				unsigned short *base,
				int	x,
				int	y,
				unsigned char c,
				int mode
);

int			ReadPixel(
				unsigned short *base,
				int x,
				int y
);

int			DrawHorzLine(
				unsigned short *base,
				int x1,
				int y,
				int x2,
				unsigned char c,
				int mode
);

int 		DrawVertLine(
				unsigned short *base,
				int x,
				int y1,
				int y2,
				const char c,
				int mode
);

int 		FillRect(
				unsigned short *base,
				int x1,
				int y1,
				int x2, 
				int y2,
				int c
);

int 		DrawBitmap(
				unsigned short *base,
				int x0,
				int y0,
				int width,
				int height,
				unsigned char *pcc,
				int mode
);

void SwitchDrawArea(
	void *drawArea
);

int CalcMemGCSize(
	int l,
	int t,
	int r,
	int b
);

void RestoreDrawArea(
	void *drawarea,
	void *memory,
	int	 l,
	int  t,
	int  r,
	int  b
);

void SaveDrawArea(
	void *drawarea,
	void *memory,
	int	 l,
	int  t,
	int  r,
	int  b
);

#endif

⌨️ 快捷键说明

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