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

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

?? fblin1.c

?? 嵌入式系統圖形用戶界面編程
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*** $Id: fblin1.c,v 1.6 2003/11/22 11:49:29 weiym Exp $** ** fblin1.c: Frame buffer 1 bpp linear video driver for MiniGUI**  This driver is suitable for the most significant bit being right.**** Original author: Wang Jianwei, derived from fblin2.c.** Rewritten by Feynman Software.**** Copyright (C) 2003 Feynman Software.** Copyright (C) 2002 Wang Jianwei.**** 2002/01/13: Create by Wang Jianwei.** 2003/07/10: Cleanup by 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*/#include <stdlib.h>#include <string.h>#include "native.h"#include "fb.h"#ifdef _FBLIN1R_SUPPORT#define SHIFT(x) (x&7)static unsigned char pixmask [] = {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};static unsigned char pixnotmask [] = {0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};#define normalize_pixel(c) (c & 0x01)static inline gal_uint8* get_pixel_address (PSD psd, int x, int y){    return (gal_uint8 *) psd->addr + y*psd->linelen + (x >> 3);}static inline void xsetpixel_in_byte (int x, gal_pixel c, gal_uint8 *byte){    *byte = (*byte & (pixnotmask[x&7])) | ((c << SHIFT(x))^(*byte & pixmask[x&7]));}static inline void setpixel_in_byte (int x, gal_pixel c, gal_uint8 *byte){    *byte = (*byte & (pixnotmask[x&7])) | (c << SHIFT(x));}static inline gal_pixel getpixel_in_byte (int x, const gal_uint8 *byte){    gal_uint8 tmp = *byte;    tmp = tmp & pixmask[x&7];    return (tmp >> SHIFT(x));}static int fblin1_init (PSD psd){    if (!psd->size) {        psd->size = psd->yres * psd->linelen;        return 1;    }    return 1;}/* Set pixel at x, y, to gal_pixel c */static void fblin1_drawpixel (PSD psd, int x, int y, gal_pixel c){    c = normalize_pixel (c);    if (psd->gr_mode == MODE_XOR)        xsetpixel_in_byte (x, c, get_pixel_address (psd, x, y));    else        setpixel_in_byte (x, c, get_pixel_address (psd, x, y));}/* Read pixel at x, y */static gal_pixel fblin1_readpixel (PSD psd, int x, int y){    return getpixel_in_byte (x, get_pixel_address (psd, x, y));}/* Draw horizontal line from x1,y to x2,y including final point */static void fblin1_drawhline (PSD psd, int x, int y, int w, gal_pixel c){    gal_uint8 *addr;    int cc, i;    c = normalize_pixel (c);    cc = c  | (c << 1);    cc = cc | (cc << 2);    cc = cc | (cc << 4);        addr = get_pixel_address (psd, x, y);    if (psd->gr_mode == MODE_XOR) {        if (x & 7) {            for (i = x & 7; i & 7 && w > 0; i++) {                xsetpixel_in_byte (i, c, addr);                w--;            }            addr++;        }                while (w > 7) {            *addr++ ^= cc;            w -= 8;        }                if (w > 0) {            for (i = 0; i < w; i++)                xsetpixel_in_byte (i, c, addr);        }            } else {        if (x & 7) {            for (i = x & 7; i & 7 && w > 0; i++) {                setpixel_in_byte (i, c, addr);                w--;            }            addr++;        }                while (w > 7) {            *addr++ = cc;            w -= 8;        }                if (w > 0) {            for (i = 0; i < w; i++)                setpixel_in_byte (i, c, addr);        }    }}static void fblin1_drawvline (PSD psd, int x, int y, int h, gal_pixel c){    gal_uint8 *addr;    c = normalize_pixel (c);    addr = get_pixel_address (psd, x, y);        if (psd->gr_mode == MODE_XOR) {        while (h--) {            xsetpixel_in_byte (x, c, addr);            addr += psd->linelen;        }    }    else {        while (h--) {            setpixel_in_byte (x, c, addr);            addr += psd->linelen;        }    }}/* clip to screen */static void fblin1_getbox (PSD psd, int x, int y, int w, int h, void* buf){    int i;    gal_uint8 *dst = (gal_uint8*) buf;    const gal_uint8 *src;    int d_pitch = w;    if (y < 0) {        h += y;        dst -= y * d_pitch;        y = 0;    }    if (x < 0) {        w += x;        dst -= x;        x = 0;    }    if (y + h - 1 >= psd->yres)         h = psd->yres - y ;    if (x + w - 1 >= psd->xres)         w = psd->xres - x ;        if (w <= 0 || h <= 0) return;    w += x;    src = get_pixel_address (psd, x, y);    while (h--) {        const gal_uint8 *s_line = src;        gal_uint8 *d_line = dst;        i = x;        while (i < w) {            *d_line = getpixel_in_byte (i, s_line);            d_line++; i++;            if (!(i&7)) s_line++;        }        src += psd->linelen;        dst += d_pitch;    }}/* do clip */static void fblin1_putbox (PSD psd, int x, int y, int w, int h, void *buf){    int i;    const gal_uint8 *src = (gal_uint8*) buf;    gal_uint8 *dst;    int s_pitch = w;    if (psd->doclip) {        if (y < psd->clipminy) {            h -= psd->clipminy - y;            src += (psd->clipminy - y) * s_pitch;            y = psd->clipminy;        }        if (x < psd->clipminx) {            w -= psd->clipminx - x;            src += psd->clipminx - x;            x = psd->clipminx;        }        if (y + h - 1 >= psd->clipmaxy)            h = psd->clipmaxy- y;        if (x + w - 1 >= psd->clipmaxx)            w = psd->clipmaxx- x;    }    else {        if ( y < 0 ) {            h += y;            src += -y * s_pitch;            y = 0;        }        if ( x < 0 ) {            w += x;            src += -x;            x = 0;        }        if ( y + h  -1 >= psd->yres)            h = psd->yres - y;        if ( x + w  -1 >= psd->xres)            w = psd->xres - x;    }    if (w <= 0 || h <= 0) return;    w += x;    dst = get_pixel_address (psd, x, y);    while (h--) {        const gal_uint8 *s_line = src;        gal_uint8 *d_line = dst;        i = x;        while (i < w) {            setpixel_in_byte (i, normalize_pixel (*s_line), d_line);            s_line ++; i ++;            if (!(i&7)) d_line++;        }        dst += psd->linelen;        src += s_pitch;    }}/* do clip */static void fblin1_putboxmask (PSD psd, int x, int y, int w, int h, void *buf, gal_pixel cxx){    int i;    gal_uint8 *src = (gal_uint8*) buf;    gal_uint8 *dst;    int s_pitch =  w ;    if (psd->doclip) {            if (y < psd->clipminy) {            h -= psd->clipminy - y;            src += (psd->clipminy - y) * s_pitch;            y = psd->clipminy;        }        if (x < psd->clipminx) {            w -= psd->clipminx - x;            src += psd->clipminx - x;            x = psd->clipminx;        }                if (y + h - 1 >= psd->clipmaxy)             h =  psd->clipmaxy- y;        if (x + w - 1 >= psd->clipmaxx)             w =  psd->clipmaxx- x;    }    else {        if ( y < 0 ) {            h += y;            src += -y * s_pitch;            y = 0;        }        if ( x < 0 ) {            w += x;            src += -x;            x = 0;        }                if ( y + h  -1 >= psd->yres)             h = psd->yres - y ;        if ( x + w  -1 >= psd->xres)             w = psd->xres - x ;    }    if (w <= 0 || h <= 0) return;    cxx = normalize_pixel (cxx);    w += x;    dst = get_pixel_address (psd, x, y);    while (h--) {        gal_uint8 *s_line = src;        gal_uint8 *d_line = dst;        i = x;        while (i < w) {            gal_uint8 spix = normalize_pixel (*s_line);            if (spix != cxx)                setpixel_in_byte (i, spix, d_line);            s_line++; i++;            if (!(i&7)) d_line ++;        }        dst += psd->linelen;        src += s_pitch;    }}static unsigned char right_side_mask [] = {0xff,0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80};static unsigned char left_side_mask [] = {0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f};static unsigned char right_ban_mask [] = {0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff};static unsigned char left_ban_mask [] = {0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff};/* copy line from left to right */static void fblin1_copyline_lr (gal_uint8 *src, int x1, gal_uint8 *dst, int x2, int w){    int s_head = x1 & 7;    int d_head = x2 & 7;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品私人影院| 国产一区 二区| 国产一区二区久久| 日韩激情一二三区| xfplay精品久久| 国产激情一区二区三区| 亚洲男人的天堂一区二区 | 亚洲成av人片一区二区三区| 欧美在线观看视频一区二区 | 午夜不卡av在线| 一本久久a久久精品亚洲| 国产精品久久久久aaaa樱花| 91成人国产精品| 国产一区二区美女诱惑| 国产福利电影一区二区三区| 国产风韵犹存在线视精品| 成人美女视频在线观看18| 一区二区不卡在线播放 | 国产麻豆9l精品三级站| 国产麻豆精品视频| 不卡电影一区二区三区| 视频一区中文字幕| 美女网站在线免费欧美精品| 成人免费视频在线观看| 国产午夜精品一区二区三区视频| 91黄色小视频| 日韩三级免费观看| 91成人免费网站| 欧美一区中文字幕| 欧美三级午夜理伦三级中视频| 精品综合久久久久久8888| 亚洲一区在线观看免费观看电影高清| 国产欧美视频一区二区| 精品剧情在线观看| 欧美日韩国产天堂| 色伊人久久综合中文字幕| 欧美撒尿777hd撒尿| 精品国产欧美一区二区| 欧美一区二区三区视频免费播放| 久久久久99精品一区| 日韩一区二区在线观看视频 | 成人av一区二区三区| 欧美区一区二区三区| 国产日韩欧美麻豆| 石原莉奈在线亚洲三区| 成人网在线免费视频| 欧美一区二区三区啪啪| 中文字幕视频一区| 国产美女精品在线| 欧美另类久久久品| 日韩视频免费观看高清完整版| 国产精品每日更新在线播放网址 | 日韩一区二区免费电影| 国产精品色一区二区三区| 天堂va蜜桃一区二区三区| 成人精品小蝌蚪| 久久久99精品免费观看| 奇米综合一区二区三区精品视频| 麻豆成人免费电影| 欧美伊人久久久久久久久影院| 欧美日韩一区国产| 综合婷婷亚洲小说| 亚洲gay无套男同| 91丨porny丨中文| 91福利资源站| ●精品国产综合乱码久久久久 | 久久精品欧美日韩精品| 男男视频亚洲欧美| 欧美精品色一区二区三区| 亚洲精品乱码久久久久久日本蜜臀 | 欧美日韩中文另类| 国产清纯美女被跳蛋高潮一区二区久久w | 高清国产一区二区三区| 国产精品一区2区| va亚洲va日韩不卡在线观看| 一本久久a久久免费精品不卡| 欧美—级在线免费片| 夜夜揉揉日日人人青青一国产精品| 成人黄页在线观看| 国产精品区一区二区三| 成人精品视频一区| 成人免费在线视频| 色婷婷精品大在线视频 | 欧美日韩美少妇| 亚洲国产成人91porn| 国产在线视频一区二区三区| 91麻豆国产自产在线观看| 国产精品久久久久aaaa| 97国产一区二区| 日韩午夜激情av| 国产精品影视网| 中文字幕欧美国产| 一本大道久久a久久综合| 夜夜嗨av一区二区三区四季av| 91猫先生在线| 香蕉成人啪国产精品视频综合网 | 色八戒一区二区三区| 亚洲成a人在线观看| 日韩精品一区二区三区在线观看| 亚洲图片你懂的| 欧美三级一区二区| 国产一区二区三区av电影| 国产精品美女久久久久久久久| 91免费在线视频观看| 婷婷开心久久网| 久久综合九色欧美综合狠狠| 不卡影院免费观看| 丝袜国产日韩另类美女| 国产无遮挡一区二区三区毛片日本| 不卡一区二区在线| 热久久久久久久| 国产精品夫妻自拍| 欧美一区二区三区在线观看视频| 国产精品自拍一区| 亚洲成人777| 国产亚洲精品aa| 欧美日韩mp4| 成人自拍视频在线观看| 日韩av不卡在线观看| 91精品国产91久久久久久最新毛片| 国产乱对白刺激视频不卡| 一区二区成人在线| 中文字幕第一页久久| 在线电影国产精品| 972aa.com艺术欧美| 久久超级碰视频| 久久亚洲精品国产精品紫薇| 日本精品视频一区二区三区| 国产乱淫av一区二区三区| 亚洲成人综合在线| 国产精品视频你懂的| 日韩欧美国产综合一区 | 久久久精品国产免费观看同学| 欧美日本韩国一区二区三区视频| 丰满少妇在线播放bd日韩电影| 五月天精品一区二区三区| 中文字幕在线观看一区| 久久综合久久综合久久综合| 欧美日韩视频专区在线播放| 色综合中文字幕国产| 欧美国产精品中文字幕| 日韩西西人体444www| 欧美日韩亚洲国产综合| 91啪亚洲精品| 99精品桃花视频在线观看| 国产成人午夜片在线观看高清观看| 天天免费综合色| 亚洲一二三级电影| 夜夜亚洲天天久久| 一区二区不卡在线视频 午夜欧美不卡在| 久久婷婷国产综合国色天香| 精品国产精品一区二区夜夜嗨| 91精品一区二区三区久久久久久 | 成人av综合一区| 国产精品伊人色| 国产精品77777| 国产91精品精华液一区二区三区| 国产在线看一区| 国产91精品欧美| k8久久久一区二区三区| 成人91在线观看| 91精品1区2区| 欧美日本在线观看| 欧美一区午夜精品| 久久亚洲二区三区| 国产网红主播福利一区二区| 国产精品乱码人人做人人爱| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 成人av在线看| 99久久国产综合精品色伊 | 日韩一区在线免费观看| 亚洲另类一区二区| 亚洲h动漫在线| 韩国在线一区二区| caoporn国产精品| 欧美日韩在线直播| 欧美一二三区在线观看| 国产日韩欧美不卡| 亚洲欧美激情小说另类| 热久久国产精品| 成人一区二区三区在线观看| 在线影视一区二区三区| 欧美一区二区三区四区高清| 国产欧美精品日韩区二区麻豆天美| 亚洲视频中文字幕| 日韩精品成人一区二区三区| 国产自产高清不卡| 一本大道av一区二区在线播放| 7777精品伊人久久久大香线蕉完整版| 欧美成人video| 亚洲免费观看在线观看| 久久成人麻豆午夜电影| 色综合久久中文字幕| 欧美一卡2卡3卡4卡| 亚洲欧洲美洲综合色网| 免费欧美在线视频| 色综合欧美在线视频区| 久久久91精品国产一区二区精品| 亚洲无线码一区二区三区| 国产露脸91国语对白|