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

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

?? draw.c

?? 這是針對 Linux (i386)平臺的 minigui 3.6.2 開發(fā)包(MiniGUI-Processes 運行模式)。
?? C
字號:
/*** $Id: draw.c,v 1.27 2005/01/04 07:11:16 limei Exp $**** General drawing of GDI**** 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"#include "gdidecl.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;#ifndef _LITE_VERSION    pdc = dc_HDC2PDC (hdc);#endif    LOCK_ECRGN(return);    coor_LP2SP (pdc, &x, &y);    rcOutput.left = x - 1;    rcOutput.top  = y - 1;    rcOutput.right = x + 1;    rcOutput.bottom = y + 1;    LOCK_GDI();    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);    UNLOCK_GDI();    UNLOCK_ECRGN();}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;#ifndef _LITE_VERSION    pdc = dc_HDC2PDC (hdc);#endif    LOCK_ECRGN(return);    coor_LP2SP (pdc, &x, &y);    rcOutput.left = x - 1;    rcOutput.top  = y - 1;    rcOutput.right = x + 1;    rcOutput.bottom = y + 1;    LOCK_GDI();    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);    UNLOCK_GDI();    UNLOCK_ECRGN();}gal_pixel GUIAPI GetPixel(HDC hdc, int x, int y){    PDC pdc;    PCLIPRECT pClipRect;    int color = 0;    RECT rcOutput;#ifndef _LITE_VERSION    pdc = dc_HDC2PDC(hdc);#endif    LOCK_ECRGN(return PIXEL_invalid);    coor_LP2SP (pdc, &x, &y);    rcOutput.left = x - 1;    rcOutput.top  = y - 1;    rcOutput.right = x + 1;    rcOutput.bottom = y + 1;    LOCK_GDI();    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);    UNLOCK_GDI();    UNLOCK_ECRGN();    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;#ifndef _LITE_VERSION    pdc = dc_HDC2PDC(hdc);#endif    LOCK_ECRGN(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;    LOCK_GDI();    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);    UNLOCK_GDI();    UNLOCK_ECRGN();}gal_pixel GUIAPI RGB2Pixel (HDC hdc, int r, int g, int b){    PDC pdc;    gal_pixel pixel;    GAL_Color color;    color.r = r;    color.g = g;    color.b = b;        pdc = dc_HDC2PDC (hdc);    LOCK_GDI();    GAL_SetGC (pdc->gc);    pixel = GAL_MapColor (pdc->gc, &color);    UNLOCK_GDI();     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;    LOCK_ECRGN(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);    LOCK_GDI();    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);    UNLOCK_GDI();    UNLOCK_ECRGN();}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;#ifndef _LITE_VERSION    pdc = dc_HDC2PDC(hdc);#endif    LOCK_ECRGN(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;    LOCK_GDI();    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);    UNLOCK_GDI();    UNLOCK_ECRGN();}void GUIAPI Rectangle(HDC hdc, int x0, int y0, int x1, int y1){    PCLIPRECT pClipRect;    PDC pdc;    RECT rcOutput;#ifndef _LITE_VERSION    pdc = dc_HDC2PDC(hdc);#endif    LOCK_ECRGN(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 ++;    LOCK_GDI();    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);    UNLOCK_GDI();    UNLOCK_ECRGN();}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 = NULL;    BYTE* hline1 = NULL, * hline2 = NULL;    BYTE* vline1 = NULL, * vline2 = NULL;    int bpp;    BYTE xor_byte;    pdc = dc_HDC2PDC(hdc);    if (GAL_BitsPerPixel (pdc->gc) < 8)        xor_byte = 0x0F;    else        xor_byte = 0xFF;    bpp = GAL_BytesPerPixel (pdc->gc);    LOCK_ECRGN(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;    LOCK_GDI();    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);    UNLOCK_GDI();    UNLOCK_ECRGN();#ifndef HAVE_ALLOCA    free (vbuff);#endif}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产凹凸在线观看一区二区| 午夜欧美电影在线观看| 国产一区二区三区四区五区入口 | 精品污污网站免费看| 亚洲一卡二卡三卡四卡无卡久久| 欧美在线免费视屏| 日本不卡的三区四区五区| 日韩一区二区免费高清| 国产美女主播视频一区| 国产精品五月天| 在线免费观看不卡av| 日韩综合在线视频| 欧美成人乱码一区二区三区| 粉嫩一区二区三区性色av| 亚洲美女免费视频| 欧美一区二区在线观看| 国产一区不卡精品| 一区二区三区色| 日韩欧美一二三区| 99久久夜色精品国产网站| 亚洲一级不卡视频| 久久色.com| 色噜噜狠狠色综合欧洲selulu| 天堂在线亚洲视频| 国产区在线观看成人精品| 在线亚洲免费视频| 国产一区二区0| 亚洲午夜免费电影| 国产日韩v精品一区二区| 欧美四级电影网| 国产福利一区在线观看| 亚洲主播在线播放| 国产亚洲欧洲997久久综合| 在线亚洲高清视频| 国产精品一区二区你懂的| 亚洲一区二区三区在线看| 久久久久亚洲蜜桃| 欧美卡1卡2卡| av爱爱亚洲一区| 国精产品一区一区三区mba桃花 | 国产精品拍天天在线| 在线不卡的av| 一本一道波多野结衣一区二区| 黄色成人免费在线| 日韩福利电影在线观看| 亚洲激情五月婷婷| 日本一区二区三区视频视频| 欧美一区二区三区免费在线看| 91丨九色丨蝌蚪丨老版| 久久99精品国产.久久久久久| 亚洲国产成人av网| 亚洲女同一区二区| 中文字幕一区在线| 国产婷婷一区二区| 日韩精品一区二区三区中文不卡| 欧美色视频在线| 色狠狠色噜噜噜综合网| 懂色av一区二区三区蜜臀| 精品亚洲国产成人av制服丝袜| 天堂午夜影视日韩欧美一区二区| 亚洲另类在线制服丝袜| 中文字幕一区二区三区四区| 久久新电视剧免费观看| 精品国产免费久久| 精品国产一区a| 欧美一区二区免费视频| 欧美精品九九99久久| 欧美三级日韩三级| 欧美三级韩国三级日本三斤| 欧美性xxxxxx少妇| 欧美日韩一区 二区 三区 久久精品| 99国产精品久久久| 91麻豆蜜桃一区二区三区| 成人在线视频首页| 成人av在线播放网站| 白白色亚洲国产精品| 成人福利视频在线| 91网站在线播放| 欧美午夜理伦三级在线观看| 欧美视频一区二区三区在线观看| 欧美伊人久久大香线蕉综合69| 91福利精品第一导航| 欧美日韩一区不卡| 欧美不卡一二三| 国产日韩欧美精品电影三级在线 | 国产精品久久久久久久久搜平片| 日本一区二区三区免费乱视频| 国产精品久久久久一区| 亚洲毛片av在线| 丝袜诱惑制服诱惑色一区在线观看 | 丝袜国产日韩另类美女| 老司机精品视频一区二区三区| 狠狠色丁香久久婷婷综| 成人性生交大片| 91麻豆国产自产在线观看| 欧美日韩一区二区三区高清| 日韩欧美激情一区| 欧美激情一区二区三区| 有坂深雪av一区二区精品| 石原莉奈一区二区三区在线观看 | 国产做a爰片久久毛片| 成人精品在线视频观看| 欧美性色黄大片| 欧美v日韩v国产v| 中文字幕亚洲区| 日韩国产一区二| 高清不卡在线观看| 欧美视频一区二区| 国产午夜精品一区二区三区视频| 亚洲色图.com| 久久精品国产澳门| 一本久久a久久精品亚洲| 91精品福利在线一区二区三区 | 国产精品网友自拍| 亚洲国产精品久久一线不卡| 韩国av一区二区三区在线观看| 成人的网站免费观看| 欧美丰满一区二区免费视频| 久久久av毛片精品| 亚洲国产中文字幕| 丁香婷婷深情五月亚洲| 7777精品伊人久久久大香线蕉 | 亚洲欧美另类久久久精品| 日韩精品一级二级| 成人av在线观| 精品国产伦理网| 亚洲午夜精品在线| 成人激情校园春色| 欧美不卡一二三| 亚洲h在线观看| 成人一级黄色片| 日韩小视频在线观看专区| 亚洲欧美日韩一区二区三区在线观看 | 日韩欧美亚洲国产精品字幕久久久| 国产精品久久久久aaaa樱花| 青青草精品视频| 欧美性感一区二区三区| 国产精品午夜免费| 极品少妇xxxx精品少妇| 欧美日韩色一区| 中文字幕一区二区三区色视频| 国产一区二区免费看| 日韩亚洲欧美成人一区| 婷婷亚洲久悠悠色悠在线播放| 91丨porny丨户外露出| 国产视频视频一区| 麻豆成人91精品二区三区| 欧美日韩一卡二卡三卡| 亚洲一区二区在线播放相泽| 91网站最新地址| 亚洲欧美在线观看| 顶级嫩模精品视频在线看| 久久九九影视网| 国产精品白丝jk白祙喷水网站| 日韩欧美视频在线| 青青草成人在线观看| 欧美精品一级二级| 亚洲成人免费在线| 欧美日韩国产美| 亚洲一区免费视频| 色菇凉天天综合网| 一区二区不卡在线视频 午夜欧美不卡在| 顶级嫩模精品视频在线看| 国产精品美女久久福利网站| 国产suv精品一区二区6| 中文字幕欧美日韩一区| 国产成人自拍网| 国产精品视频yy9299一区| 不卡的av在线播放| 自拍偷拍欧美激情| 91视频免费看| 亚洲综合视频网| 欧美另类高清zo欧美| 亚洲444eee在线观看| 5566中文字幕一区二区电影| 日韩av电影天堂| 欧美电视剧在线看免费| 激情综合色播激情啊| 国产网站一区二区三区| 99re8在线精品视频免费播放| 亚洲欧美偷拍卡通变态| 欧美日韩精品电影| 美女网站色91| 国产色91在线| 91丨porny丨国产| 亚洲综合色自拍一区| 日韩一区二区在线免费观看| 狠狠色丁香久久婷婷综合_中 | 国产精品一二二区| 中文字幕一区二区三区不卡在线| 欧美综合在线视频| 免费成人你懂的| 国产精品区一区二区三区| 欧美日韩国产高清一区二区三区 | 另类欧美日韩国产在线| 国产欧美日韩在线观看| 日本电影欧美片| 日av在线不卡| 最新日韩av在线| 日韩一区二区免费高清|