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

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

?? image.c

?? STM32+Grlib
?? C
?? 第 1 頁 / 共 2 頁
字號:
//*****************************************************************************
//
// image.c - Routines for drawing bitmap images.
//
// Copyright (c) 2008-2010 Texas Instruments Incorporated.  All rights reserved.
// Software License Agreement
// 
// Texas Instruments (TI) is supplying this software for use solely and
// exclusively on TI's microcontroller products. The software is owned by
// TI and/or its suppliers, and is protected under applicable copyright
// laws. You may not combine this software with "viral" open-source
// software in order to form a larger program.
// 
// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
// NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
// NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
// DAMAGES, FOR ANY REASON WHATSOEVER.
// 
// This is part of revision 5821 of the Stellaris Graphics Library.
//
//*****************************************************************************

#include "driverlib/debug.h"
#include "grlib/grlib.h"

//*****************************************************************************
//
//! \addtogroup primitives_api
//! @{
//
//*****************************************************************************

//*****************************************************************************
//
// The buffer that holds the dictionary used by the Lempel-Ziv-Storer-Szymanski
// compression algorithm.  This is simply the last 32 bytes decoded from the
// stream, and is initially filled with zeros.
//
//*****************************************************************************
static unsigned char g_pucDictionary[32];

//*****************************************************************************
//
//! Draws a bitmap image.
//!
//! \param pContext is a pointer to the drawing context to use.
//! \param pucImage is a pointer to the image to draw.
//! \param lX is the X coordinate of the upper left corner of the image.
//! \param lY is the Y coordinate of the upper left corner of the image.
//!
//! This function draws a bitmap image.  The image may be 1 bit per pixel
//! (using the foreground and background color from the drawing context), 4
//! bits per pixel (using a palette supplied in the image data), or 8 bits per
//! pixel (using a palette supplied in the image data).  It can be uncompressed
//! data, or it can be compressed using the Lempel-Ziv-Storer-Szymanski
//! algorithm (as published in the Journal of the ACM, 29(4):928-951, October
//! 1982).
//!
//! \return None.
//
//*****************************************************************************
void
GrImageDraw(const tContext *pContext, const unsigned char *pucImage, long lX,
            long lY)
{
    unsigned long ulByte, ulBits, ulMatch, ulSize, ulIdx, ulCount, ulNum;
    long lBPP, lWidth, lHeight, lX0, lX1, lX2;
    const unsigned char *pucPalette;
    unsigned char pucBWPalette[8];

    //
    // Check the arguments.
    //
    ASSERT(pContext);
    ASSERT(pucImage);

    //
    // Get the image format from the image data.
    //
    lBPP = *pucImage++;

    //
    // Get the image width from the image data.
    //
    lWidth = *(unsigned short *)pucImage;
    pucImage += 2;

    //
    // Get the image height from the image data.
    //
    lHeight = *(unsigned short *)pucImage;
    pucImage += 2;

    //
    // Return without doing anything if the entire image lies outside the
    // current clipping region.
    //
    if((lX > pContext->sClipRegion.sXMax) ||
       ((lX + lWidth - 1) < pContext->sClipRegion.sXMin) ||
       (lY > pContext->sClipRegion.sYMax) ||
       ((lY + lHeight - 1) < pContext->sClipRegion.sYMin))
    {
        return;
    }

    //
    // Get the starting X offset within the image based on the current clipping
    // region.
    //
    if(lX < pContext->sClipRegion.sXMin)
    {
        lX0 = pContext->sClipRegion.sXMin - lX;
    }
    else
    {
        lX0 = 0;
    }

    //
    // Get the ending X offset within the image based on the current clipping
    // region.
    //
    if((lX + lWidth - 1) > pContext->sClipRegion.sXMax)
    {
        lX2 = pContext->sClipRegion.sXMax - lX;
    }
    else
    {
        lX2 = lWidth - 1;
    }

    //
    // Reduce the height of the image, if required, based on the current
    // clipping region.
    //
    if((lY + lHeight - 1) > pContext->sClipRegion.sYMax)
    {
        lHeight = pContext->sClipRegion.sYMax - lY + 1;
    }

    //
    // Determine the color palette for the image based on the image format.
    //
    if((lBPP & 0x7f) == IMAGE_FMT_1BPP_UNCOMP)
    {
        //
        // Construct a local "black & white" palette based on the foreground
        // and background colors of the drawing context.
        //
        *(unsigned long *)pucBWPalette = pContext->ulBackground;
        *(unsigned long *)(pucBWPalette + 4) = pContext->ulForeground;

        //
        // Set the palette pointer to the local "black & white" palette.
        //
        pucPalette = pucBWPalette;
    }
    else
    {
        //
        // For 4 and 8 BPP images, the palette is contained at the start of the
        // image data.
        //
        pucPalette = pucImage + 1;
        pucImage += (pucImage[0] * 3) + 4;
    }

    //
    // See if the image is compressed.
    //
    if(!(lBPP & 0x80))
    {
        //
        // The image is not compressed.  See if the top portion of the image
        // lies above the clipping region.
        //
        if(lY < pContext->sClipRegion.sYMin)
        {
            //
            // Determine the number of rows that lie above the clipping region.
            //
            lX1 = pContext->sClipRegion.sYMin - lY;

            //
            // Skip past the data for the rows that lie above the clipping
            // region.
            //
            pucImage += (((lWidth * lBPP) + 7) / 8) * lX1;

            //
            // Decrement the image height by the number of skipped rows.
            //
            lHeight -= lX1;

            //
            // Increment the starting Y coordinate by the number of skipped
            // rows.
            //
            lY += lX1;
        }

        //
        // Loop while there are more rows to draw.
        //
        while(lHeight--)
        {
            //
            // Draw this row of image pixels.
            //
            DpyPixelDrawMultiple(pContext->pDisplay, lX + lX0, lY, lX0 & 7,
                                 lX2 - lX0 + 1, lBPP,
                                 pucImage + ((lX0 * lBPP) / 8), pucPalette);

            //
            // Skip past the data for this row.
            //
            pucImage += ((lWidth * lBPP) + 7) / 8;

            //
            // Increment the Y coordinate.
            //
            lY++;
        }
    }
    else
    {
        //
        // The image is compressed.  Clear the compressed flag in the format
        // specifier so that the bits per pixel remains.
        //
        lBPP &= 0x7f;

        //
        // Reset the dictionary used to uncompress the image.
        //
        for(ulBits = 0; ulBits < sizeof(g_pucDictionary); ulBits += 4)
        {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品在线免费播放| 精品国产乱码久久久久久老虎| 九一九一国产精品| 日本不卡高清视频| 久久成人麻豆午夜电影| 久久成人精品无人区| 国产精品18久久久久久久网站| 免费观看成人av| 久久99在线观看| 国产凹凸在线观看一区二区| 成人av资源在线观看| 99久久精品免费看国产| 在线亚洲人成电影网站色www| 日本久久一区二区三区| 国产色91在线| 综合婷婷亚洲小说| 亚洲狠狠爱一区二区三区| 蜜臀精品久久久久久蜜臀| 韩国v欧美v日本v亚洲v| 成人自拍视频在线观看| 日本精品一级二级| 日韩一级免费观看| 久久久久久黄色| 一区二区三区影院| 蜜臀久久99精品久久久久宅男| 国产又粗又猛又爽又黄91精品| 99久久久精品| 日韩午夜激情视频| 中文字幕一区二区不卡| 日韩av在线发布| 国产成人在线视频免费播放| 91极品视觉盛宴| 国产日韩v精品一区二区| 一区二区三区在线观看动漫| 久久99国内精品| 91蝌蚪porny| 精品va天堂亚洲国产| 亚洲欧美aⅴ...| 国模无码大尺度一区二区三区| 91香蕉视频黄| 久久精品免费在线观看| 婷婷成人综合网| 色综合天天做天天爱| 久久综合狠狠综合| 日韩精品视频网| 91老师片黄在线观看| 国产欧美一区二区精品婷婷| 石原莉奈一区二区三区在线观看| 成人av资源在线| 久久久久久久久蜜桃| 日本色综合中文字幕| 日本大香伊一区二区三区| 国产欧美日韩三区| 久久99久久99小草精品免视看| 欧美吻胸吃奶大尺度电影| 国产精品福利一区二区三区| 国产精品白丝jk白祙喷水网站| 欧美一区二区精品| 日韩精品免费视频人成| 在线视频国内自拍亚洲视频| 亚洲欧美怡红院| youjizz国产精品| 国产欧美日韩精品a在线观看| 狠狠色狠狠色综合| 精品国精品国产尤物美女| 婷婷综合在线观看| 欧美视频一区二区三区在线观看| 亚洲视频精选在线| 97久久精品人人澡人人爽| 中文字幕欧美一| 99久久久久久| 亚洲激情图片小说视频| 一本久久a久久精品亚洲| 中文字幕中文在线不卡住| 白白色亚洲国产精品| 亚洲欧美国产毛片在线| 99国产一区二区三精品乱码| 亚洲欧美中日韩| 日韩欧美色电影| 奇米色777欧美一区二区| 91精品国产色综合久久不卡电影| 视频一区中文字幕国产| 日韩欧美在线不卡| 国产一区二区三区日韩| 欧美国产一区视频在线观看| 成人亚洲精品久久久久软件| 亚洲品质自拍视频| 欧美三级视频在线| 老司机精品视频导航| 国产视频一区在线观看 | 国产成人综合自拍| 欧美国产成人精品| 99国产精品久久久久| 亚洲成人综合在线| 欧美videofree性高清杂交| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 九九精品一区二区| 日本一区免费视频| 在线视频国内一区二区| 日本成人在线网站| 欧美国产精品中文字幕| 欧美视频在线一区二区三区| 久久国产三级精品| 亚洲人一二三区| 在线播放视频一区| 国产高清亚洲一区| 亚洲一区二区三区在线| 久久久777精品电影网影网 | 欧美日韩一区二区在线观看视频| 麻豆成人在线观看| 日韩毛片在线免费观看| 欧美第一区第二区| 精品欧美一区二区久久| 91在线无精精品入口| 麻豆国产欧美一区二区三区| 亚洲欧洲日产国码二区| 日韩区在线观看| 欧美又粗又大又爽| 国产69精品久久99不卡| 日韩精品国产欧美| 亚洲三级电影全部在线观看高清| 欧美成人性战久久| 欧美日韩三级视频| 国产一区不卡精品| 水蜜桃久久夜色精品一区的特点| 中文一区在线播放| 久久免费偷拍视频| 日韩午夜三级在线| 欧美欧美欧美欧美首页| 99久久国产综合色|国产精品| 久久国产夜色精品鲁鲁99| 亚洲成人黄色小说| 一区二区在线看| 国产精品护士白丝一区av| 日韩精品影音先锋| 6080国产精品一区二区| 色香蕉成人二区免费| eeuss国产一区二区三区| 韩国三级电影一区二区| 免费看黄色91| 日本欧美大码aⅴ在线播放| 亚洲高清一区二区三区| 一区二区三区四区在线| 亚洲免费av网站| 国产精品美女久久久久久2018| 国产亚洲欧洲一区高清在线观看| 日韩欧美成人激情| 欧美一区二区免费视频| 51精品国自产在线| 欧美精品日韩一区| 在线电影一区二区三区| 欧美精品日韩精品| 欧美一区二区三区播放老司机| 欧美一激情一区二区三区| 911精品国产一区二区在线| 精品视频在线视频| 欧美日韩欧美一区二区| 欧美一区二区在线观看| 欧美日韩aaaaa| 日韩欧美一区中文| 久久久久久久久久久久久女国产乱 | 亚洲自拍另类综合| 午夜精品福利久久久| 毛片一区二区三区| 国产一区二区美女诱惑| 成人性生交大片免费看视频在线| caoporen国产精品视频| 色婷婷一区二区三区四区| 欧美午夜电影一区| 日韩免费性生活视频播放| 亚洲精品一区二区三区精华液| 国产欧美一区二区精品性色超碰| 中文字幕在线视频一区| 一区二区三区产品免费精品久久75| 午夜精品福利久久久| 九九精品一区二区| 91在线精品一区二区| 欧美日韩精品综合在线| 精品国产91亚洲一区二区三区婷婷 | 亚洲视频免费观看| 日本色综合中文字幕| 国产丶欧美丶日本不卡视频| 日本韩国精品一区二区在线观看| 日韩午夜在线观看| 亚洲欧美一区二区三区久本道91| 天涯成人国产亚洲精品一区av| 久草中文综合在线| 日本丰满少妇一区二区三区| 日韩一二三区视频| 日韩伦理av电影| 九色综合国产一区二区三区| 91网页版在线| 久久久久久夜精品精品免费| 亚洲精品美腿丝袜| 国产精品1024| 欧美一级一区二区| 亚洲精品中文字幕乱码三区| 狠狠色丁香久久婷婷综合_中| 日韩久久免费av| 一区二区三区日韩精品视频|