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

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

?? lcd.c

?? 嵌入式系統
?? C
?? 第 1 頁 / 共 5 頁
字號:
            padrs = xadrs;
#ifdef APD_LCD_BEBO
            if (hword)
                padrs--;
            else
                padrs++;
#endif  /* APD_LCD_BEBO */
            LCDSetPixelByShort(padrs, (unsigned short)current_gc.c);
        }

        bit_mask >>= 1;
        if (!(bit_mask))
            bit_mask = LCD_PAT_MASK;
        xadrs++;
        hword ^= 0x01;
    }
    LCDMemcpyWord((unsigned long *)adrs, (unsigned long *)LineData,
                  (unsigned long)(bufsize >> 1) );
}

/******************************************************************************
@@
@@ [Name]       : LCDOverwriteHline
@@
@@ [Summary]    : Overwrite a horizontal line segment
@@
@@ [Argument]   : adrs  : Address of horizontal line
@@                hword : Half word offset of address
@@                byte  : Byte offset of address
@@                bit   : Bit offset of address
@@                size  : Number of pixel
@@                color : Color to overwrite
@@ [Return]     : None
@@
@@ [Desc]       : Overwrite a horizontal line segment regardless of
@@                current raster operation
@@                Valid attribute : Color
@@
@@ [History]    : Date        Modifier        Comment
@@
@@ [END]
******************************************************************************/
static void LCDOverwriteHline(
unsigned long  *adrs,
unsigned char   hword,
unsigned char   byte,
unsigned char   bit,
short   size,
unsigned long   color
)
{
/*
   If APD_LCD_BPP is 16BPP, access to memory by a half word unit.
   So if LCD byte endian is little endian, the half word address
   to write pixel data isn't controlled.
   But if it is big endian, the one is controlled in front and behind.
*/
    unsigned long   l_color;
    APD_LCD_ROP_TYPE    rop_bak = current_gc.rop;

    color &= 0x0000FFFF;
    l_color = (unsigned long)((color << 16) | color);

    current_gc.rop = APD_LCD_ROP_S;
    if (hword) {
        unsigned long *hw_adrs;

        hw_adrs = adrs;
#ifdef APD_LCD_BEBO
        hw_adrs--;
#endif  /* APD_LCD_BEBO */
        LCDSetPixelByShort(hw_adrs, (unsigned short)color);
        size--;
        adrs++;
    }

    if (size >> 1) {
        LCDMemsetWord((unsigned long *)adrs, l_color, size >> 1);
        adrs += (unsigned long)size & 0xffffFFFE;
        size &= 0x0001;
    }

    if (size) {
#if(defined(APD_LCD_BEBO))
        adrs++;
#endif  /* defined(APD_LCD_BEBO) */
        LCDSetPixelByShort(adrs, (unsigned short)color);
    }
    current_gc.rop = rop_bak;
}

/******************************************************************************
@@ [Name]       : apd_LCDDrawLine
@@ [Summary]    : Draw line segment
@@ [Argument]   : sp : Coordinate data of the start point
@@                ep : Coordinate data of the end point
@@ [Return]     : None
@@ [Desc]       : Draw the specific line data (neither vertical nor
@@                horizontal line) according to the current attribute.
@@                Include the start point in line segment,
@@                but not the stop point.
@@                Valid attribute : Color, Raster operation, Line width,Line type
@@ [History]    : Date      Modifier    Comment
******************************************************************************/
void apd_LCDDrawLine(APD_LCD_POINT *sp,APD_LCD_POINT *ep)
{
    short dx, dy;
    unsigned short adx, ady, i;
    APD_LCD_POINT p;
    short sdx, sdy;
    short x, y;
    unsigned char bit_mask;

    dx = ep->x - sp->x + 1;
    dy = ep->y - sp->y + 1;
    sdx = LCDSign( dx );
    sdy = LCDSign( dy );
    adx = abs( dx );
    ady = abs( dy );
    x = 0;
    y = 0;
    p.x = sp->x;
    p.y = sp->y;

/* Set line type pattern */
    bit_mask = LCD_PAT_MASK;

/* If the slope is less than 1 (calcurate  the value of Y coordinate
   every X coordinate) */
    if (adx >= ady) {
        for (i = 0; i < adx; i++) {
/* Check the renewal Y coordinate value */
            y += ady;
            if (y >= adx) {
                y -= adx;
                p.y += sdy;
            }

/* Draw pixel */
            if (current_line_pat & bit_mask) {
/* Case of less than 1 line width */
                if (current_gc.lw <= 1)
                    apd_LCDDrawPixel( &p );

                else {
                    APD_LCD_POINT vp1, vp2;
                    unsigned char lt_bak;
                    APD_LCD_LINE_WIDTH lw_bak;
/* Set vertical line for line width */
                    if (p.y < (current_gc.lw >> 1))
                        vp1.y = 0;
                    else
                        vp1.y = p.y - (current_gc.lw >> 1);
                    vp2.y = p.y + (current_gc.lw >> 1) +
                        (current_gc.lw & 0x01);
                    vp1.x = vp2.x = p.x;
/* Save line type and width */
                    lt_bak = current_line_pat;
                    lw_bak = current_gc.lw;
                    current_line_pat = LCD_LINE_PAT[APD_LCD_LINE_SOLID];
                    current_gc.lw = APD_LCD_LINE_THIN;
/* Draw vertical line for line width */
                    apd_LCDDrawVline(&vp1, &vp2);
/* Return line type and width */
                    current_line_pat = lt_bak;
                    current_gc.lw = lw_bak;
                }
            }
            bit_mask >>= 1;
            if (bit_mask == 0)
                bit_mask = LCD_PAT_MASK;
            p.x += sdx;
        }
    }
/* If the slope is more than 1 (calcurate  the value of X coordinate
   every Y coordinate) */
    else {
        for (i = 0; i < ady; i++, (p.y += sdy)) {
/* Check the reneal X coordinate value */
            x += adx;
            if (x >= ady) {
                x -= ady;
                p.x += sdx;
            }

/* Draw pixel */
            if (p.y < 0)
                continue;
            if (current_line_pat & bit_mask) {
/* case of less than 1 line width */
                if (current_gc.lw <= 1)
                    apd_LCDDrawPixel( &p );

                else {
                    APD_LCD_POINT vp1, vp2;
                    APD_LCD_LINE_TYPE lt_bak;
                    unsigned char lp_bak;
                    APD_LCD_LINE_WIDTH lw_bak;
/* Set vertical line for line width */
                    if (p.x < (current_gc.lw >> APD_LCD_LINE_THIN))
                        vp1.x = 0;
                    else
                        vp1.x = p.x - (current_gc.lw >> 1);
                    vp2.x = p.x + (current_gc.lw >> 1) +
                        (current_gc.lw & 0x01);
                    vp1.y = vp2.y = p.y;
/* Save line type and width */
                    lt_bak = current_gc.lt;
                    lp_bak = current_line_pat;
                    lw_bak = current_gc.lw;
#if (APD_LCD_BPP == 16)
                    current_line_pat = LCD_LINE_PAT[APD_LCD_LINE_SOLID];
#else
                    current_gc.lt = APD_LCD_LINE_SOLID;
#endif
                    current_gc.lw = APD_LCD_LINE_THIN;
/* Draw vertical line for line width */
                    apd_LCDDrawHline(&vp1, &vp2);
/* Return line type and width */
                    current_gc.lt = lt_bak;
                    current_line_pat = lp_bak;
                    current_gc.lw = lw_bak;
                }
            }
            bit_mask >>= 1;
            if (bit_mask == 0)
                bit_mask = LCD_PAT_MASK;
        }
    }
    return;
}
/******************************************************************************
@@ [Name]       : apd_LCDDrawEllipse
@@ [Summary]    : Draw an ellipse
@@ [Argument]   : cx : center X coordinate value
@@                cy : center Y coordinate value
@@                rx : radius of width
@@                ry : radius of height
@@ [Return]     : None
@@ [Desc]       : Draw an ellipse which adjoins the corresponding rectangle
@@                data according to current attributes.
@@                Valid attribute : Color, Raster operation, Line type
@@ [Comment]    : Line width = 1
@@ [History]    : Date      Modifier    Comment
******************************************************************************/
void DrawEllipse(int cx,int cy,int rx,int ry)
{
    int dx, dy, xx, yy, ddx, ddy, dd;
    APD_LCD_POINT   pt;

    if (rx > ry) 
     {
        dx = rx; dy = 0; xx = 0; yy = ry; ddx = ddy = dd = rx;
        while(dx >= dy) {
            pt.x = cx + dx;
            pt.y = cy + xx;
            apd_LCDDrawPixel(&pt);
            pt.y = cy - xx;
            apd_LCDDrawPixel(&pt);
            pt.x = cx - dx;
            apd_LCDDrawPixel(&pt);
            pt.y = cy + xx;
            apd_LCDDrawPixel(&pt);

            pt.x = cx + dy;
            pt.y = cy + yy;
            apd_LCDDrawPixel(&pt);
            pt.x = cx - dy;
            apd_LCDDrawPixel(&pt);
            pt.y = cy - yy;
            apd_LCDDrawPixel(&pt);
            pt.x = cx + dy;
            apd_LCDDrawPixel(&pt);

            dd -= (dy << 1) - 1;
            dy++;
            ddx -= ry;
            if (ddx < 0) {
                ddx += rx;
                xx++;
            }
            if (dd < 0) {
                dd += (dx << 1);
                --dx;
                ddy -= ry;
                if (ddy < 0) {
                    ddy += rx;
                    yy--;
                }
            }
        }
    } else {
        // Longer than width
        dx = 0; dy = ry; xx = rx; yy = 0; ddx = ddy = dd = ry;
        while(dx <= dy) {
            pt.x = cx + xx;
            pt.y = cy + dx;
            apd_LCDDrawPixel(&pt);
            pt.y = cy - dx;
            apd_LCDDrawPixel(&pt);
            pt.x = cx - xx;
            apd_LCDDrawPixel(&pt);
            pt.y = cy + dx;
            apd_LCDDrawPixel(&pt);

            pt.x = cx + yy;
            pt.y = cy + dy;
            apd_LCDDrawPixel(&pt);
            pt.x = cx - yy;
            apd_LCDDrawPixel(&pt);
            pt.y = cy - dy;
            apd_LCDDrawPixel(&pt);
            pt.x = cx + yy;
            apd_LCDDrawPixel(&pt);

            dd -= (dx << 1) - 1;
            dx++;
            ddy -= rx;
            if (ddy < 0) {
                ddy += ry; ++yy;
            }
            if (dd < 0) {
                dd += (dy << 1);
                --dy;
                ddx -= rx;
                if (ddx < 0) {
                    ddx += ry;
                    --xx;
                }
            }
        }
    }
}

/******************************************************************************
@@ [Name]       : apd_LCDDrawEllipse
@@ [Summary]    : Draw an ellipse
@@ [Argument]   : point : Coordinate data
@@                dim   : Length and width
@@ [Return]     : None
@@ [Desc]       : Line width = 1
@@ [History]    : Date        Modifier        Comment
******************************************************************************/

void apd_LCDDrawEllipse(APD_LCD_POINT *point,APD_LCD_DIM *dim)
{
    int cx, cy,
        rx = dim->width / 2,
        ry = dim->height / 2;
    cx = point->x + rx;
    cy = point->y + ry;
        DrawEllipse(cx, cy, rx, ry);
}


/******************************************************************************
@@ [Name]       : apd_LCDDrawRect
@@ [Summary]    : The function to draw line of a rectangle
@@ [Argument]   : point : Coordinate data
@@                dim   : Length and width
@@ [Return]     : None
@@ [Desc]       : Draw the specific rectangle data according to
@@                the current attribute.
@@                Valid attribute : Color, Raster operation, Line width,Line type
@@ [History]    : Date      Modifier    Comment
******************************************************************************/

void apd_LCDDrawRect(APD_LCD_POINT *point,APD_LCD_DIM *dim)
{
    APD_LCD_POINT lt, rb;       /* The upper left and the lower right point
                               of a rectangle */
    APD_LCD_POINT p1, p2;       /* The start point and the end point
                               of the straight line */
    short   y_max;
    /* Check the area to draw */
    if (dim->width < 0) {
        lt.x = point->x + dim->width - 1;
        rb.x = point->x;
    } else {
        lt.x = point->x;
        rb.x = point->x + dim->width - 1;
    }
    if (dim->height < 0) {
        lt.y = point->y + dim->height - 1;
        rb.y = point->y;
    } else {
        lt.y = point->y;
        rb.y = point->y + dim->height - 1;
    }
/* Draw the left vertical line segment of a rectangle */
    p1 = lt;
    p2 = rb;

    p1.y += ((current_gc.lw >> 1) + (current_gc.lw % 2));
    if (current_gc.lw >> 1)
        p2.y -= 2;
    else
        p2.y--;
    p2.x = p1.x;
    apd_LCDDrawVline(&p1, &p2);

/* Draw the right vertival line segment of a rectangle */
    p1.x = rb.x;
    p2.x = p1.x;
/* X coordinate of the end point doesn't change for drawing
   because isn't refer currently */
    apd_LCDDrawVline(&p1, &p2);

/* Draw the upper horizontal line segment of a rectangle */
    p1 = lt;
    p2 = rb;

    if (current_gc.lw >> 1) {
        p1.x -= current_gc.lw >> 1;
        p2.x += (current_gc.lw % 2);
        p1.y -= current_gc.lw >> 1;
        y_max = lt.y + (current_gc.lw % 2);
    } else
        y_max = lt.y;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产激情偷乱视频一区二区三区 | 一区二区三区高清| 国产精品中文字幕一区二区三区| 日韩欧美激情在线| 国产精品伊人色| 国产精品久久毛片a| 91在线观看地址| 视频一区二区三区中文字幕| 5566中文字幕一区二区电影| 蜜臀av性久久久久蜜臀aⅴ| 亚洲精品一线二线三线无人区| 国内精品伊人久久久久影院对白| 337p粉嫩大胆噜噜噜噜噜91av| 国产激情偷乱视频一区二区三区| 中文字幕不卡在线| 成人aaaa免费全部观看| 自拍偷拍国产亚洲| 91精品国产色综合久久不卡电影| 美女尤物国产一区| 亚洲国产精品黑人久久久| 91麻豆免费在线观看| 亚洲一区二区三区四区中文字幕 | 男男gaygay亚洲| 久久精品视频网| 在线一区二区视频| 韩国一区二区三区| 亚洲综合丁香婷婷六月香| 日韩欧美一级特黄在线播放| 成人性生交大合| 青青草成人在线观看| 国产精品久久久久久久岛一牛影视| 欧美视频第二页| 国产一区二区三区日韩| 亚洲一区二区三区四区中文字幕| 欧美白人最猛性xxxxx69交| www.欧美精品一二区| 蜜臀av一区二区在线免费观看| 中文天堂在线一区| 精品久久人人做人人爱| 色婷婷国产精品| 国产福利91精品| 日本 国产 欧美色综合| 亚洲三级久久久| 亚洲精品一区二区三区四区高清| 色av成人天堂桃色av| 高清久久久久久| 奇米精品一区二区三区在线观看一 | 懂色av中文一区二区三区 | 视频一区二区不卡| 亚洲素人一区二区| 欧美精品一区二区三区久久久| 色婷婷精品大视频在线蜜桃视频| 国产黑丝在线一区二区三区| 日本va欧美va欧美va精品| 樱桃国产成人精品视频| 日本一区二区视频在线观看| 日韩视频不卡中文| 欧美日韩视频在线第一区 | 亚洲一区二区五区| 中文字幕一区不卡| 国产拍欧美日韩视频二区| 日韩一级视频免费观看在线| 欧美日韩综合不卡| 色婷婷香蕉在线一区二区| 波波电影院一区二区三区| 狠狠色狠狠色综合| 捆绑变态av一区二区三区| 日韩经典中文字幕一区| 五月婷婷色综合| 亚洲一卡二卡三卡四卡无卡久久 | 欧美男男青年gay1069videost | 国内外成人在线| 久久精品国产成人一区二区三区 | 日韩欧美高清dvd碟片| 欧美电影一区二区三区| 欧美日韩国产中文| 欧美日韩国产小视频| 欧日韩精品视频| 欧美日本一区二区| 91精品国产综合久久精品麻豆| 欧美视频一二三区| 91精品国产黑色紧身裤美女| 在线电影欧美成精品| 欧美一区二区三区公司| 欧美一区永久视频免费观看| 日韩一级完整毛片| 久久精品男人的天堂| 中文字幕av一区二区三区高| 国产精品乱子久久久久| 亚洲欧美一区二区三区孕妇| 亚洲成人免费在线| 日本一道高清亚洲日美韩| 精品综合久久久久久8888| 国产精品一区一区| 色综合夜色一区| 7777女厕盗摄久久久| 日韩一级欧美一级| 久久久精品黄色| 一区二区视频在线看| 日本视频在线一区| 国产乱人伦偷精品视频免下载| 成人97人人超碰人人99| 欧美性猛交xxxxxxxx| 日韩一区二区三区av| 久久久久久久久蜜桃| 亚洲品质自拍视频| 久久福利视频一区二区| 国产盗摄一区二区三区| 91黄色小视频| 欧美成人欧美edvon| 国产精品久久久久久久蜜臀| 一区二区三区四区在线免费观看| 丝袜国产日韩另类美女| 国产成人三级在线观看| 欧洲日韩一区二区三区| 精品久久一二三区| 一级特黄大欧美久久久| 久久99精品视频| 一本大道久久a久久综合婷婷| 91精品欧美久久久久久动漫| 国产免费久久精品| 日韩二区在线观看| 91蜜桃免费观看视频| 欧美日韩高清不卡| 亚洲国产精品v| 香港成人在线视频| 成人性视频网站| 欧美日韩国产成人在线免费| 国产精品天天摸av网| 日韩1区2区3区| 91国模大尺度私拍在线视频 | 精品国产乱码久久久久久夜甘婷婷| 国产精品三级视频| 日韩精品91亚洲二区在线观看| 成人白浆超碰人人人人| 日韩精品中文字幕一区二区三区| 亚洲日本在线观看| 黄网站免费久久| 欧美日韩在线三级| 欧美激情中文字幕一区二区| 日本欧美一区二区三区乱码| 91免费小视频| 国产色一区二区| 久久精工是国产品牌吗| 欧洲生活片亚洲生活在线观看| 国产精品热久久久久夜色精品三区| 蜜臀va亚洲va欧美va天堂| 欧美日韩亚洲综合在线 | 欧美刺激午夜性久久久久久久| 一区二区三区中文字幕电影| 成人精品一区二区三区中文字幕| 日韩欧美视频一区| 偷窥国产亚洲免费视频 | 欧美日韩一区二区三区不卡| 国产精品国产三级国产三级人妇 | 国产成人久久精品77777最新版本| 欧美日韩精品福利| 亚洲图片欧美色图| 欧美日韩另类一区| 亚洲人成伊人成综合网小说| 欧美色图一区二区三区| 亚洲综合丁香婷婷六月香| 亚洲成av人片在线| 97久久超碰国产精品电影| 国产亚洲欧洲997久久综合| 日本网站在线观看一区二区三区| 欧美乱熟臀69xxxxxx| 亚洲一区中文日韩| 在线视频一区二区免费| 亚洲国产日韩精品| 91精品福利视频| 亚洲精品国产a久久久久久| 色综合久久综合| 亚洲色图欧洲色图婷婷| 91色九色蝌蚪| 亚洲精品v日韩精品| 色婷婷av一区二区三区大白胸| 亚洲日本在线a| 欧美日韩免费观看一区二区三区| 亚洲电影中文字幕在线观看| 欧美色国产精品| 日韩黄色免费电影| 欧美大片免费久久精品三p| 精品一区二区三区欧美| 久久看人人爽人人| 99综合影院在线| 夜夜操天天操亚洲| 欧美精品久久一区二区三区| 偷拍与自拍一区| 精品成人一区二区三区| 国产99久久久国产精品免费看 | 日韩精品国产欧美| www一区二区| 成人丝袜18视频在线观看| 18成人在线视频| 欧美日韩精品一区二区在线播放| 日韩精品福利网| 久久免费视频色| 色999日韩国产欧美一区二区| 五月天中文字幕一区二区|