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

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

?? lcdwin.c

?? s3c44b0+ucgui+初始化的一個版本
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
*********************************************************************************************************
*                                                uC/GUI
*                        Universal graphic software for embedded applications
*
*                       (c) Copyright 2002, Micrium Inc., Weston, FL
*                       (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH
*
*              礐/GUI is protected by international copyright laws. Knowledge of the
*              source code may not be used to write a similar product. This file may
*              only be used in accordance with a license and should not be redistributed
*              in any way. We appreciate your understanding and fairness.
*
----------------------------------------------------------------------
File        : LCDWin.C
Purpose     : Driver for Simulator under Windows
----------------------------------------------------------------------
Version-Date---Author-Explanation
----------------------------------------------------------------------
2.00    010402 RS     a) LCD_GetDevCaps removed from driver
                         (now LCD.c)
1.30c   000529 JE     a) Interface changed
1.30b   000428 RS     a) DIB class eliminated
                      b) Internal cleanups, support for high color
1.30a   000417 RS     a) Major cleanup in DIB class
1.30    000309 RS     a) Interface change for emWIn V1.30
                         (LCD_L0_SetLUTEntry, LCD_GetDevCap)
1.10a   000121 RS     a) RECTHEIGHT, RECTWIDTH modified in order to
                         fix bug which would at some time prevent
												 displaying the first line of the display.
1.10.00 000110 RS     a) Modifications in order to make it easy to
                         implement driver in any windows program
1.04.02 991118 RS     a) additional assertion added
                         LCD_MAX_LOG_COLORS
1.04.01 991018 RS     a) Support for LCD_FIXEDPALETTE added
                         with Anitaliasing enabled
1.04.00 991013 JE/RS  a) Support for LCD_FIXEDPALETTE added
                      b) Driver now accepts the same LCDConf.h as
											   the embedded system
											c) Bugfix for ..
1.02.02 990831 RS     a) Small optimization added for 16-color bitmaps
1.02.01 990726 RS     a) Transparency support for 16-color bitmpas
                         added
1.02.00 990212 RS     a) New interface version 1.02 supported
1.00    990118 RS     First release
----------------------------------------------------------------------
Known problems or limitations with current version
----------------------------------------------------------------------
---------------------------END-OF-HEADER------------------------------
*/


#if defined(WIN32) && !defined(LCD_SIMCONTROLLER)

#include <windows.h>
#include "LCD.h"
#include "LCD_Private.h"              /* include LCDConf.h */
#include "LCDSim.h"
#include "GUI_Private.h"

#include "memory.h"

#if LCD_BITSPERPIXEL <= 8
  #define PIXELINDEX U8
#else
  #define PIXELINDEX WORD
#endif

#ifdef WIN32
  #ifndef ASSERT
    #define ASSERT(Val) \
    if (!(Val)) \
      MessageBox(NULL,"...in file "__FILE__,"Assertion failed...",MB_OK);
  #endif
#endif

#ifdef LCD_ASSERT
  #undef LCD_ASSERT
#endif
#define LCD_ASSERT(v) ASSERT(v)

#ifndef LCD_DISPLAY_INDEX
  #define LCD_DISPLAY_INDEX 0
#endif


/*
        *********************************************************
        *                                                       *
        *       Macros for internal use                         *
        *                                                       *
        *********************************************************
*/

#define SETPIXEL(x, y, c) LCDSIM_SetPixelIndex(x, y, c)
#define GETPIXEL(x, y)    LCD_GetPixel(x,y)
#define XORPIXEL(x, y)    XorPixel(x,y)

#if LCD_DISPLAY_INDEX == 1     /* Second display in a multi-display configuration */
  #define LCDSIM_SetPixelIndex  LCDSIM_1_SetPixelIndex
  #define LCDSIM_SetLUTEntry    LCDSIM_1_SetLUTEntry
#endif

/*
        *********************************************************
        *                                                       *
        *       ID translation table                            *
        *                                                       *
        *********************************************************

This table contains 0, 1, 2, ... and serves as translation table for DDBs

*/

#define INTS(Base)  Base+0,Base+1,Base+2,Base+3,Base+4,Base+5,   \
                    Base+6,Base+7,Base+8,Base+9,Base+10,Base+11, \
                    Base+12,Base+13,Base+14,Base+15

static void XorPixel   (int x, int y) {
  unsigned int Index = LCD_L0_GetPixelIndex(x,y);
  LCDSIM_SetPixelIndex(x, y, LCD_NUM_COLORS-1-Index);
}


/*
        *********************************************************
        *                                                       *
        *       LCD_L0_SetColorIndex                            *
        *       LCD_L0_SetBkColorIndex                          *
        *                                                       *
        *********************************************************
*/


#define   COLORINDEX LCD_COLORINDEX
#define BKCOLORINDEX LCD_BKCOLORINDEX

/*
        *********************************************************
        *                                                       *
        *       LCD_L0_DrawPixel                                   *
        *                                                       *
        *********************************************************

Purpose:  This routine is called by emWin. It writes 1 pixel into the
          display.

*/


void LCD_L0_DrawPixel(int x, int y) {
  if (GUI_Context.DrawMode & LCD_DRAWMODE_XOR) {
    XORPIXEL(x, y);
  } else {
    SETPIXEL(x, y, COLORINDEX);
  }
}

/*
        *********************************************************
        *                                                       *
        *          LCD_DrawLine  vertical/horizontal            *
        *          LCD_DrawRect                                 *
        *                                                       *
        *********************************************************
*/

void LCD_L0_DrawHLine  (int x0, int y,  int x1) {
  if (GUI_Context.DrawMode & LCD_DRAWMODE_XOR) {
    for (;x0 <= x1; x0++) {
      XORPIXEL(x0, y);
    }
  } else {
//    LCDSIM_FillLine(x0,y,x1,COLORINDEX);
    for (;x0 <= x1; x0++) {
      SETPIXEL(x0, y, COLORINDEX);
    }
  }
}

void LCD_L0_DrawVLine  (int x, int y0,  int y1) {
  if (GUI_Context.DrawMode & LCD_DRAWMODE_XOR) {
    while (y0 <= y1) {
      XORPIXEL(x, y0);
      y0++;
    }
  } else {
    while (y0 <= y1) {
      SETPIXEL(x, y0, COLORINDEX);
      y0++;
    }
  }
}

void LCD_L0_FillRect(int x0, int y0, int x1, int y1) {
  for (; y0 <= y1; y0++) {
    LCD_L0_DrawHLine(x0,y0, x1);
  }
}



/*
  ***************************************************************
  *                                                             *
  *            Internal bitmap routines                         *
  *                                                             *
  ***************************************************************

*/


/*
    *********************************************
    *                                           *
    *      Draw Bitmap 1 BPP                    *
    *                                           *
    *********************************************
*/

static void  DrawBitLine1BPP(int x, int y, U8 const*p, int Diff, int xsize, const LCD_PIXELINDEX*pTrans) {
  LCD_PIXELINDEX Index0 = *(pTrans+0);
  LCD_PIXELINDEX Index1 = *(pTrans+1);
  x+=Diff;
/*
// Jump to right entry point
*/
  switch (GUI_Context.DrawMode & (LCD_DRAWMODE_TRANS|LCD_DRAWMODE_XOR)) {
  case 0:    /* Write mode */
    do {
      LCDSIM_SetPixelIndex(x++,y, (*p & (0x80>>Diff)) ? Index1 : Index0);
			if (++Diff==8) {
        Diff=0;
				p++;
			}
		} while (--xsize);
    break;
  case LCD_DRAWMODE_TRANS:
    do {
  		if (*p & (0x80>>Diff))
        LCDSIM_SetPixelIndex(x,y, Index1);
      x++;
			if (++Diff==8) {
        Diff=0;
				p++;
			}
		} while (--xsize);
    break;
  case LCD_DRAWMODE_XOR:;
    do {
  		if (*p & (0x80>>Diff)) {
        int Pixel = LCDSIM_GetPixelIndex(x,y);
        LCDSIM_SetPixelIndex(x,y, LCD_NUM_COLORS-1-Pixel);
      }
      x++;
			if (++Diff==8) {
        Diff=0;
				p++;
			}
		} while (--xsize);
    break;
	}
}

/*
    *********************************************
    *                                           *
    *      Draw Bitmap 2 BPP                    *
    *                                           *
    *********************************************
*/

#if (LCD_MAX_LOG_COLORS > 2)
static void  DrawBitLine2BPP(int x, int y, U8 const*p, int Diff, int xsize, const LCD_PIXELINDEX*pTrans) {
  PIXELINDEX pixels;
/*
// Jump to right entry point
*/
  pixels = *p;
  if (GUI_Context.DrawMode & LCD_DRAWMODE_TRANS) switch (Diff&3) {
  case 0:
    goto WriteTBit0;
  case 1:
    goto WriteTBit1;
  case 2:
    goto WriteTBit2;
  default:
    goto WriteTBit3;
  } else switch (Diff&3) {
  case 0:
    goto WriteBit0;
  case 1:
    goto WriteBit1;
  case 2:
    goto WriteBit2;
  default:
    goto WriteBit3;
  }
/*
        Write without transparency
*/
WriteBit0:
  SETPIXEL(x+0, y, *(pTrans+(pixels>>6)));
  if (!--xsize)
    return;
WriteBit1:
  SETPIXEL(x+1, y, *(pTrans+(3&(pixels>>4))));
  if (!--xsize)
    return;
WriteBit2:
  SETPIXEL(x+2, y, *(pTrans+(3&(pixels>>2))));
  if (!--xsize)
    return;
WriteBit3:
  SETPIXEL(x+3, y, *(pTrans+(3&(pixels))));
  if (!--xsize)
    return;
  pixels = *(++p);
  x+=4;
  goto WriteBit0;
/*
        Write with transparency
*/
WriteTBit0:
  if (pixels&(3<<6))
    SETPIXEL(x+0, y, *(pTrans+(pixels>>6)));
  if (!--xsize)
    return;
WriteTBit1:
  if (pixels&(3<<4))
    SETPIXEL(x+1, y, *(pTrans+(3&(pixels>>4))));
  if (!--xsize)
    return;
WriteTBit2:
  if (pixels&(3<<2))
    SETPIXEL(x+2, y, *(pTrans+(3&(pixels>>2))));
  if (!--xsize)
    return;
WriteTBit3:
  if (pixels&(3<<0))
    SETPIXEL(x+3, y, *(pTrans+(3&(pixels))));
  if (!--xsize)
    return;
  pixels = *(++p);
  x+=4;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品18久久久久| 国产综合色精品一区二区三区| 久久亚洲精精品中文字幕早川悠里| 欧美绝品在线观看成人午夜影视| 91国偷自产一区二区三区观看| 综合电影一区二区三区| 青青草原综合久久大伊人精品优势| 日韩欧美一区中文| 欧美日韩精品欧美日韩精品一综合| 欧美三级电影在线观看| 欧美另类一区二区三区| 91精品国产91综合久久蜜臀| 日韩你懂的在线播放| 久久婷婷成人综合色| 国产蜜臀97一区二区三区| 中文字幕制服丝袜成人av | 日韩和的一区二区| 免费av网站大全久久| 麻豆一区二区在线| 国产高清成人在线| 在线一区二区三区四区五区| 欧美日韩国产综合久久| 精品日韩在线一区| 最新国产精品久久精品| 亚洲国产精品久久久男人的天堂| 久久国产精品第一页| 成人动漫av在线| 欧美图区在线视频| 国产亚洲短视频| 一区二区免费在线| 韩国v欧美v日本v亚洲v| 91久久奴性调教| 精品国产sm最大网站| 亚洲欧美综合色| 美女视频一区二区| 欧美自拍偷拍一区| 国产日产欧美一区二区三区| 亚洲免费观看高清完整版在线| 喷水一区二区三区| 91网站在线播放| 久久综合色8888| 亚洲一区二区视频在线| 国产乱子伦视频一区二区三区| 91黄视频在线| 国产婷婷色一区二区三区在线| 亚洲福利一区二区| av电影在线观看不卡| 26uuu欧美日本| 五月婷婷综合在线| 日本大香伊一区二区三区| 国产色综合一区| 蜜臀av性久久久久蜜臀aⅴ四虎| 色欧美片视频在线观看| 欧美极品aⅴ影院| 老司机精品视频线观看86| 欧美精品三级日韩久久| 亚洲最新视频在线观看| a4yy欧美一区二区三区| 中文字幕不卡的av| 久久精品国产77777蜜臀| 777亚洲妇女| 亚洲午夜精品网| 91美女福利视频| 亚洲欧洲三级电影| 波多野结衣一区二区三区| 国产视频一区在线播放| 国产综合色产在线精品| 欧美成人video| 另类小说色综合网站| 日韩欧美二区三区| 久久精工是国产品牌吗| 欧美一级精品在线| 日本aⅴ精品一区二区三区 | 男人的天堂亚洲一区| 欧美色老头old∨ideo| 一区二区在线看| 日本久久电影网| 一区二区三区欧美日韩| 欧美在线观看视频在线| 一区二区久久久久久| 欧美色倩网站大全免费| 婷婷成人激情在线网| 日韩免费观看高清完整版在线观看| 免费的成人av| 精品国产亚洲在线| 福利电影一区二区三区| 亚洲色图色小说| 91黄色激情网站| 秋霞午夜鲁丝一区二区老狼| 欧美电影免费提供在线观看| 国产麻豆午夜三级精品| 国产精品不卡在线| 欧美在线一二三| 蜜臀精品久久久久久蜜臀| 国产午夜精品美女毛片视频| 91视频免费播放| 日本成人超碰在线观看| 亚洲国产精品国自产拍av| 91麻豆国产精品久久| 亚瑟在线精品视频| 国产色91在线| 99久久伊人精品| 天天综合日日夜夜精品| 国产欧美一区二区三区在线看蜜臀 | 欧美精品乱码久久久久久按摩| 美女一区二区在线观看| 中文字幕欧美激情一区| 色综合咪咪久久| 精品一区二区日韩| 亚洲三级在线免费观看| 91精品婷婷国产综合久久性色| 国产真实乱偷精品视频免| 亚洲一区二区成人在线观看| 精品嫩草影院久久| 欧美视频一区二区三区四区| 国产成人免费视频网站高清观看视频| 樱桃国产成人精品视频| 久久久久久综合| 欧美日韩在线播放三区四区| 国产福利91精品一区| 午夜免费久久看| 国产精品午夜春色av| 在线播放日韩导航| 99久久国产综合精品色伊| 九九**精品视频免费播放| 亚洲美女在线国产| 国产日产欧美一区二区三区| 91精品国产综合久久久蜜臀粉嫩 | 91麻豆精品国产91久久久| 不卡视频免费播放| 久久国产精品99精品国产| 亚洲国产欧美另类丝袜| 亚洲免费在线播放| 亚洲欧洲99久久| 国产欧美一区二区三区在线看蜜臀 | 亚洲一区二区在线观看视频| 国产精品久久久久9999吃药| 日韩美女天天操| 在线成人av网站| 欧美视频中文字幕| 91丝袜高跟美女视频| 99久久免费精品| 岛国av在线一区| 国产黄人亚洲片| 韩国在线一区二区| 国内欧美视频一区二区| 国产真实精品久久二三区| 另类小说色综合网站| 美女网站色91| 国产在线精品一区二区不卡了| 青青草精品视频| 日本欧美久久久久免费播放网| 一区二区高清在线| 亚洲高清不卡在线| 日韩国产高清影视| 蜜桃精品在线观看| 九九国产精品视频| 国产精品一品二品| 成人av在线播放网站| 97aⅴ精品视频一二三区| 91在线观看一区二区| 日本韩国一区二区三区视频| 欧洲av在线精品| 欧美日韩视频在线第一区 | 欧美色视频在线观看| 欧美成人官网二区| 在线成人午夜影院| 欧美一级黄色录像| 国产人久久人人人人爽| 国产欧美日韩精品在线| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 欧美性猛交xxxxxx富婆| 欧美一区二区三区四区在线观看| 欧美电视剧免费观看| 国产欧美一二三区| 亚洲影院久久精品| 久久成人av少妇免费| 99久久婷婷国产| 7799精品视频| 国产日本一区二区| 亚洲国产一区二区视频| 国产一区二区三区电影在线观看| 成人一道本在线| 欧美日韩高清在线播放| 国产欧美一二三区| 日韩精品91亚洲二区在线观看 | 国产精品不卡在线| 亚洲最新在线观看| 久久精品国产99国产精品| 福利一区在线观看| 欧美少妇bbb| 久久精品人人做人人综合| 亚洲综合在线免费观看| 国产乱淫av一区二区三区| 91精彩视频在线观看| 国产日韩欧美在线一区| 青青草精品视频| 91福利资源站| 国产精品久久久久影院色老大 | 国产日韩欧美麻豆|