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

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

?? graphics.c

?? c語言開發方面的經典問題,包括源代碼.c語言開發所要注意的問題,以及在嵌入式等各方面的應用
?? C
?? 第 1 頁 / 共 4 頁
字號:
    for (i = 0; i < nFonts; i++) {        if (StringEqual(name, fontTable[i].name)            && size == fontTable[i].size            && style == fontTable[i].style) return (i);    }    return (-1);}/* * Function: SetLineBB * Usage: SetLineBB(&rect, x, y, dx, dy); * -------------------------------------- * This function sets the rectangle dimensions to the bounding * box of the line. */static void SetLineBB(RECT *rp, double x, double y, double dx, double dy){    int x0, y0, x1, y1;    x0 = ScaleX(x);    y0 = ScaleY(y);    x1 = ScaleX(x + dx);    y1 = ScaleY(y + dy);    rp->top = Min(y0, y1);    rp->bottom = Max(y0, y1) + 1;    rp->left = Min(x0, x1);    rp->right = Max(x0, x1) + 1;}/* * Function: SetArcBB * Usage: SetArcBB(&rect, xc, yc, rx, ry, start, sweep); * ----------------------------------------------------- * This function sets the rectangle dimensions to the bounding * box of the arc segment specified by the remaining arguments. */static void SetArcBB(RECT *rp, double xc, double yc,                     double rx, double ry, double start, double sweep){    int xmax, xmin, ymax, ymin;    int xl, xr, yt, yb;    int ix0, iy0, ix1, iy1;    xmin = ScaleX(xc - rx);    ymin = ScaleY(yc + ry);    xmax = xmin + PixelsX(2 * rx);    ymax = ymin + PixelsX(2 * ry);    if (sweep < 0) {        start += sweep;        sweep = -sweep;    }    if (sweep >= 360) {        SetRect(rp, xmin, ymin, xmax, ymax);        return;    }    if (start < 0) {        start = 360 - fmod(-start, 360);    } else {        start = fmod(start, 360);    }    ix0 = ScaleX(xc + rx * cos(Radians(start)));    iy0 = ScaleY(yc + ry * sin(Radians(start)));    ix1 = ScaleX(xc + rx * cos(Radians(start + sweep)));    iy1 = ScaleY(yc + ry * sin(Radians(start + sweep)));    if (start + sweep > 360) {        xr = xmax;    } else {        xr = Max(ix0, ix1);    }    start = fmod(start + 270, 360);    if (start + sweep > 360) {        yt = ymin;    } else {        yt = Min(iy0, iy1);    }    start = fmod(start + 270, 360);    if (start + sweep > 360) {        xl = xmin;    } else {        xl = Min(ix0, ix1);    }    start = fmod(start + 270, 360);    if (start + sweep > 360) {        yb = ymax;    } else {        yb = Max(iy0, iy1);    }    SetRect(rp, xl, yt, xr, yb);}/* * Function: SetTextBB * Usage: SetTextBB(&rect, x, y, text); * ------------------------------------- * This function sets the rectangle dimensions to the bounding * box of the text string using the current font and size. */static void SetTextBB(RECT *rp, double x, double y, string text){    SIZE textSize;    int ix, iy;    if (!GetTextExtentPoint(osdc, text, strlen(text), &textSize)) {        Error("Internal error: Text size calculation failed");    }    ix = ScaleX(x);    iy = ScaleY(y);    SetRect(rp, ix, iy - textSize.cy + fontTable[currentFont].descent,            ix + textSize.cx, iy + fontTable[currentFont].descent);}/* * Functions: StartPolygon, AddSegment, EndPolygon * Usage: StartPolygon(); *        AddSegment(x0, y0, x1, y1); *        AddSegment(x1, y1, x2, y2); *        . . . *        DisplayPolygon(); * ---------------------------------- * These functions implement the notion of a region in the PC * world, where the easiest shape to fill is a polygon.  Calling * StartPolygon initializes the array polygonPoints so that * subsequent calls to AddSegment will add points to it. * The points in the polygon are assumed to be contiguous, * because the client interface checks for this property. * Because polygons involving arcs can be quite large, the * AddSegment code extends the polygonPoints list if needed * by doubling the size of the array.  All storage is freed * after calling DisplayPolygon. */static void StartPolygon(void){    polygonPoints = NewArray(PStartSize, POINT);    polygonSize = PStartSize;    nPolygonPoints = 0;    SetRect(&polygonBounds, LargeInt, LargeInt, 0, 0);}static void AddSegment(int x0, int y0, int x1, int y1){    if (nPolygonPoints == 0) AddPolygonPoint(x0, y0);    AddPolygonPoint(x1, y1);}static void DisplayPolygon(void){    int px;    HBRUSH brush, oldBrush;    HPEN oldPen, fillPen;    PrepareToDraw();    InvalidateRect(graphicsWindow, &polygonBounds, TRUE);    if (eraseMode) {        px = 0;        fillPen = erasePen;    } else {        px = regionDensity * (NFills - 1) + 0.5 - Epsilon;        fillPen = drawPen;    }    oldPen = (HPEN) SelectObject(osdc, fillPen);    brush = CreatePatternBrush(fillBitmaps[px]);    if (brush == NULL) {        Error("Internal error: Can't load brush");    }    oldBrush = (HBRUSH) SelectObject(osdc, brush);    Polygon(osdc, polygonPoints, nPolygonPoints);    (void) SelectObject(osdc, oldPen);    if (oldBrush != NULL) (void) SelectObject(osdc, oldBrush);    FreeBlock(polygonPoints);    DeleteObject(brush);}/* * Function: AddPolygonPoint * Usage: AddPolygonPoint(x, y); * ----------------------------- * AddPolygonPoint acts as a helper function for AddSegment.  This * function does the work, but AddSegment has a more easily understood * interface. */static void AddPolygonPoint(int x, int y){    POINT *newPolygon;    int i;    if (nPolygonPoints >= polygonSize) {        polygonSize *= 2;        newPolygon = NewArray(polygonSize, POINT);        for (i = 0; i < nPolygonPoints; i++) {            newPolygon[i] = polygonPoints[i];        }        FreeBlock(polygonPoints);        polygonPoints = newPolygon;    }    polygonBounds.left = Min(polygonBounds.left, x);    polygonBounds.right = Max(polygonBounds.right, x);    polygonBounds.top = Min(polygonBounds.top, y);    polygonBounds.bottom = Max(polygonBounds.bottom, y);    polygonPoints[nPolygonPoints].x = x;    polygonPoints[nPolygonPoints].y = y;    nPolygonPoints++;}/* * Function: InitColors * Usage: InitColors(); * -------------------- * This function defines the built-in colors. */static void InitColors(void){    nColors = 0;    DefineColor("Black", 0, 0, 0);    DefineColor("Dark Gray", .35, .35, .35);    DefineColor("Gray", .6, .6, .6);    DefineColor("Light Gray", .75, .75, .75);    DefineColor("White", 1, 1, 1);    DefineColor("Brown", .35, .20, .05);    DefineColor("Red", 1, 0, 0);    DefineColor("Orange", 1, .40, .1);    DefineColor("Yellow", 1, 1, 0);    DefineColor("Green", 0, 1, 0);    DefineColor("Blue", 0, 0, 1);    DefineColor("Violet", .93, .5, .93);    DefineColor("Magenta", 1, 0, 1);    DefineColor("Cyan", 0, 1, 1);}/* * Function: FindColorName * Usage: index = FindColorName(name); * ----------------------------------- * This function returns the index of the named color in the * color table, or -1 if the color does not exist. */static int FindColorName(string name){    int i;    for (i = 0; i < nColors; i++) {        if (StringMatch(name, colorTable[i].name)) return (i);    }    return (-1);}/* * Utility functions * ----------------- * This section contains several extremely short utility functions * that improve the readability of the code. *//* * Function: StringMatch * Usage: if (StringMatch(s1, s2)) . . . * ------------------------------------- * This function returns TRUE if two strings are equal, ignoring * case distinctions. */static bool StringMatch(string s1, string s2){    register char *cp1, *cp2;    cp1 = s1;    cp2 = s2;    while (tolower(*cp1) == tolower(*cp2)) {        if (*cp1 == '\0') return (TRUE);        cp1++;        cp2++;    }    return (FALSE);}/* * Function: PrefixMatch * Usage: if (PrefixMatch(prefix, str)) . . . * ------------------------------------------------- * This function returns TRUE if prefix is the initial substring * of str, ignoring differences in case. */static bool PrefixMatch(char *prefix, char *str){    while (*prefix != '\0') {        if (tolower(*prefix++) != tolower(*str++)) return (FALSE);    }    return (TRUE);}/* * Functions: RectWidth, RectHeight * Usage: w = RectWidth(&r); *        h = RectHeight(&r); * -------------------------------- * These functions return the width and height of a rectangle. */static int RectWidth(RECT *rp){    return (rp->right - rp->left);}static int RectHeight(RECT *rp){    return (rp->bottom - rp->top);}/* * Functions: SetRectFromSize * Usage: SetRectFromSize(&r, x, y, width, height); * ------------------------------------------------ * This function is similar to SetRect except that it takes width * and height parameters rather than right and bottom. */static void SetRectFromSize(RECT *rp, int x, int y, int width, int height){    SetRect(rp, x, y, x + width, y + height);}/* * 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 / xResolution);}static double InchesY(int y){    return ((double) y / yResolution);}/* * 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 * xResolution + Epsilon));}static int PixelsY(double y){    return (Round(y * yResolution + 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 (PixelsY(windowHeight - y));}/* * Functions: Min, Max * Usage: min = Min(x, y); *        max = Max(x, y); * ----------------------- * These functions find the minimum and maximum of two integers. */static int Min(int x, int y){    return ((x < y) ? x : y);}static int Max(int x, int y){    return ((x > y) ? x : y);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久先锋影音av鲁色资源网| 亚洲永久免费av| 亚洲女女做受ⅹxx高潮| 麻豆精品视频在线观看免费 | 狠狠色狠狠色综合| 欧洲一区在线观看| 国产精品成人一区二区艾草| 乱中年女人伦av一区二区| 色婷婷国产精品| 国产精品污污网站在线观看| 日本美女一区二区| 欧美日韩国产一级二级| 亚洲欧美激情一区二区| 成人午夜av电影| 久久久久久夜精品精品免费| 久久99久久久欧美国产| 欧美另类z0zxhd电影| 一区二区三区四区五区视频在线观看| 成人一区二区三区视频| 精品女同一区二区| 精品写真视频在线观看| 日韩一区二区三区免费看| 亚洲成人综合在线| 色综合久久天天综合网| 最新热久久免费视频| 国产999精品久久| 久久婷婷国产综合国色天香| 精东粉嫩av免费一区二区三区| 欧美一级一区二区| 欧美a级一区二区| 日韩一区二区三区高清免费看看| 亚洲已满18点击进入久久| 欧美午夜电影一区| 一区二区三区自拍| 欧美伊人久久久久久午夜久久久久| 亚洲人成7777| 欧洲色大大久久| 一区二区在线观看av| 日本韩国一区二区| 亚洲成人av一区二区| 欧美久久久久久久久| 免费一级片91| 亚洲精品在线三区| 成人免费毛片高清视频| 亚洲视频一二区| 日本二三区不卡| 午夜精品一区二区三区电影天堂| 91精品欧美福利在线观看| 美脚の诱脚舐め脚责91 | 欧美亚洲精品一区| 亚洲第四色夜色| 精品奇米国产一区二区三区| 国产成人免费视频网站 | 欧美男女性生活在线直播观看| 婷婷成人激情在线网| 日韩欧美成人一区二区| 国产成人免费视频一区| 亚洲在线观看免费| 日韩欧美一级在线播放| 不卡高清视频专区| 五月天激情小说综合| xfplay精品久久| 在线观看一区日韩| 精品一区二区三区免费视频| 中文字幕一区二区日韩精品绯色| 欧美精品久久99久久在免费线| 国产一区视频网站| 一区二区三区蜜桃| 精品福利av导航| 色婷婷久久久久swag精品| 日本va欧美va欧美va精品| 国产精品久久久久久久久免费相片 | 欧美精品 日韩| 成人毛片在线观看| 免费成人美女在线观看| 亚洲欧美综合在线精品| 日韩一区二区精品| 99久久99精品久久久久久| 日韩高清不卡一区二区| 日韩一区日韩二区| 久久综合精品国产一区二区三区| 日本道免费精品一区二区三区| 久久成人免费电影| 婷婷六月综合网| 亚洲婷婷国产精品电影人久久| 欧美mv日韩mv| 欧美一区二区三区系列电影| 99国产精品99久久久久久| 精品一区免费av| 日韩精品一级中文字幕精品视频免费观看 | 99久久精品免费看国产免费软件| 日韩精品1区2区3区| 亚洲欧美日韩国产手机在线| 久久久久久久网| 精品国产一区二区三区久久影院 | 美女视频一区二区| 亚洲电影第三页| 伊人开心综合网| 亚洲免费观看视频| 国产精品剧情在线亚洲| 久久久久久久久久美女| 精品免费日韩av| 欧美电视剧免费全集观看| 欧美一区二区精品久久911| 欧美色国产精品| 欧美亚洲动漫制服丝袜| 欧洲精品在线观看| 日本道色综合久久| 在线免费不卡电影| 欧美中文字幕一区二区三区亚洲 | a级高清视频欧美日韩| 国产精品自在欧美一区| 国产一区在线视频| 国产大陆a不卡| 99在线精品一区二区三区| www.欧美色图| 色婷婷综合久久久中文字幕| 色偷偷88欧美精品久久久| 一本高清dvd不卡在线观看| 色哟哟欧美精品| 欧美日韩三级一区二区| 在线播放91灌醉迷j高跟美女 | 91精品国产福利| 欧美大片一区二区三区| 久久亚洲一区二区三区四区| 久久精品一区二区| 中文字幕亚洲欧美在线不卡| 亚洲柠檬福利资源导航| 亚洲va中文字幕| 麻豆精品国产91久久久久久| 久久 天天综合| 成人h动漫精品一区二| 欧美色区777第一页| 91麻豆精品国产91久久久| 精品国产伦一区二区三区免费| 国产欧美日韩在线视频| 亚洲精品免费播放| 免费观看一级特黄欧美大片| 国产成人午夜高潮毛片| 欧美网站一区二区| 精品裸体舞一区二区三区| 国产精品国产三级国产三级人妇| 亚洲在线视频一区| 久久99精品久久久久久| 成人免费毛片aaaaa**| 欧美性大战xxxxx久久久| 精品国产污污免费网站入口 | 欧美亚洲一区二区在线观看| 欧美不卡一区二区三区四区| 亚洲欧洲www| 久久电影国产免费久久电影| 成人av电影在线观看| 7777精品伊人久久久大香线蕉经典版下载 | 国产精品99久久久久久久vr| 国产一区二区三区久久久| 国产成人精品一区二区三区四区 | 亚洲女性喷水在线观看一区| 亚洲一区二区3| 国产一区二区91| 欧美私模裸体表演在线观看| 久久久精品国产免费观看同学| 一区二区三区中文字幕电影| 久久国产福利国产秒拍| 91美女片黄在线| 久久久久国产精品人| 午夜精品久久久久久久| 成人精品国产福利| 精品日韩一区二区三区免费视频| 亚洲人123区| 高清在线成人网| 精品久久久久久久久久久院品网| 亚洲一级片在线观看| 丰满放荡岳乱妇91ww| 日韩欧美国产一区二区在线播放| 亚洲激情av在线| 懂色av中文字幕一区二区三区| 91精品中文字幕一区二区三区| 国产精品久久久久久久浪潮网站| 久久99精品视频| 欧美一卡二卡三卡四卡| 午夜视频一区二区三区| 色综合久久88色综合天天免费| 久久久精品蜜桃| 激情文学综合插| 欧美一区二区三区视频在线观看| 一区二区三区国产豹纹内裤在线| 成人激情免费电影网址| 国产欧美一区二区三区在线看蜜臀| 美女任你摸久久| 日韩欧美一级二级三级久久久| 视频一区国产视频| 欧美日韩高清在线| 亚洲五月六月丁香激情| 色综合天天在线| 亚洲精品va在线观看| 91小视频在线免费看| 亚洲欧洲精品一区二区三区| 成年人午夜久久久| 国产精品久久久久影院老司 | 欧美日韩久久久久久|