1 / 13

WinBGIm

WinBGIm. 授課: ANT 日期: 2016/3/3. 使用 WinBGIm project. 標頭檔. #include"graphics.h". I nitgraph function. void initgraph(int *graphdriver, int *graphmode, char *pathtodriver);. graphmode. * graphmode 是整數,用於指定初始圖形模式 如果 graphdriver = DETECT , graphmode 會被設定為最高解析度,以便檢測驅動.

burrd
Download Presentation

WinBGIm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. WinBGIm 授課:ANT 日期:2016/3/3

  2. 使用WinBGIm project

  3. 標頭檔 • #include"graphics.h"

  4. Initgraphfunction void initgraph(int *graphdriver, int *graphmode, char *pathtodriver);

  5. graphmode * graphmode是整數,用於指定初始圖形模式 如果graphdriver=DETECT, graphmode會被設定為最高解析度,以便檢測驅動

  6. getmaxx, getmaxyfunction • 返回最大的X,Y座標 • maxx = getmaxx(); • maxy = getmaxy();

  7. line function • void line(int x1, int y1, int x2, int y2); • line(100, 100, 200, 200);

  8. 設定顏色 setcolor

  9. getx, getx 取得目前x,y的座標

  10. Reference • http://www.cs.colorado.edu/~main/bgi/doc/initgraph.html • http://www.programmingsimplified.com/c/graphics.h

  11. Lab 寫一個程式,讓畫面顯示你自己的學號後兩碼

  12. 說明 int gdriver = DETECT Int gmode Char *pathtodriver = “”

  13. homework

More Related