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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? draw-lite.c

?? miniucgui1.30版本的源碼
?? C
字號(hào):
/* ** $Id: draw-lite.c,v 1.13 2003/09/04 03:09:52 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;    if (!(vbuff = alloca ((sizeh << 1) + (sizev << 1))))        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);}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人综合网站| 欧美刺激午夜性久久久久久久| 亚洲韩国精品一区| 久久久久久久综合色一本| 欧美色图第一页| 国产激情精品久久久第一区二区| 亚洲黄色录像片| 国产欧美日本一区视频| 欧美精品三级在线观看| 成人精品高清在线| 国产一区在线视频| 亚洲一区二区三区在线| 自拍偷自拍亚洲精品播放| 精品免费99久久| 欧美日韩在线电影| 91丨九色丨尤物| 国产精品一品二品| 精品一区二区免费在线观看| 亚洲国产va精品久久久不卡综合| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 蜜臀av亚洲一区中文字幕| 一区二区三区不卡在线观看| 国产精品日韩成人| 国产午夜精品理论片a级大结局| 日韩一区二区精品葵司在线| 欧美视频中文字幕| 欧洲人成人精品| 91久久国产最好的精华液| 成人福利在线看| 成人性色生活片| 成人午夜在线播放| 国产精品一区二区免费不卡| 国产一区二区中文字幕| 狠狠网亚洲精品| 韩国午夜理伦三级不卡影院| 另类欧美日韩国产在线| 久久国产精品免费| 美女爽到高潮91| 石原莉奈在线亚洲三区| 天堂蜜桃91精品| 日韩av在线免费观看不卡| 婷婷丁香久久五月婷婷| 午夜亚洲福利老司机| 亚洲午夜激情网页| 天天操天天色综合| 日韩av不卡一区二区| 三级一区在线视频先锋| 免费观看91视频大全| 黄色资源网久久资源365| 久久国产乱子精品免费女| 老色鬼精品视频在线观看播放| 久久99这里只有精品| 激情综合五月婷婷| 成人免费视频视频| 色婷婷综合中文久久一本| 欧美影视一区二区三区| 欧美人伦禁忌dvd放荡欲情| 欧美一区二区三区精品| 精品国精品国产尤物美女| wwwwxxxxx欧美| 亚洲欧洲韩国日本视频| 一区二区三区 在线观看视频| 亚洲午夜精品在线| 蜜臀精品一区二区三区在线观看| 精品无人码麻豆乱码1区2区| 丁香另类激情小说| 色婷婷亚洲精品| 日韩一区二区三| 中文字幕中文字幕中文字幕亚洲无线| 亚洲色图制服诱惑 | 蜜桃av噜噜一区二区三区小说| 激情文学综合网| 91亚洲男人天堂| 欧美日韩国产高清一区| xfplay精品久久| 最新日韩av在线| 三级久久三级久久| 国产a精品视频| 欧美视频一二三区| 久久久久久99精品| 亚洲一区二区三区四区五区中文| 男人的天堂亚洲一区| 成人av网在线| 91麻豆精品国产91久久久更新时间| 久久亚洲二区三区| 亚洲综合一区二区三区| 精品中文av资源站在线观看| 99久久精品国产精品久久| 欧美一区二区三级| 亚洲免费电影在线| 国产精品一线二线三线精华| 欧美日韩一区在线| 欧美国产欧美综合| 蜜臀久久久久久久| 在线视频国内自拍亚洲视频| 久久精品视频一区二区| 欧美aaaaa成人免费观看视频| 91网址在线看| 久久麻豆一区二区| 美女视频黄 久久| 欧美综合久久久| 国产精品乱码一区二三区小蝌蚪| 日本亚洲电影天堂| 欧美三级三级三级爽爽爽| 国产精品美女久久久久aⅴ | 国产精品美女久久久久久久网站| 国产精品天干天干在观线| 亚洲综合色成人| 国产91精品一区二区麻豆亚洲| 在线观看91视频| 日韩一二在线观看| 中文字幕亚洲不卡| 免费一区二区视频| 欧美在线一二三| 中文字幕的久久| 久久精品国产第一区二区三区| av中文字幕不卡| 久久精品亚洲麻豆av一区二区| 日韩精彩视频在线观看| aa级大片欧美| 国产日韩欧美不卡| 奇米色777欧美一区二区| 欧美片网站yy| 亚洲欧美日韩国产综合| 国产一区欧美日韩| 日韩欧美中文一区| 亚洲素人一区二区| 色综合久久综合网欧美综合网 | 欧美午夜精品久久久久久超碰| 国产欧美日本一区二区三区| 国产一区二区三区电影在线观看| 欧美日韩精品福利| 夜夜夜精品看看| 国产乱淫av一区二区三区 | 自拍偷拍国产亚洲| 国产又黄又大久久| 日韩免费视频一区| 婷婷久久综合九色综合伊人色| 欧美日韩国产影片| 一区二区三区在线视频观看| 成人h动漫精品| 中文字幕av一区二区三区免费看| 久久精品久久精品| 99综合电影在线视频| 亚洲日本在线观看| 99riav久久精品riav| 中文字幕一区二区视频| 国产99精品视频| 国产精品美女久久久久久2018| 国产成人精品免费| 日本一区二区三区免费乱视频| 国产曰批免费观看久久久| 久久综合狠狠综合久久综合88 | 国产欧美视频在线观看| 麻豆国产91在线播放| 欧美电影免费提供在线观看| 免费在线看成人av| 精品入口麻豆88视频| 久久精品国产免费看久久精品| 久久久亚洲高清| 成人一区二区三区在线观看| 日本一区二区久久| 成人精品国产福利| 亚洲欧美视频一区| 日韩一区二区视频| 欧美aⅴ一区二区三区视频| 欧美一级一级性生活免费录像| 日本vs亚洲vs韩国一区三区二区 | 亚洲精品一区二区三区在线观看| 极品销魂美女一区二区三区| 国产亚洲精品久| 9人人澡人人爽人人精品| 亚洲精品久久久蜜桃| 国产在线精品一区二区三区不卡| 国产精品人妖ts系列视频| 91丝袜美腿高跟国产极品老师 | 久久久国产精品麻豆| 狠狠狠色丁香婷婷综合久久五月| 久久综合色之久久综合| 国产成人8x视频一区二区| 亚洲视频在线观看三级| 欧美日韩一区二区在线观看| 五月综合激情婷婷六月色窝| 久久色成人在线| 91视频在线观看| 日韩电影在线看| 26uuu另类欧美亚洲曰本| 欧美中文字幕久久| 国内精品国产三级国产a久久| 中文字幕乱码日本亚洲一区二区| 色综合久久中文综合久久牛| 麻豆精品国产传媒mv男同| 一区在线观看视频| 91精品国产综合久久香蕉麻豆| 国产精品18久久久久久久网站| 亚洲视频一区二区免费在线观看| 日韩欧美国产精品| 色婷婷久久久亚洲一区二区三区| 蜜桃久久久久久| 亚洲精品国产一区二区精华液 |