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

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

?? graphics.c

?? c語言開發方面的經典問題,包括源代碼.c語言開發所要注意的問題,以及在嵌入式等各方面的應用
?? C
字號:
/* * File: graphics.c * Version: 1.0 * Last modified on Thu Sep 16 09:34:19 1993 by eroberts * ----------------------------------------------------- * This file provides a fully standard implementation of the * graphics.h interface that generates a PostScript file, * suitable for printing.  None of the operations in the * extended graphics interface are supported.  PostScript is * a registered trademark of Adobe Systems Incorporated. *//* * General implementation notes * ---------------------------- * This implementation of the graphics.h interface does not * actually do any display but instead writes a PostScript * file containing commands that would generate the picture. * The advantage of this implementation is portability, since * it contains no code that depends on graphics primitives * for a particular platform. * * The code for this implementation is for the most part * straightforward, because all of the graphics primitives * have simple PostScript equivalents.  The only hard part * is making sure that the end of the file is correct when * the file is closed, usually via the exit call.  To print * the page, the showpage command must occur at the end of * the file, but the graphics package does not get control * at that point.  To avoid the problem, each call to this * package writes a legal trailer to the file.  Thus, the * invariant after each call to any of these functions is * that the PostScript file is complete.  Before writing * new data, these functions back up the file pointer over * the old trailer and begin rewriting from that point. */#include <stdio.h>#include <math.h>#include "genlib.h"#include "graphics.h"/* * Constants: WindowHeight, WindowWidth * ------------------------------------ * These constants are the values returned by GetWindowHeight * and GetWindowWidth.  The assumption here is that output is * being directed to an 8.5 x 11 page. */#define WindowHeight 11.0#define WindowWidth   8.5/* * Constant: PSFileName * -------------------- * The name of the PostScript output file. */#define PSFileName "graphics.ps"/* * Private variables * ----------------- * initialized    Set to TRUE when InitGraphics is called. * psfile         The file stream used for PostScript. * cx, cy         The current x, y positions. * nextWrite      The file index for the next PostScript *                command (see the general notes above). */static bool initialized = FALSE;static FILE *psfile;static double cx, cy;static long nextWrite;/* Private function prototypes */static void InitCheck(void);static void WritePostScriptHeader(void);static void WritePostScriptTrailer(void);static void ResetFilePointer(void);static double Pts(double inches);static double Radians(double degrees);/* Public functions */void InitGraphics(void){    if (initialized) fclose(psfile);    psfile = fopen(PSFileName, "w");    WritePostScriptHeader();    WritePostScriptTrailer();    cx = cy = 0;    initialized = TRUE;}void MovePen(double x, double y){    InitCheck();    cx = x;    cy = y;}void DrawLine(double dx, double dy){    InitCheck();    ResetFilePointer();    fprintf(psfile, "newpath %g %g moveto", Pts(cx), Pts(cy));    fprintf(psfile, " %g %g rlineto stroke\n", Pts(dx), Pts(dy));    cx += dx;    cy += dy;    WritePostScriptTrailer();}void DrawArc(double r, double start, double sweep){    double x, y;    InitCheck();    x = cx + r * cos(Radians(start + 180));    y = cy + r * sin(Radians(start + 180));    ResetFilePointer();    fprintf(psfile, "newpath %g %g %g", Pts(x), Pts(y), Pts(r));    fprintf(psfile, " %g %g", start, start + sweep);    fprintf(psfile, " %s stroke\n", (sweep < 0) ? "arcn" : "arc");    WritePostScriptTrailer();    cx = x + r * cos(Radians(start + sweep));    cy = y + r * sin(Radians(start + sweep));}double GetWindowWidth(void){    InitCheck();    return (WindowWidth);}double GetWindowHeight(void){    InitCheck();    return (WindowHeight);}double GetCurrentX(void){    InitCheck();    return (cx);}double GetCurrentY(void){    InitCheck();    return (cy);}/* Private functions */static void InitCheck(void){    if (!initialized) Error("InitGraphics has not been called");}static void WritePostScriptHeader(void){    fprintf(psfile, "%%!PS-Adobe-1.0\n");    fprintf(psfile, "%%%%Title: graphics window\n");    fprintf(psfile, "%%%%Pages: 1\n");    fprintf(psfile, "%%%%EndComments\n");}static void WritePostScriptTrailer(void){    nextWrite = ftell(psfile);    fprintf(psfile, "showpage\n");}static void ResetFilePointer(void){    fseek(psfile, nextWrite, 0);}static double Pts(double inches){    return (72 * inches);}static double Radians(double degrees){    return (degrees / 180 * 3.1415926535);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色偷偷一区二区三区| 中文一区在线播放| 久久美女高清视频| 亚洲一区二区欧美日韩| 韩国视频一区二区| 欧美日韩一区在线| 亚洲少妇30p| 国产一区欧美日韩| 欧美视频自拍偷拍| 亚洲欧美激情小说另类| 国产综合久久久久久鬼色| 欧美日韩mp4| 最新国产成人在线观看| 国产精品1区2区3区| 日韩欧美一级片| 午夜婷婷国产麻豆精品| 色999日韩国产欧美一区二区| 久久久久久亚洲综合| 激情五月婷婷综合| 日韩一区二区免费在线电影| 亚洲成国产人片在线观看| 97久久精品人人做人人爽50路| 国产亚洲综合av| 国产一区二区三区蝌蚪| 欧美成人vr18sexvr| 秋霞电影一区二区| 91精品国产入口在线| 婷婷久久综合九色综合伊人色| 欧美日韩国产区一| 亚洲大片精品永久免费| 欧美人牲a欧美精品| 亚洲一区二区三区四区在线观看| 91蜜桃免费观看视频| 亚洲三级电影网站| 在线观看中文字幕不卡| 亚洲电影你懂得| 欧美精品 日韩| 奇米综合一区二区三区精品视频| 欧美剧在线免费观看网站| 亚洲一区二区三区国产| 91麻豆精品国产综合久久久久久| 五月婷婷久久丁香| 日韩亚洲电影在线| 国产在线精品免费| 国产日产欧美一区| av电影在线观看不卡| 亚洲综合久久av| 日韩一级二级三级| 国产一区二区在线影院| 国产精品久久久久影院色老大| 成人午夜av电影| 亚洲免费在线看| 777奇米四色成人影色区| 久久国内精品视频| 中文字幕在线观看不卡| 91麻豆福利精品推荐| 日日夜夜一区二区| 久久精品一区二区| 日本韩国欧美国产| 久久国产夜色精品鲁鲁99| 中文字幕av免费专区久久| 欧美亚洲高清一区二区三区不卡| 日本中文一区二区三区| 欧美高清在线视频| 欧美性xxxxxxxx| 久久91精品国产91久久小草| 国产精品三级在线观看| 欧美乱妇23p| 国产凹凸在线观看一区二区| 一区二区三区不卡视频在线观看| 欧美成人精品高清在线播放| av资源网一区| 精品一区二区三区的国产在线播放| 中文字幕久久午夜不卡| 777奇米四色成人影色区| 成人av资源站| 狠狠色综合日日| 亚洲一区在线播放| 国产精品亲子乱子伦xxxx裸| 欧美日韩精品系列| 成av人片一区二区| 久久成人免费网| 午夜一区二区三区视频| 中文字幕在线播放不卡一区| 26uuu久久天堂性欧美| 精品婷婷伊人一区三区三| 粉嫩av一区二区三区在线播放 | 精品视频免费看| 极品美女销魂一区二区三区| 亚洲午夜激情网页| 亚洲欧美日韩人成在线播放| 2022国产精品视频| 欧美日韩在线播放一区| 91美女福利视频| 国产精品18久久久久久久网站| 蜜臀av性久久久久蜜臀aⅴ | 美女视频一区在线观看| 亚洲精品视频在线观看网站| 欧美激情在线观看视频免费| 日韩一区二区三区视频在线 | 99久久婷婷国产| 国产一区啦啦啦在线观看| 久久国产精品99久久人人澡| 偷拍亚洲欧洲综合| 亚洲高清久久久| 一区二区三区国产精品| 亚洲欧美欧美一区二区三区| 国产精品剧情在线亚洲| 国产日韩亚洲欧美综合| 精品国精品国产| 欧美精品一区二区三区蜜臀| 日韩一区二区在线观看| 欧美成人女星排行榜| 日韩三级视频中文字幕| 91精品一区二区三区久久久久久 | 一区二区三区不卡视频 | 久久久久国产精品人| 日韩女优电影在线观看| 日韩三级.com| 精品精品欲导航| 久久综合999| 国产日产欧美一区二区三区| 国产精品久久久久永久免费观看 | 国产午夜亚洲精品不卡| 久久网站最新地址| 欧美国产日产图区| 亚洲免费观看视频| 五月激情六月综合| 久久99久久久久久久久久久| 久久精品国产亚洲5555| 国产麻豆精品95视频| 成人精品鲁一区一区二区| 色中色一区二区| 欧美日韩在线三级| 精品欧美一区二区久久| 国产精品视频yy9299一区| 一区二区三区丝袜| 久久国产精品99久久人人澡| 国产不卡视频一区二区三区| 在线观看一区不卡| 日韩视频一区二区三区在线播放| 久久久高清一区二区三区| 国产精品电影一区二区| 香港成人在线视频| 国产91精品露脸国语对白| 欧美主播一区二区三区美女| 精品国产一区二区在线观看| 中文字幕一区二区三区在线播放 | 国产精品久久久久久久久免费丝袜| 国产精品色眯眯| 石原莉奈一区二区三区在线观看| 狠狠色丁香九九婷婷综合五月| 99这里只有久久精品视频| 欧美日本在线视频| 久久久久久久久免费| 亚洲韩国一区二区三区| 国产成人综合视频| 欧美体内she精高潮| 久久久久久久av麻豆果冻| 一区二区三区欧美激情| 国产大陆精品国产| 日韩一区二区免费视频| 综合网在线视频| 国产在线一区观看| 欧美日韩二区三区| 自拍偷拍亚洲激情| 国产麻豆欧美日韩一区| 欧美日韩精品欧美日韩精品 | 91网站视频在线观看| 91精品国产91久久久久久最新毛片 | 天天射综合影视| 99久久国产综合精品色伊| 久久天堂av综合合色蜜桃网| 亚洲国产精品久久人人爱蜜臀| 国产99精品视频| 日韩免费高清视频| 日韩精品免费视频人成| 色哟哟亚洲精品| 国产精品天天摸av网| 九一九一国产精品| 欧美一区二区在线视频| 亚洲第一综合色| 欧美在线观看视频在线| 亚洲你懂的在线视频| 99九九99九九九视频精品| 国产无遮挡一区二区三区毛片日本| 日韩福利视频网| 欧美日韩午夜精品| 亚洲18色成人| 欧美三级中文字幕| 亚洲一级二级三级在线免费观看| www.日韩av| 国产精品无人区| 成人手机电影网| 中文字幕一区二区不卡| 成人av电影在线| 亚洲欧美激情视频在线观看一区二区三区 | 成人黄色在线网站| 国产欧美一区二区在线| 国产福利一区二区三区视频在线 |