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

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

?? pixel_ops.c

?? miniucgui1.30版本的源碼
?? C
字號:
/*** $Id: pixel_ops.c,v 1.11 2003/09/04 06:02:53 weiym Exp $**** pixel_ops.c: pixel, horizontal, and vertical line operations**** Copyright (C) 2003 Feynman Software** Copyright (C) 2001 ~ 2002 Wei Yongming.**** Current maintainer: Wei Yongming.*//*** 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 "pixel_ops.h"BOOL _dc_cliphline (const RECT* cliprc, int* px, int* py, int* pw){    if ( (*px >= cliprc->right) || (*py >= cliprc->bottom) ||             (*px + *pw < cliprc->left) || (*py < cliprc->top) )        return FALSE;    if ( (*px >= cliprc->left) && (*py >= cliprc->top) &&             (*px + *pw < cliprc->right) && (*py < cliprc->bottom) )        return TRUE;                if (*px < cliprc->left) {        *pw -= cliprc->left - *px;        *px = cliprc->left;    }    if (*px + *pw - 1 >= cliprc->right)            *pw = cliprc->right - *px;    if (*pw <= 0)        return FALSE;    return TRUE;        }BOOL _dc_clipvline (const RECT* cliprc, int* px, int* py, int* ph){    if ( (*px >= cliprc->right) || (*py >= cliprc->bottom) ||             (*px < cliprc->left) || (*py + *ph < cliprc->top) )        return FALSE;    if ( (*px >= cliprc->left) && (*py >= cliprc->top) &&             (*px < cliprc->right) && (*py + *ph < cliprc->bottom) )        return TRUE;                if (*py < cliprc->top) {        *ph -= cliprc->top - *py;        *py = cliprc->top;    }    if (*py + *ph >= cliprc->bottom)            *ph = cliprc->bottom - *py;    if (*ph <= 0)        return FALSE;    return TRUE;        }void _dc_drawvline (PDC pdc, int h){    while (h > 0) {        pdc->set_pixel (pdc);        _dc_step_y (pdc, pdc->step);        h -= pdc->step;    }}/* find the ban in which the scanline lies */static PCLIPRECT _dc_which_region_ban (PDC pdc, int y){    CLIPRGN* region = &pdc->ecrgn;    PCLIPRECT cliprect;    /* check with bounding rect of clipping region */    if (y >= region->tail->rc.bottom || y < region->head->rc.top) {        pdc->cur_ban = NULL;        goto ret;    }    if (pdc->cur_ban)        cliprect = pdc->cur_ban;    else        cliprect = region->head;    /* find the ban in which this point lies */    if (y < cliprect->rc.top) { /* backward */        while (cliprect && y < cliprect->rc.top) {            cliprect = cliprect->prev;        }        if (cliprect) {            int top;            top = cliprect->rc.top;            while (cliprect && top == cliprect->rc.top) {                cliprect = cliprect->prev;            }            if (cliprect)                cliprect = cliprect->next;            else                cliprect = region->head;        }    }    else { /* forward */        while (cliprect && y >= cliprect->rc.bottom) {            cliprect = cliprect->next;        }    }    pdc->cur_ban = cliprect;ret:    return pdc->cur_ban;}#define INRECT(r, x, y) \      ( ( ((r).right >  x)) && \      ( ((r).left <= x)) && \      ( ((r).bottom >  y)) && \      ( ((r).top <= y)) )void _dc_set_pixel_clip (void* context, int x, int y){    PDC pdc = (PDC)context;    PCLIPRECT cliprect;    if (_dc_which_region_ban (pdc, y)) {        int top;        /* draw in this ban */        cliprect = pdc->cur_ban;        top = cliprect->rc.top;        while (cliprect && cliprect->rc.top == top) {            if (INRECT (pdc->rc_output, x, y) && INRECT (cliprect->rc, x, y)) {                pdc->move_to (pdc, x, y);                pdc->set_pixel (pdc);                break;            }            cliprect = cliprect->next;        }    }}void _dc_set_pixel_noclip (void* context, int stepx, int stepy){    PDC pdc = (PDC)context;    if (stepx) pdc->step_x (pdc, stepx);    if (stepy) _dc_step_y (pdc, stepy);    pdc->set_pixel (pdc);}void _dc_set_pixel_pair_clip (void* context, int x1, int x2, int y){    PDC pdc = (PDC)context;    PCLIPRECT cliprect;    BOOL first_drawn = FALSE;    if (x1 > x2) {        int tmp = x2;        x2 = x1;        x1 = tmp;    }    if (_dc_which_region_ban (pdc, y)) {        int top;        /* draw in this ban */        cliprect = pdc->cur_ban;        top = cliprect->rc.top;        while (cliprect && cliprect->rc.top == top) {            if (INRECT (pdc->rc_output, x1, y) && INRECT (cliprect->rc, x1, y)) {                pdc->move_to (pdc, x1, y);                pdc->set_pixel (pdc);                first_drawn = TRUE;                break;            }            cliprect = cliprect->next;        }        if (x1 != x2) {            if (!first_drawn) cliprect = pdc->cur_ban;            while (cliprect && cliprect->rc.top == top) {                if (INRECT (pdc->rc_output, x2, y) && INRECT (cliprect->rc, x2, y)) {                    pdc->move_to (pdc, x2, y);                    pdc->set_pixel (pdc);                    break;                }                cliprect = cliprect->next;            }        }    }}void _dc_draw_hline_clip (void* context, int x1, int x2, int y){    PDC pdc = (PDC)context;    PCLIPRECT cliprect;    int top, w;    if (x1 == x2) {        if (!(x1 % pdc->step))            _dc_set_pixel_clip (pdc, x1, y);        return;    }    if (x1 > x2) {        int tmp = x2;        x2 = x1;        x1 = tmp;    }    if (_dc_which_region_ban (pdc, y)) {        /* draw this horizontal line in this ban */        cliprect = pdc->cur_ban;        top = cliprect->rc.top;        w = x2 - x1 + 1;        while (cliprect && cliprect->rc.top == top) {            RECT eff_rc;            int _x = x1, _y = y, _w = w;            if (IntersectRect (&eff_rc, &pdc->rc_output, &cliprect->rc)                    && _dc_cliphline (&eff_rc, &_x, &_y, &_w)) {                /* hack for dot line */                _x += (_x % pdc->step);                _w -= (_x % pdc->step) * 2;                if (_w > 0) {                    pdc->move_to (pdc, _x, _y);                    pdc->draw_hline (pdc, _w);                }            }            cliprect = cliprect->next;        }    }}void _dc_draw_vline_clip (void* context, int y1, int y2, int x){    PDC pdc = (PDC)context;    PCLIPRECT cliprect;    int top, h;    if (y1 == y2) {        if (!(y1 % pdc->step))            _dc_set_pixel_clip (pdc, x, y1);        return;    }    if (y1 > y2) {        int tmp = y2;        y2 = y1;        y1 = tmp;    }    /* check with bounding rect of clipping region */    if (y1 >= pdc->ecrgn.tail->rc.bottom || y2 < pdc->ecrgn.head->rc.top) {        return;    }    cliprect = pdc->ecrgn.head;    do {        /* find the next ban intersects with this vertical line */        while (cliprect && y1 >= cliprect->rc.bottom) {            cliprect = cliprect->next;        }        if (!cliprect) return;        /* find the clipping rect intersects with this vertical line in this ban */        top = cliprect->rc.top;        while (cliprect && cliprect->rc.top == top) {            int _y, _h;            RECT eff_rc;            if (IntersectRect (&eff_rc, &pdc->rc_output, &cliprect->rc)                    && (x >= eff_rc.left && x < eff_rc.right)) {                if (y1 < eff_rc.top)                    y1 = eff_rc.top;                if (y2 >= eff_rc.bottom)                    h = eff_rc.bottom - y1;                else                    h = y2 - y1;                /* hack for dot line */                _y = y1 + (y1 % pdc->step);                _h = h - (y1 % pdc->step) * 2;                if (_h > 0) {                    pdc->move_to (pdc, x, _y);                    _dc_drawvline (pdc, _h);                }                                if (h > 0)                    y1 += h;            }            cliprect = cliprect->next;        }    } while (cliprect && y2 > y1);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品噜噜噜成人av农村| 中文子幕无线码一区tr | 国产精品理论在线观看| 亚洲人成网站在线| 亚洲一区在线看| 麻豆高清免费国产一区| 成人午夜在线视频| 91电影在线观看| 日韩精品一区二区三区老鸭窝| 国产亚洲一本大道中文在线| 亚洲欧美欧美一区二区三区| 日本vs亚洲vs韩国一区三区 | 久久久综合九色合综国产精品| 国产精品第13页| 日韩高清欧美激情| 国产宾馆实践打屁股91| 欧美日韩综合色| 国产欧美日韩另类视频免费观看| 亚洲精品久久久久久国产精华液| 免费一级片91| 色综合色综合色综合 | 国产一区美女在线| 在线国产电影不卡| 2014亚洲片线观看视频免费| 亚洲国产视频网站| 国产成人8x视频一区二区| 欧美日本在线一区| 国产精品色噜噜| 奇米在线7777在线精品| 色婷婷综合久久久中文一区二区| xfplay精品久久| 视频一区视频二区中文字幕| av电影在线观看完整版一区二区 | 国精产品一区一区三区mba桃花 | 亚洲成人午夜影院| 成人毛片在线观看| 精品少妇一区二区三区视频免付费| 蜜臀精品久久久久久蜜臀 | 亚洲成人第一页| 成人a区在线观看| 亚洲精品一区二区三区蜜桃下载| 亚洲午夜在线电影| av欧美精品.com| 久久精品视频在线免费观看| 青青青爽久久午夜综合久久午夜| 色综合色综合色综合色综合色综合| 国产婷婷一区二区| 男男gaygay亚洲| 欧美美女一区二区在线观看| 亚洲精品高清视频在线观看| 成人理论电影网| 26uuu精品一区二区三区四区在线| 日韩高清在线一区| 欧美日韩三级在线| 亚洲一区免费观看| 一本久久精品一区二区| 国产精品欧美久久久久无广告 | 国产午夜久久久久| 久久国产精品99久久久久久老狼 | 日韩电影一区二区三区四区| 91极品美女在线| 亚洲人被黑人高潮完整版| 不卡的av网站| 国产午夜精品一区二区三区嫩草 | 国产日产欧美一区二区三区| 久久99国产精品免费| 日韩午夜中文字幕| 日产国产高清一区二区三区| 欧美日韩成人在线| 图片区小说区国产精品视频| 欧美午夜电影在线播放| 亚洲国产wwwccc36天堂| 欧美亚洲另类激情小说| 亚洲综合精品久久| 欧美性大战xxxxx久久久| 夜色激情一区二区| 91精品福利在线| 亚洲综合无码一区二区| 在线观看日韩毛片| 亚洲成人精品影院| 欧美精品乱码久久久久久按摩 | 国产精品美女久久久久aⅴ| 国产成人综合在线| 亚洲国产精品av| 91麻豆6部合集magnet| 亚洲免费毛片网站| 欧美三级在线看| 免费在线观看不卡| 久久久久久9999| 99热精品国产| 一区二区三区日本| 制服丝袜中文字幕一区| 美美哒免费高清在线观看视频一区二区 | 久久精品亚洲乱码伦伦中文| 成人激情小说网站| 亚洲美腿欧美偷拍| 欧美日韩国产高清一区二区| 日韩国产欧美视频| www国产精品av| 成人福利视频网站| 樱花影视一区二区| 884aa四虎影成人精品一区| 国内偷窥港台综合视频在线播放| 国产亚洲一区二区三区在线观看| 成人精品国产福利| 亚洲成a人片综合在线| 777奇米成人网| 国产成人免费视频精品含羞草妖精 | 美国一区二区三区在线播放| 欧美极品少妇xxxxⅹ高跟鞋 | 亚洲777理论| 精品成人a区在线观看| 91在线视频观看| 日韩电影在线一区二区三区| 久久婷婷综合激情| 色哟哟精品一区| 日韩av一区二区在线影视| 国产亚洲精久久久久久| 欧美系列日韩一区| 国产原创一区二区| 夜夜嗨av一区二区三区| 精品乱人伦小说| 一本到一区二区三区| 麻豆精品久久精品色综合| 中文字幕亚洲区| 日韩午夜激情视频| www.欧美亚洲| 久久国产精品99久久久久久老狼| |精品福利一区二区三区| 亚洲精品乱码久久久久久久久| 日韩三级精品电影久久久| eeuss鲁一区二区三区| 日韩二区在线观看| 亚洲美腿欧美偷拍| 久久久久高清精品| 欧美日韩一区二区三区视频| 国产成人精品一区二区三区网站观看| 亚洲第一久久影院| 国产精品嫩草影院com| 日韩视频一区二区在线观看| 色婷婷久久一区二区三区麻豆| 黑人巨大精品欧美黑白配亚洲| 亚洲国产欧美日韩另类综合| 亚洲国产精品国自产拍av| 日韩欧美第一区| 欧美综合欧美视频| 成人黄色一级视频| 精品一区二区三区在线播放| 亚洲aaa精品| 日韩理论片在线| 久久久久久久综合| 欧美一区中文字幕| 欧美图片一区二区三区| 99国产精品久久久久久久久久| 国产麻豆精品在线观看| 日本怡春院一区二区| 一区二区三区不卡在线观看| 中文字幕av一区二区三区免费看| 欧美大白屁股肥臀xxxxxx| 欧美伦理电影网| 在线中文字幕不卡| 97久久久精品综合88久久| 粉嫩欧美一区二区三区高清影视 | 久久久久久久久久久电影| 欧美一区二区三区日韩| 欧美丝袜丝交足nylons图片| 99精品1区2区| 91丝袜呻吟高潮美腿白嫩在线观看| 国产福利一区二区三区视频| 精品在线播放午夜| 人人精品人人爱| 秋霞国产午夜精品免费视频| 亚洲高清免费视频| 亚洲小少妇裸体bbw| 一区二区三区四区精品在线视频| 亚洲四区在线观看| 中文字幕中文字幕一区| 中日韩av电影| 国产精品三级久久久久三级| 国产视频一区不卡| 国产日韩精品一区二区三区| 久久伊人蜜桃av一区二区| 久久你懂得1024| 久久久久88色偷偷免费| 久久色成人在线| 国产色产综合色产在线视频| 国产日韩在线不卡| 亚洲国产精品99久久久久久久久| 中文字幕第一区第二区| 国产精品久久久久四虎| 国产精品不卡在线| 亚洲欧美日韩国产综合在线 | 欧美日本乱大交xxxxx| 国产精品你懂的在线欣赏| 亚洲欧洲成人精品av97| 1000部国产精品成人观看| 亚洲一区中文在线| 日韩精品成人一区二区在线| 欧美aaaaa成人免费观看视频| 久久成人免费日本黄色|