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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? graphics.c

?? 國外經(jīng)典教材《程序設(shè)計抽象思想—C語言描述》一書中的關(guān)鍵性庫文件
?? C
字號:
/* * File: graphics.c * Last modified on Thu Sep 16 09:34:19 1993 by eroberts * ----------------------------------------------------- * Implements the graphics.h interface to generate a * PostScript file.  PostScript is a registered trademark * of the 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);}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区免费观看视频| 在线观看视频欧美| 一二三区精品福利视频| 欧美不卡一区二区三区四区| 99re66热这里只有精品3直播| 日本欧美加勒比视频| 亚洲视频中文字幕| 欧美va亚洲va| 欧美日韩一二三| 成人网在线播放| 九九视频精品免费| 午夜影院久久久| ㊣最新国产の精品bt伙计久久| 欧美成人欧美edvon| 欧美性感一区二区三区| 成人高清视频在线| 国产自产2019最新不卡| 天天综合色天天综合| 亚洲天堂中文字幕| 国产日韩影视精品| 精品久久久久99| 制服.丝袜.亚洲.中文.综合| 在线观看亚洲精品| 国产精品黄色在线观看| 精品国产污污免费网站入口| 欧美日韩三级在线| 在线看国产一区| 91丝袜美腿高跟国产极品老师 | 精品成人在线观看| 欧美日产在线观看| 欧美网站一区二区| 91蝌蚪porny九色| 成人一区二区在线观看| 国产精品伊人色| 国产尤物一区二区在线| 蜜桃在线一区二区三区| 免费在线观看一区二区三区| 亚洲一区二区av电影| 亚洲欧美激情一区二区| 亚洲欧洲国产日韩| 亚洲免费视频成人| 亚洲一区二区三区四区五区中文| 亚洲欧美日韩在线| 亚洲综合色噜噜狠狠| 亚洲综合色在线| 亚洲第一在线综合网站| 亚洲大片精品永久免费| 肉丝袜脚交视频一区二区| 偷拍亚洲欧洲综合| 美女在线视频一区| 国产一区亚洲一区| 粉嫩av一区二区三区粉嫩| 成人免费毛片嘿嘿连载视频| 99视频精品全部免费在线| 91免费版在线| 欧美性受极品xxxx喷水| 91麻豆精品国产综合久久久久久| 日韩欧美国产午夜精品| 久久久久久久性| 国产精品电影一区二区| 亚洲一区二区三区爽爽爽爽爽| 亚洲 欧美综合在线网络| 美国毛片一区二区三区| 国产91丝袜在线播放| 99国产精品久久| 欧美三级电影网| 欧美成人激情免费网| 国产精品热久久久久夜色精品三区 | 久久精品亚洲国产奇米99| 国产精品视频yy9299一区| 亚洲乱码国产乱码精品精可以看| 亚洲一二三四在线观看| 久久国产综合精品| 久久精品人人爽人人爽| 亚洲码国产岛国毛片在线| 亚洲一区二区三区小说| 激情综合亚洲精品| 色伊人久久综合中文字幕| 欧美一区二区三区免费观看视频| 久久久不卡影院| 一区二区三区在线免费播放| 三级欧美韩日大片在线看| 国产99精品国产| 欧美精品一二三| 国产精品麻豆久久久| 日韩国产精品大片| av资源网一区| 日韩视频一区二区| 亚洲免费在线视频一区 二区| 日本不卡视频在线观看| 成人动漫视频在线| 欧美一卡二卡在线观看| 亚洲视频一二区| 另类小说综合欧美亚洲| 91国内精品野花午夜精品| 26uuu亚洲| 午夜电影网一区| 99视频一区二区| www国产精品av| 日韩精品一级中文字幕精品视频免费观看| 国产精品综合av一区二区国产馆| 91成人国产精品| 国产日韩一级二级三级| 六月丁香婷婷久久| 欧美色图在线观看| 国产精品家庭影院| 国产一区二区调教| 7777精品伊人久久久大香线蕉| 自拍偷拍国产精品| 国产精品一区不卡| 欧美一区二区播放| 午夜精品福利久久久| 色偷偷久久人人79超碰人人澡| 久久久国产一区二区三区四区小说| 午夜不卡av免费| 91国产精品成人| 国产精品福利一区| 成人免费高清在线观看| 2023国产精品| 精品中文字幕一区二区小辣椒| 欧美性猛片xxxx免费看久爱| 亚洲天堂精品视频| 99在线视频精品| 中文字幕免费观看一区| 国产一区二区三区四区五区入口| 日韩欧美在线影院| 奇米色一区二区三区四区| 欧美日韩免费观看一区二区三区| 综合欧美亚洲日本| av男人天堂一区| 国产精品传媒入口麻豆| 福利一区二区在线| 日本一区二区三区久久久久久久久不 | 国产精华液一区二区三区| 精品区一区二区| 久草热8精品视频在线观看| 欧美一区中文字幕| 美女高潮久久久| 亚洲精品一区二区三区福利| 六月丁香婷婷色狠狠久久| 日韩欧美卡一卡二| 狠狠色丁香婷综合久久| 日韩欧美在线网站| 国产一区福利在线| 中文文精品字幕一区二区| 成人中文字幕在线| 亚洲视频一区二区在线| 91九色最新地址| 日韩精品乱码免费| 日韩免费成人网| 国产精品123区| 亚洲欧洲在线观看av| 91久久精品国产91性色tv| 日韩高清不卡一区二区| 2023国产精品自拍| 99久久er热在这里只有精品66| 一区二区三区四区激情 | 制服丝袜成人动漫| 国产一区二区调教| 综合色天天鬼久久鬼色| 欧美视频在线一区二区三区| 蜜臀精品久久久久久蜜臀| 欧美精品一区二区三区蜜桃视频| 国产精华液一区二区三区| 亚洲丝袜另类动漫二区| 欧美日韩成人高清| 国产一区二区三区国产| 中文字幕亚洲一区二区av在线 | 国产麻豆91精品| 亚洲激情图片一区| 日韩亚洲欧美成人一区| 国产91在线观看| 一区二区三区国产精华| 日韩午夜激情电影| heyzo一本久久综合| 日本欧美一区二区在线观看| 国产亚洲短视频| 欧美私人免费视频| 国产综合色精品一区二区三区| 亚洲人妖av一区二区| 欧美久久久久中文字幕| 岛国一区二区在线观看| 亚洲午夜影视影院在线观看| 久久免费电影网| 欧美三级三级三级爽爽爽| 国产自产高清不卡| 偷拍一区二区三区四区| 国产精品久久久久婷婷二区次| 欧美乱妇23p| av成人免费在线| 九九视频精品免费| 亚洲123区在线观看| 国产精品天美传媒| 日韩一区二区在线观看视频播放| 99久久综合狠狠综合久久| 精品一区二区在线看| 亚洲综合免费观看高清完整版在线 | 亚洲bt欧美bt精品| 1区2区3区精品视频| 久久精品男人的天堂|