video.h

来自「DOS下利用VESA实现高分辨率、16bit色显示并输出汉字」· C头文件 代码 · 共 46 行

H
46
字号
#ifndef __video
#define __video
#include <stdio.h>
#include <conio.h>
#include <dos.h>
#include <math.h>
#include <stdlib.h>

#define RGB(r,g,b) (((r)/8)*2048+((g)/4)*32+(b)/8)

int  Graph_Mode(int iMode);      //Set Graph Mode
int  InitGraph();
void CloseGraph();
void VideoPage(int iPageNumber); //Select Page Number of Video Memory
void PaintScreen();		 //Paint the whole screen... Beautiful!!
void ClearDevice(int iBackColor);//Clear whole screen to iBackColor
void ClearToBlack();		 //Set all screen to black
void SetPoint(int x, int y, unsigned int iColor);  //iColor in RGB format
int MemLine(int startx, int starty, int endx, int endy, unsigned int color);
void MemBox(int startx, int starty, int endx, int endy, unsigned int color);
void MemFillBox(int startx, int starty, int endx, int endy, unsigned color);
void MemCircle(int x_center, int y_center, int radius, unsigned int color);  //Draw Circle
void plot_circle(int x, int y, int x_center, int y_center, unsigned int color);  //Internal use by MemCircle
void MemFillCircle(int x, int y, int r, unsigned int color);

int OpenEFont();
void CloseEFont();
int OpenCFont();
void CloseCFont();

void DrawEnglish(int x, int y, int c, int iColor);
void DrawEnglishString(int x, int y, char *text, int iColor);
void DrawChinese(int x, int y, int c1, int c2, int iColor);
void DrawChineseString(int x, int y, unsigned char *text, int iColor);

///////////Function added by request of client
unsigned int GetPoint(int x, int y);
int GetImageSize(int iStartX, int iStartY, int iEndX, int iEndY);
void GetImage(int iStartX, int iStartY, int iEndX, int iEndY, int far *Buffer);
void PutImage(int iStartX, int iStartY, int far *Buffer);
void SetPointXOR(int x, int y, unsigned int iColor);
void MemLineXOR(int startx, int starty, int endx, int endy, unsigned int color);
//unsigned long VIDDID(int iBus, int iDevice);

#endif

⌨️ 快捷键说明

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