亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? graphics.c

?? The art and science of c_source code!
?? C
字號:
/* * File: graphics.c * Version: 2.0 * Last modified on Tue Sep 20 09:35:42 1994 by eroberts * ----------------------------------------------------- * This file implements the graphics.h interface for the * DOS/Borland C platform.  This version implements only the * standard graphics library; the extensions in extgraph.c are * implemented only for the Windows version. * * The DOS graphics library needs to know where the device * driver files are located.  In the standard install script, * that information is inserted in the Makefile so that no * additional installer interaction is required. */#include <stdio.h>#include <graphics.h>#include <math.h>#include "genlib.h"#include "graphics.h"#ifndef BCPATH#error graphics.c requires that the Makefile define BCPATH#endif/* * Other constants * --------------- * PixelsPerInch -- Device resolution (not obtainable directly) * Epsilon       -- Small arithmetic offset to reduce aliasing/banding * Pi            -- Mathematical constant pi */#define PixelsPerInch 72#define Epsilon       0.00000000001#define Pi            3.1415926535/* * Global variables * ---------------- * initialized  -- TRUE if initialization has been done * pixelWidth   -- Width of screen in pixels * pixelHeight  -- Height of screen in pixels */static bool initialized = FALSE;static int pixelWidth, pixelHeight;/* Private function prototypes */static double Radians(double degrees);static int Round(double x);static double InchesX(int x);static double InchesY(int y);static int PixelsX(double x);static int PixelsY(double y);static int ScaleX(double x);static int ScaleY(double y);/* Exported entries */void InitGraphics(void){    int gdriver, gmode, ec;    if (!initialized) {        gdriver = DETECT;        initgraph(&gdriver, &gmode, BCPATH "\\BGI");        ec = graphresult();        if (ec != grOk) {            printf("Error: %s\n", grapherrormsg(ec));            (void) getchar();            exit(1);        }        pixelWidth = getmaxx();        pixelHeight = getmaxy();        initialized = TRUE;    }    cleardevice();}void MovePen(double x, double y){    moveto(ScaleX(x), ScaleY(y));}void DrawLine(double dx, double dy){    linerel(PixelsX(dx), -PixelsY(dy));}void DrawArc(double r, double start, double sweep){    int kstart, ksweep, kend;    double cx, cy;    kstart = Round(start);    ksweep = Round(sweep);    if (ksweep < 0) {        kstart += ksweep;        ksweep = -ksweep;    }    if (kstart < 0) {        kstart = 360 - (-kstart % 360);    } else {        kstart %= 360;    }    if (ksweep >= 360) {        kstart = 0;        kend = 360;    } else {        kend = (kstart + ksweep) % 360;    }    cx = GetCurrentX() + r * cos(Radians(start + 180));    cy = GetCurrentY() + r * sin(Radians(start + 180));    arc(ScaleX(cx), ScaleY(cy), kstart, kend, PixelsX(r));    MovePen(cx + r * cos(Radians(start + sweep)),            cy + r * sin(Radians(start + sweep)));}double GetWindowWidth(void){    return (InchesX(pixelWidth));}double GetWindowHeight(void){    return (InchesY(pixelHeight));}double GetCurrentX(void){    return (InchesX(getx()));}double GetCurrentY(void){    return (InchesY(pixelHeight - gety()));}/* * Utility functions * ----------------- * This section contains several extremely short utility functions * that improve the readability of the code. *//* * Function: Radians * Usage: radians = Radians(degrees); * ---------------------------------- * This functions convert an angle in degrees to radians. */static double Radians(double degrees){    return (degrees * Pi / 180);}/* * Function: Round * Usage: n = Round(x); * -------------------- * This function rounds a double to the nearest integer. */static int Round(double x){    return ((int) floor(x + 0.5));}/* * Functions: InchesX, InchesY * Usage: inches = InchesX(pixels); *        inches = InchesY(pixels); * -------------------------------- * These functions convert distances measured in pixels to inches. * Because the resolution may not be uniform in the horizontal and * vertical directions, the coordinates are treated separately. */static double InchesX(int x){    return ((double) x / PixelsPerInch);}static double InchesY(int y){    return ((double) y / PixelsPerInch);}/* * Functions: PixelsX, PixelsY * Usage: pixels = PixelsX(inches); *        pixels = PixelsY(inches); * -------------------------------- * These functions convert distances measured in inches to pixels. */static int PixelsX(double x){    return (Round(x * PixelsPerInch + Epsilon));}static int PixelsY(double y){    return (Round(y * PixelsPerInch + Epsilon));}/* * Functions: ScaleX, ScaleY * Usage: pixels = ScaleX(inches); *        pixels = ScaleY(inches); * -------------------------------- * These functions are like PixelsX and PixelsY but convert coordinates * rather than lengths.  The difference is that y-coordinate values must * be inverted top to bottom to support the cartesian coordinates of * the graphics.h model. */static int ScaleX(double x){    return (PixelsX(x));}static int ScaleY(double y){    return (pixelHeight - PixelsY(y));}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产制服丝袜高跟| 成人美女视频在线看| 国产精品福利一区二区三区| 久久人人97超碰com| 26uuu色噜噜精品一区二区| 欧美一区二区免费观在线| 日韩亚洲欧美高清| 久久先锋资源网| 国产精品久久久爽爽爽麻豆色哟哟| 国产日韩欧美不卡| 亚洲欧洲三级电影| 亚洲国产一区二区三区 | 欧美日韩一区二区三区视频| 欧美三级日韩三级| 日韩欧美中文字幕制服| 精品国产乱码久久久久久影片| 久久综合色天天久久综合图片| 国产亚洲欧美日韩在线一区| 国产精品久线观看视频| 亚洲影院理伦片| 蜜桃视频在线一区| 丰满亚洲少妇av| 欧美亚洲国产bt| 亚洲精品一区二区在线观看| 中文字幕欧美激情| 午夜亚洲福利老司机| 久草热8精品视频在线观看| 丁香桃色午夜亚洲一区二区三区 | 亚洲欧美日韩国产一区二区三区| 一区二区三区在线免费视频| 日本不卡一区二区三区| 国产成人精品免费视频网站| 色综合激情久久| 精品国产成人系列| 亚洲九九爱视频| 国产一区二区三区国产| 欧美在线观看一区| 国产精品三级久久久久三级| 水野朝阳av一区二区三区| 国产91丝袜在线18| 欧美一区二区福利视频| 17c精品麻豆一区二区免费| 久久精品国产精品青草| 91日韩在线专区| 国产亚洲欧美一区在线观看| 一区二区三区中文字幕电影| 国产在线播精品第三| 91传媒视频在线播放| 国产日韩三级在线| 日韩黄色小视频| 国产精品一区二区三区99| 欧美一区二区大片| 亚洲成人午夜电影| 91亚洲精品乱码久久久久久蜜桃 | 国产精品久久久久三级| 视频在线在亚洲| 欧美色爱综合网| 一区在线播放视频| 国产一区二区在线视频| 7799精品视频| 午夜精品一区在线观看| 欧美午夜精品一区二区三区| 中文字幕一区免费在线观看| 国产成人在线看| 精品国产精品网麻豆系列| 丝袜美腿亚洲一区二区图片| 欧美视频一区二区三区四区| 国产精品电影一区二区| 成人av网站在线观看免费| 国产女人18毛片水真多成人如厕 | 欧美日韩一区不卡| 亚洲免费成人av| 色欲综合视频天天天| 一区二区三区四区精品在线视频 | 国产午夜一区二区三区| 国产高清精品在线| 欧美高清在线精品一区| 丁香网亚洲国际| 国产精品久久久久久久久快鸭| 成人永久aaa| 中文字幕一区二| 在线观看成人免费视频| 亚洲一区在线播放| 欧美精品日日鲁夜夜添| 青青草原综合久久大伊人精品| 欧美精品久久99久久在免费线 | 日韩伦理免费电影| 色综合中文综合网| 99久久综合99久久综合网站| 亚洲欧洲精品一区二区三区不卡| 99久久夜色精品国产网站| 一区二区中文视频| 欧美剧情电影在线观看完整版免费励志电影| 亚洲欧美精品午睡沙发| 欧美日韩一区二区在线观看 | 国产亚洲欧美在线| 色婷婷av一区二区| 免费成人av在线| 国产欧美日韩激情| 欧美日韩精品一二三区| 国产一区在线视频| 亚洲免费观看高清| 日韩一级完整毛片| www.亚洲色图| 免费观看成人av| 国产精品久久久久久久久动漫| 欧美色图免费看| 国产91精品一区二区麻豆亚洲| 一区二区三区日韩精品| 日韩精品一区二区三区视频在线观看| 成人免费毛片app| 日本不卡1234视频| 亚洲免费大片在线观看| 欧美tickling挠脚心丨vk| 一本色道久久综合精品竹菊| 日本女人一区二区三区| 亚洲三级理论片| 久久久久9999亚洲精品| 欧美色图激情小说| 99久久精品免费精品国产| 免费国产亚洲视频| 亚洲精品免费电影| 国产午夜精品一区二区三区嫩草 | 久久久午夜电影| 4438x成人网最大色成网站| 成人午夜av影视| 精品写真视频在线观看| 性做久久久久久| 亚洲人成网站在线| 中文字幕欧美激情一区| 日韩欧美久久久| 欧美精品精品一区| 欧美中文一区二区三区| www.一区二区| 成人黄色小视频在线观看| 精品一区二区影视| 久久精品国产精品亚洲红杏| 丝袜a∨在线一区二区三区不卡 | 欧美精品vⅰdeose4hd| 一本久久精品一区二区| 成人福利视频在线看| 国内精品自线一区二区三区视频| 午夜亚洲国产au精品一区二区| 亚洲精品久久久久久国产精华液| 久久久久88色偷偷免费| 亚洲精品一线二线三线无人区| 5858s免费视频成人| 欧美精品色一区二区三区| 欧美午夜精品免费| 欧美日韩综合在线免费观看| 日本高清视频一区二区| 91视频.com| 欧美日韩中文字幕精品| 欧美性色欧美a在线播放| 欧美午夜视频网站| 欧美日韩在线电影| 7878成人国产在线观看| 日韩免费观看高清完整版| 欧美xxxxxxxx| 久久亚洲二区三区| 国产日本欧洲亚洲| 一区二区中文视频| 亚洲一区精品在线| 日韩成人一级片| 国产精品一区二区三区99| 成人一级片在线观看| 91视频观看视频| 欧美福利视频导航| 日韩视频免费观看高清完整版在线观看 | 亚洲欧美国产77777| 亚洲永久精品国产| 麻豆91精品视频| 成人一道本在线| 在线看日韩精品电影| 精品日韩一区二区三区免费视频| 精品电影一区二区三区| 中文字幕不卡的av| 午夜影视日本亚洲欧洲精品| 美女一区二区视频| 成人sese在线| 7777精品伊人久久久大香线蕉| 久久久久久亚洲综合| 日韩伦理电影网| 另类欧美日韩国产在线| 99riav一区二区三区| 日韩欧美国产一区在线观看| 国产精品免费看片| 日韩电影网1区2区| 成人91在线观看| 日韩欧美黄色影院| 亚洲在线一区二区三区| 久久爱www久久做| 91免费版在线| 国产亚洲精品中文字幕| 亚洲18女电影在线观看| aaa欧美日韩| 日韩免费高清av| 亚洲高清中文字幕| 不卡的看片网站| 久久综合一区二区|