?? display.h
字號:
#ifndef __DISPLAY_H__#define __DISPLAY_H__#include "figure.h"#define FONTSIZE_SMALL 1#define FONTSIZE_MIDDLE 2#define FONTSIZE_BIG 3#define FONT_TRANSPARENT 4 //透明背景#define FONT_BLACKBK 8 //黑底白字#define GRAPH_MODE_NORMAL 0x00 //普通繪圖模式#define GRAPH_MODE_OR 0x10 //繪圖模式 或#define GRAPH_MODE_AND 0x20 //繪圖模式 與#define GRAPH_MODE_XOR 0x30 //繪圖模式 異或#define COLOR_BLACK 0 //黑色前景色#define COLOR_WHITE 0xffffffff //白色前景色#define GRAPH_ARC_BACKWARD 0 //逆時(shí)針畫圓#define GRAPH_ARC_FORWARD 1 //順時(shí)針畫圓#define GRAPH_3D_UP 0 //突起的3D矩形框#define GRAPH_3D_DOWN 1 //凹陷的3D矩形框typedef struct tagBITMAPFILEHEADER { U32 bfSize; U32 bfReserved12; U32 bfOffBits;} BITMAPFILEHEADER, *PBITMAPFILEHEADER;typedef struct tagBITMAPINFOHEADER { U32 biSize; U32 biWidth; U32 biHeight; U16 biPlanes; U16 biBitCount; U32 biCompression; U32 biSizeImage; U32 biXPelsPerMeter; U32 biYPelsPerMeter; U32 biClrUsed; U32 biClrImportant;} BITMAPINFOHEADER;//定義繪圖設(shè)備結(jié)構(gòu)typedef struct{ int DrawPointx; int DrawPointy; //繪圖所使用的坐標(biāo)點(diǎn) int PenWidth; //畫筆寬度 U32 PenMode; //畫筆模式 U32 PenColor; //畫筆的顏色 int DrawOrgx; //繪圖的坐標(biāo)原點(diǎn)位置 int DrawOrgy; int DrawRangex; //繪圖的區(qū)域范圍 int DrawRangey; U8 bUpdataBuffer; //是否更新后臺緩沖區(qū)及顯示 U32 Fontcolor; //字符顏色}DC,*PDC;void initOSDC();PDC CreateDC();void DestoryDC(PDC pdc);void SetPixel(PDC pdc, int x, int y, U32 color);void SetPixelOR(PDC pdc,int x, int y, U32 color);void SetPixelAND(PDC pdc,int x, int y, U32 color);void SetPixelXOR(PDC pdc, int x, int y, U32 color);int GetFontHeight(U8 fnt);void TextOut(PDC pdc,int x, int y, U16 *ch, U8 bunicode, U8 fnt); //顯示文字void TextOutRect(PDC pdc, structRECT* prect, U16* ch, U8 bunicode, U8 fnt); //在指定矩形的范圍內(nèi)顯示文字void MoveTo(PDC pdc, int x, int y);void LineTo(PDC pdc, int x, int y);void DrawRectFrame(PDC pdc, int left,int top ,int right, int bottom);void DrawRectFrame2(PDC pdc, structRECT rect);void FillRect(PDC pdc, int left,int top ,int right, int bottom,U32 DrawMode, U32 color);void FillRect2(PDC pdc, structRECT rect,U32 DrawMode, U32 color);void ClearScreen();U8 SetPenWidth(PDC pdc, U8 width);U32 SetPenMode(PDC pdc, U32 mode);void Circle(PDC pdc, int x0, int y0, int r);int Getdelta1(int x0,int y0, int R);int Getdelta2(int x0,int y0, int R);void ArcTo1(PDC pdc, int x1, int y1, int R);void ArcTo2(PDC pdc, int x1, int y1, int R);void ArcTo(PDC pdc, int x1, int y1, U8 arctype, int R);//void ArcTo(int x1,int y1, U8 arctype, int cenx,int ceny);U8 SetLCDUpdata(PDC pdc, U8 isUpdata);void Draw3DRect(PDC pdc, int left,int top, int right, int botton, U32 style);void Draw3DRect2(PDC pdc, structRECT rect,U32 style);U8 GetPenWidth(PDC pdc);
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -