140 likes | 144 Views
WinBGIm. 授課: ANT 日期: 2019/3/5. 使用 WinBGIm project. 標頭檔. #include"graphics.h". I nitgraph function. void initgraph(int *graphdriver, int *graphmode, char *pathtodriver);. graphmode. * graphmode 是整數,用於指定初始圖形模式 如果 graphdriver = DETECT , graphmode 會被設定為最高解析度,以便檢測驅動.
E N D
WinBGIm 授課:ANT 日期:2019/3/5
標頭檔 • #include"graphics.h"
Initgraphfunction void initgraph(int *graphdriver, int *graphmode, char *pathtodriver);
graphmode * graphmode是整數,用於指定初始圖形模式 如果graphdriver=DETECT, graphmode會被設定為最高解析度,以便檢測驅動
getmaxx, getmaxyfunction • 返回最大的X,Y座標 • maxx = getmaxx(); • maxy = getmaxy();
line function • void line(int x1, int y1, int x2, int y2); • line(100, 100, 200, 200);
getx, getx 取得目前x,y的座標
Reference • http://www.cs.colorado.edu/~main/bgi/doc/initgraph.html • http://www.programmingsimplified.com/c/graphics.h
說明 int gdriver = DETECT; int gmode; initgraph(&gdriver,&gmode,"");
Lab 寫一個程式,讓畫面顯示你自己的名字
OpenCV http://monkeycoding.com/?page_id=12