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

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

?? draw-lite.c

?? ARM9-2410教學(xué)實(shí)驗(yàn)系統(tǒng)下Linux下minigui程序
?? C
字號(hào):
/* ** $Id: draw-lite.c,v 1.15 2003/11/23 03:39:20 weiym Exp $**** draw-lite.c: General drawing of GDI for MiniGUI-Lite.**** Copyright (C) 2003 Feynman Software.** Copyright (C) 2000 ~ 2002 Wei Yongming.**** Current maintainer: Wei Yongming.** Create date: 2000/06/12, derived from original gdi.c*//*** This program is free software; you can redistribute it and/or modify** it under the terms of the GNU General Public License as published by** the Free Software Foundation; either version 2 of the License, or** (at your option) any later version.**** This program is distributed in the hope that it will be useful,** but WITHOUT ANY WARRANTY; without even the implied warranty of** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the** GNU General Public License for more details.**** You should have received a copy of the GNU General Public License** along with this program; if not, write to the Free Software** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*//*** TODO:*/ #include <stdio.h>#include <stdlib.h>#include <string.h>#include "common.h"#include "minigui.h"#include "gdi.h"#include "window.h"#include "cliprect.h"#include "gal.h"#include "internals.h"#include "ctrlclass.h"#include "dc.h"#include "cursor.h"extern BOOL dc_GenerateECRgn (PDC pdc, BOOL fForce);/*********************** Generl drawing support ******************************/void GUIAPI SetPixel(HDC hdc, int x, int y, gal_pixel c){    PDC pdc;    PCLIPRECT pClipRect;    RECT rcOutput;    pdc = dc_HDC2PDC (hdc);    if (dc_IsGeneralHDC(hdc)) {        if (!dc_GenerateECRgn (pdc, FALSE)) {            return;        }    }    coor_LP2SP (pdc, &x, &y);    rcOutput.left = x - 1;    rcOutput.top  = y - 1;    rcOutput.right = x + 1;    rcOutput.bottom = y + 1;    IntersectRect (&rcOutput, &rcOutput, &pdc->ecrgn.rcBound);    if (!dc_IsMemHDC(hdc)) ShowCursorForGDI (FALSE, &rcOutput);    // set graphics context.    GAL_SetGC (pdc->gc);    GAL_SetFgColor (pdc->gc, c);    pClipRect = pdc->ecrgn.head;    while(pClipRect)    {        if(PtInRect(&(pClipRect->rc), x, y)) {            GAL_DrawPixel (pdc->gc, x, y, c);            break;        }        pClipRect = pClipRect->next;    }    if( !dc_IsMemHDC(hdc) ) ShowCursorForGDI(TRUE, &rcOutput);}void GUIAPI SetPixelRGB(HDC hdc, int x, int y, int r, int g, int b){    PDC pdc;    PCLIPRECT pClipRect;    RECT rcOutput;    gal_pixel pixel;    GAL_Color color;    pdc = dc_HDC2PDC (hdc);    if (dc_IsGeneralHDC(hdc)) {        if (!dc_GenerateECRgn (pdc, FALSE)) {            return;        }    }    coor_LP2SP (pdc, &x, &y);    rcOutput.left = x - 1;    rcOutput.top  = y - 1;    rcOutput.right = x + 1;    rcOutput.bottom = y + 1;    IntersectRect (&rcOutput, &rcOutput, &pdc->ecrgn.rcBound);    if( !dc_IsMemHDC(hdc) ) ShowCursorForGDI(FALSE, &rcOutput);    // set graphics context.    GAL_SetGC (pdc->gc);    color.r = r; color.g = g, color.b = b;    pixel = GAL_MapColor (pdc->gc, &color);    GAL_SetFgColor (pdc->gc, pixel);    pClipRect = pdc->ecrgn.head;    while (pClipRect)    {        if(PtInRect(&(pClipRect->rc), x, y)) {            GAL_DrawPixel (pdc->gc, x, y, pixel);            break;        }        pClipRect = pClipRect->next;    }        if( !dc_IsMemHDC(hdc) ) ShowCursorForGDI(TRUE, &rcOutput);}gal_pixel GUIAPI GetPixel(HDC hdc, int x, int y){    PDC pdc;    PCLIPRECT pClipRect;    int color = 0;    RECT rcOutput;    pdc = dc_HDC2PDC(hdc);    if (dc_IsGeneralHDC(hdc)) {        if (!dc_GenerateECRgn (pdc, FALSE)) {            return PIXEL_invalid;        }    }    coor_LP2SP (pdc, &x, &y);    rcOutput.left = x - 1;    rcOutput.top  = y - 1;    rcOutput.right = x + 1;    rcOutput.bottom = y + 1;    IntersectRect (&rcOutput, &rcOutput, &pdc->ecrgn.rcBound);    if (!dc_IsMemHDC (hdc)) ShowCursorForGDI (FALSE, &rcOutput);    // set graphics context.    GAL_SetGC (pdc->gc);    pClipRect = pdc->ecrgn.head;    while(pClipRect)    {        if(PtInRect(&(pClipRect->rc), x, y)) {            GAL_GetPixel (pdc->gc, x, y, &color);            break;        }        pClipRect = pClipRect->next;    }    if (!dc_IsMemHDC (hdc)) ShowCursorForGDI (TRUE, &rcOutput);    return color;}void GUIAPI GetPixelRGB(HDC hdc, int x, int y, int* r, int* g, int* b){    PDC pdc;    PCLIPRECT pClipRect;    gal_pixel pixel;    GAL_Color color;    RECT rcOutput;    pdc = dc_HDC2PDC(hdc);    if (dc_IsGeneralHDC(hdc)) {        if (!dc_GenerateECRgn (pdc, FALSE)) {            return;        }    }    coor_LP2SP(pdc, &x, &y);    rcOutput.left = x - 1;    rcOutput.top  = y - 1;    rcOutput.right = x + 1;    rcOutput.bottom = y + 1;    *r = 0;    *g = 0;    *b = 0;    IntersectRect (&rcOutput, &rcOutput, &pdc->ecrgn.rcBound);    if (!dc_IsMemHDC (hdc)) ShowCursorForGDI (FALSE, &rcOutput);    // set graphics context.    GAL_SetGC (pdc->gc);    pClipRect = pdc->ecrgn.head;    while(pClipRect)    {        if (PtInRect (&(pClipRect->rc), x, y) ) {            GAL_GetPixel (pdc->gc, x, y, &pixel);            GAL_UnmapPixel (pdc->gc, pixel, &color);            *r = color.r;            *g = color.g;            *b = color.b;            break;        }        pClipRect = pClipRect->next;    }    if( !dc_IsMemHDC(hdc) ) ShowCursorForGDI(TRUE, &rcOutput);}gal_pixel GUIAPI RGB2Pixel (HDC hdc, int r, int g, int b){    PDC pdc;    gal_pixel pixel;    GAL_Color color = {r, g, b};    pdc = dc_HDC2PDC (hdc);    GAL_SetGC (pdc->gc);    pixel = GAL_MapColor (pdc->gc, &color);     return pixel;}void GUIAPI MoveTo (HDC hdc, int x, int y){    PDC pdc;    pdc = dc_HDC2PDC(hdc);    pdc->CurPenPos.x = x;    pdc->CurPenPos.y = y;}void GUIAPI LineTo (HDC hdc, int x, int y){    PCLIPRECT pClipRect;    PDC pdc;    RECT rcOutput;    int startx, starty;    pdc = dc_HDC2PDC(hdc);    startx = pdc->CurPenPos.x;    starty = pdc->CurPenPos.y;    // Move the current pen pos.    pdc->CurPenPos.x = x;    pdc->CurPenPos.y = y;    if (dc_IsGeneralHDC(hdc)) {        if (!dc_GenerateECRgn (pdc, FALSE)) {            return;        }    }    // Transfer logical to device to screen here.    coor_LP2SP(pdc, &x, &y);    coor_LP2SP(pdc, &startx, &starty);    rcOutput.left = startx;    rcOutput.top  = starty;    rcOutput.right = x;    rcOutput.bottom = y;    NormalizeRect (&rcOutput);    InflateRect (&rcOutput, 1, 1);    IntersectRect (&rcOutput, &rcOutput, &pdc->ecrgn.rcBound);    if( !dc_IsMemHDC(hdc) ) ShowCursorForGDI(FALSE, &rcOutput);    // set graphics context.    GAL_SetGC (pdc->gc);    GAL_SetFgColor (pdc->gc, pdc->pencolor);    pClipRect = pdc->ecrgn.head;    while(pClipRect)    {        if (DoesIntersect (&rcOutput, &pClipRect->rc)) {            GAL_SetClipping (pdc->gc, pClipRect->rc.left, pClipRect->rc.top,                    pClipRect->rc.right - 1, pClipRect->rc.bottom - 1);            if(starty == y) {                if (startx > x)                    GAL_DrawHLine (pdc->gc, x, y, startx - x, pdc->pencolor);                else                    GAL_DrawHLine (pdc->gc, startx, y, x - startx, pdc->pencolor);            }            else                GAL_Line (pdc->gc, startx, starty, x, y, pdc->pencolor);        }                    pClipRect = pClipRect->next;    }    if (!dc_IsMemHDC (hdc)) ShowCursorForGDI (TRUE, &rcOutput);}void GUIAPI PolylineTo (HDC hdc, const POINT* point, int poinum){    int   i;    MoveTo (hdc, point[0].x, point[0].y);    for (i=1; i<poinum; i++)        LineTo (hdc, point[i].x, point[i].y);}/************************ Circle and Rectangle *******************************/void GUIAPI Circle(HDC hdc, int x, int y, int r){    PCLIPRECT pClipRect;    PDC pdc;    RECT rcOutput;    pdc = dc_HDC2PDC(hdc);    if (dc_IsGeneralHDC(hdc)) {        if (!dc_GenerateECRgn (pdc, FALSE)) {            return;        }    }    // Transfer logical to device to screen here.    coor_LP2SP(pdc, &x, &y);    rcOutput.left = x - r;    rcOutput.top  = y - r;    rcOutput.right = x + r + 1;    rcOutput.bottom = y + r + 1;    IntersectRect (&rcOutput, &rcOutput, &pdc->ecrgn.rcBound);    if( !dc_IsMemHDC(hdc) ) ShowCursorForGDI(FALSE, &rcOutput);    // set graphics context.    GAL_SetGC (pdc->gc);    GAL_SetFgColor (pdc->gc, pdc->pencolor);    pClipRect = pdc->ecrgn.head;    while(pClipRect)    {        if (DoesIntersect (&rcOutput, &pClipRect->rc)) {            GAL_SetClipping (pdc->gc, pClipRect->rc.left, pClipRect->rc.top,                    pClipRect->rc.right -1 , pClipRect->rc.bottom - 1);            GAL_Circle (pdc->gc, x, y, r, pdc->pencolor);        }                    pClipRect = pClipRect->next;    }    if( !dc_IsMemHDC(hdc) ) ShowCursorForGDI(TRUE, &rcOutput);}void GUIAPI Rectangle (HDC hdc, int x0, int y0, int x1, int y1){    PCLIPRECT pClipRect;    PDC pdc;    RECT rcOutput;    pdc = dc_HDC2PDC(hdc);    if (dc_IsGeneralHDC(hdc)) {        if (!dc_GenerateECRgn (pdc, FALSE)) {            return;        }    }    // Transfer logical to device to screen here.    coor_LP2SP(pdc, &x0, &y0);     coor_LP2SP(pdc, &x1, &y1);         rcOutput.left = x0;    rcOutput.top = y0;    rcOutput.right = x1;    rcOutput.bottom = y1;    NormalizeRect (&rcOutput);    rcOutput.right ++;    rcOutput.bottom ++;    IntersectRect (&rcOutput, &rcOutput, &pdc->ecrgn.rcBound);    if( !dc_IsMemHDC(hdc) ) ShowCursorForGDI(FALSE, &rcOutput);    // set graphics context.    GAL_SetGC (pdc->gc);    GAL_SetFgColor (pdc->gc, pdc->pencolor);    pClipRect = pdc->ecrgn.head;    while(pClipRect)    {        if (DoesIntersect (&rcOutput, &pClipRect->rc)) {            GAL_SetClipping (pdc->gc, pClipRect->rc.left, pClipRect->rc.top,                    pClipRect->rc.right - 1, pClipRect->rc.bottom - 1);            GAL_Rectangle (pdc->gc, x0, y0, x1, y1, pdc->pencolor);        }                    pClipRect = pClipRect->next;    }        if( !dc_IsMemHDC(hdc) ) ShowCursorForGDI(TRUE, &rcOutput);}void GUIAPI FocusRect(HDC hdc, int x0, int y0, int x1, int y1){    PCLIPRECT pClipRect;    PDC pdc;    int l, t, r, b, w, h;    RECT rcOutput;    size_t sizeh, sizev;    BYTE* vbuff;    BYTE* hline1 = NULL, * hline2 = NULL;    BYTE* vline1 = NULL, * vline2 = NULL;    int bpp;    BYTE xor_byte;    pdc = dc_HDC2PDC(hdc);    bpp = GAL_BytesPerPixel (pdc->gc);    if (GAL_BitsPerPixel (pdc->gc) < 8)        xor_byte = 0x0F;    else        xor_byte = 0xFF;    if (dc_IsGeneralHDC(hdc)) {        if (!dc_GenerateECRgn (pdc, FALSE)) {            return;        }    }    // Transfer logical to device to screen here.    coor_LP2SP(pdc, &x0, &y0);     coor_LP2SP(pdc, &x1, &y1);     l = MIN (x0, x1); t = MIN (y0, y1); r = MAX (x0, x1); b = MAX (y0, y1);    rcOutput.left = l; rcOutput.top = t;    rcOutput.right = r + 1; rcOutput.bottom = b + 1;    IntersectRect (&rcOutput, &rcOutput, &pdc->ecrgn.rcBound);    if( !dc_IsMemHDC(hdc) ) ShowCursorForGDI(FALSE, &rcOutput);    GAL_SetGC (pdc->gc);    w = r - l + 1;    h = b - t - 1;    if (w == 0 || h == 0)        goto my_exit;    sizeh = w * bpp;    sizev = h * bpp;#ifdef HAVE_ALLOCA    if (!(vbuff = alloca ((sizeh << 1) + (sizev << 1))))#else    if (!(vbuff = malloc ((sizeh << 1) + (sizev << 1))))#endif        goto my_exit;    if (w > 0) {        int i, j;        int offset;               hline1 = vbuff;        hline2 = vbuff + sizeh;        GAL_GetBox (pdc->gc, l, t, w, 1, hline1);        GAL_GetBox (pdc->gc, l, b, w, 1, hline2);        offset = 0;        for (i = 0; i < w; i += 2) {            for (j = 0; j < bpp; j++) {                hline1[offset + j] ^= xor_byte;                hline2[offset + j] ^= xor_byte;            }            offset += bpp << 1;         }    }        if (h > 0) {        int i, j, offset;                vline1 = vbuff + (sizeh << 1);        vline2 = vbuff + (sizeh << 1) + sizev;                    GAL_GetBox (pdc->gc, l, t + 1, 1, h, vline1);        GAL_GetBox (pdc->gc, r, t + 1, 1, h, vline2);                offset = 0;        for (i = 0; i < h; i += 2) {            for (j = 0; j < bpp; j++) {                vline1[offset + j] ^= xor_byte;                vline2[offset + j] ^= xor_byte;            }            offset += bpp << 1;         }    }    // set graphics context.    GAL_SetGC (pdc->gc);    pClipRect = pdc->ecrgn.head;    while(pClipRect)    {        if (DoesIntersect (&rcOutput, &pClipRect->rc)) {            GAL_SetClipping(pdc->gc, pClipRect->rc.left, pClipRect->rc.top,                    pClipRect->rc.right - 1, pClipRect->rc.bottom - 1);                        if (hline1) {                GAL_PutBox (pdc->gc, l, t, w, 1, hline1);                GAL_PutBox (pdc->gc, l, b, w, 1, hline2);            }                        if (vline1) {                GAL_PutBox (pdc->gc, l, t + 1, 1, h, vline1);                GAL_PutBox (pdc->gc, r, t + 1, 1, h, vline2);            }        }                    pClipRect = pClipRect->next;    }    my_exit:    if( !dc_IsMemHDC(hdc) ) ShowCursorForGDI(TRUE, &rcOutput);    free (vbuff);}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91在线观看免费视频| 欧美韩日一区二区三区| 在线精品视频免费播放| 91社区在线播放| 成人av在线电影| 国产成人精品一区二区三区四区 | 国产成人综合亚洲91猫咪| 美女视频一区二区| 日本vs亚洲vs韩国一区三区| 亚洲图片欧美视频| 亚洲成人你懂的| 天天综合色天天| 狂野欧美性猛交blacked| 奇米色一区二区三区四区| 蜜臀av性久久久久蜜臀aⅴ四虎| 青娱乐精品视频在线| 免费成人美女在线观看| 美女在线一区二区| 久久99久国产精品黄毛片色诱| 日本aⅴ精品一区二区三区| 美女视频第一区二区三区免费观看网站| 日韩精品欧美成人高清一区二区| 午夜欧美视频在线观看| 日韩午夜精品视频| 久久综合色婷婷| 中文字幕欧美激情| 亚洲欧洲另类国产综合| 亚洲欧美视频一区| 亚洲不卡在线观看| 韩国精品一区二区| 成人a级免费电影| 91精品1区2区| 91.成人天堂一区| 亚洲精品在线一区二区| 国产欧美精品国产国产专区| 亚洲欧美色图小说| 日韩电影网1区2区| 国产99一区视频免费| 色综合久久久久| 777午夜精品免费视频| 久久久国产精品麻豆| 亚洲天堂久久久久久久| 视频一区二区三区中文字幕| 精品系列免费在线观看| 成人av在线资源| 欧美日韩黄色一区二区| 精品国产成人在线影院| 国产精品女人毛片| 午夜av电影一区| 国产大片一区二区| 欧美伊人久久久久久久久影院| 日韩精品一区国产麻豆| 中文字幕视频一区二区三区久| 午夜欧美大尺度福利影院在线看| 久久99久久精品| 日本高清视频一区二区| 精品国产1区二区| 亚洲欧美日韩系列| 麻豆精品一区二区三区| 色偷偷88欧美精品久久久| 欧美大度的电影原声| 亚洲精品国产精华液| 国产一区三区三区| 欧美日韩中文字幕一区二区| 国产亚洲一本大道中文在线| 亚洲国产一二三| 成人免费福利片| 日韩你懂的电影在线观看| 亚洲伦理在线免费看| 国产一区二区三区在线看麻豆| 91福利精品视频| 国产欧美视频一区二区| 免费观看成人鲁鲁鲁鲁鲁视频| hitomi一区二区三区精品| 精品欧美一区二区在线观看| 亚洲一区二区三区不卡国产欧美| 成人午夜伦理影院| 日韩久久免费av| 视频在线观看91| 在线观看欧美日本| 国产精品―色哟哟| 国产乱一区二区| 欧美一区二区播放| 亚洲综合在线视频| 9久草视频在线视频精品| 日韩欧美一区中文| 亚洲第一在线综合网站| 91欧美一区二区| 国产精品网曝门| 国产一区二区精品久久| 精品乱人伦小说| 奇米888四色在线精品| 欧美三级一区二区| 亚洲免费观看高清完整| 福利一区福利二区| 日韩一级大片在线观看| 亚洲电影中文字幕在线观看| 91行情网站电视在线观看高清版| 国产精品亲子伦对白| 国产成人无遮挡在线视频| 久久先锋影音av| 国产一区二区福利视频| 久久免费电影网| 国产麻豆精品在线观看| 久久男人中文字幕资源站| 国产一区高清在线| 欧美精品一区二区三区蜜桃| 久久99久久精品欧美| 欧美精品一区二区三区在线| 国产麻豆一精品一av一免费| 久久先锋影音av鲁色资源网| 国产精品888| 国产精品视频在线看| 成人白浆超碰人人人人| 国产精品卡一卡二| 色综合久久精品| 午夜免费久久看| 91精品国产综合久久蜜臀| 五月天激情综合| 欧美一级高清大全免费观看| 蜜臀av性久久久久蜜臀aⅴ | 亚洲另类在线制服丝袜| 欧美午夜理伦三级在线观看| 亚洲成人动漫在线观看| 91精品国产麻豆| 国内久久精品视频| 国产精品免费丝袜| 色av成人天堂桃色av| 无码av免费一区二区三区试看 | 亚洲大尺度视频在线观看| 欧美精品久久久久久久多人混战 | 亚洲成a人片在线观看中文| 91麻豆精品国产91久久久资源速度| 日日欢夜夜爽一区| 精品盗摄一区二区三区| 丁香天五香天堂综合| 亚洲同性同志一二三专区| 欧美网站大全在线观看| 免费视频最近日韩| 亚洲国产精品v| 欧洲国内综合视频| 久久99在线观看| 国产精品天天看| 精品视频在线视频| 国产原创一区二区三区| 亚洲三级在线观看| 欧美一区二区三区精品| 丁香网亚洲国际| 五月综合激情日本mⅴ| 久久精品视频一区二区三区| 色呦呦国产精品| 久草精品在线观看| 亚洲精品视频一区| 26uuu久久天堂性欧美| 色综合久久66| 麻豆视频一区二区| 亚洲色图欧洲色图| 精品国产一区二区三区忘忧草| 成人97人人超碰人人99| 日韩精品一区第一页| 国产精品三级电影| 日韩视频免费观看高清完整版| 成人成人成人在线视频| 青青草97国产精品免费观看无弹窗版| 国产欧美日韩激情| 91精品视频网| 91视频在线看| 国产乱码精品一区二区三区忘忧草| 一区二区三区免费| 日本一区二区动态图| 日韩欧美亚洲一区二区| 在线精品视频小说1| 国产白丝精品91爽爽久久| 奇米影视7777精品一区二区| 亚洲美女少妇撒尿| 国产欧美一区二区精品忘忧草| 3d成人h动漫网站入口| 色999日韩国产欧美一区二区| 国产精品18久久久久| 日韩成人免费看| 亚洲午夜私人影院| 国产精品网站一区| 久久免费美女视频| 日韩网站在线看片你懂的| 在线观看一区二区精品视频| 成人开心网精品视频| 韩国av一区二区三区| 日本不卡一区二区三区| 亚洲精品久久久久久国产精华液| 久久综合网色—综合色88| 欧美一区二区成人| 欧美福利视频导航| 欧美系列在线观看| 91国偷自产一区二区开放时间 | 国产精品理论片| 国产欧美精品一区aⅴ影院| 精品久久人人做人人爰| 欧美一区二区三区啪啪| 在线播放中文一区| 欧美日韩一区在线|