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

📄 graphics.h

📁 测试STN LCM产品
💻 H
字号:
// --------------------- Header file for graphics.c ----------------------------
#ifndef __GRAPHICS__
#define __GRAPHICS__

#define RealLine	0x00	// Real line
#define BrokenLine1	0x01	// Broken line(101010)
#define BrokenLine0	0x02	// Broken line(010101)

// ----------------------------- Global Variables ------------------------------
bit iPoint = 1;				// Black Point or White Point(1: ON; 0: OFF)
uint8 LineStyle = RealLine;	// The Style of Line drown by LineH/LineV
// -----------------------------------------------------------------------------

// --------------------------- Functions Declaration ---------------------------
// Display a picture on the specific position of the Screen
void disp_image(uint8 code *ptrImage, uint8 StartP, StartC);
// Display an image on LCD upleft corner
void disp_upleft(uint8 code *ptrImage);
// Display an image on LCD screen center
void disp_center(uint8 code *ptrImage);
// Tile screen with a small picture
void gTile(uint8 code *ptrImage);
// Draw a rectangle using the two given points
void disp_frame(uint8 X0,Y0,X1,Y1);
#ifdef LCD_READABLE
	// Get the status of a point at specific coordinate
	uint8 ReadPoint(uint8 Xpoint, uint8 Ypoint);
	// Draw a point at specific coordinate
	void Point(uint8 Xpoint, uint8 Ypoint);
	// Reverse the status of a point
	void RvsPoint(uint8 Xpoint, uint8 Ypoint);
	// Reverse the status of an area
	void RvsArea(tRect Area);
	// Draw a straint line
	//void Line(uint8 X1, uint8 Y1, uint8 X2, uint8 Y2);
	// Draw a horizontal line
	void LineH(uint8 X0, uint8 Y0, uint8 Length);
	// Draw a Virtical line
	void LineV(uint8 X0, uint8 Y0, uint8 Height);
	/* -----------------------------------------------------------------------
	 Drawing a circle with the equation: (X-Ox)^2+(Y-Oy)^2 = Rx^2
	 Original Coder: XiaoQi
	 Modifier: Seeseawe
	 Release Date: 2007-3-2
	// -----------------------------------------------------------------------*/
	void Circle(uint8 Ox, uint8 Oy, uint8 Rx);
	// Draw a table with specific rows and cols
	void Table(uint8 Rows, Cols, width, height);
	// Scan Vertical line
	void ScanV(uint16 Tscan);
	// Scan Horizontal line
	void ScanH(uint16 Tscan);
	// Draw a Rectangle
	void Rectangle(tRect Points);
	// Show x concentric rectangles
	void frameShow(uint8 xframes);
	// Render 8 dots on vertical direction
	void RenderV8(uint8 dByte, xPos, yPos);
	// Display a picture anywhere(exactly a ponit)
	void PictureAnywhere(uint8 code *ptrImage, uint8 xPos, yPos);
#endif
// Draw a fullscreen rectangle
void RectFullscreen(void);
// -----------------------------------------------------------------------------

#include "graphics.c"
#endif

⌨️ 快捷键说明

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