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

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

?? lcd_rotate180.c

?? ucCos移植到廣州友善nano2410
?? C
字號:
/*
*********************************************************************************************************
*                                                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        : LCD_Rotate180.c
Purpose     : Implementation of GUI_SetRotation
---------------------------END-OF-HEADER------------------------------
*/

#include "GUI_Private.h"
#include "LCD.h"
#if GUI_WINSUPPORT
  #include "WM.h"
#endif

#if GUI_SUPPORT_ROTATION

/*********************************************************************
*
*       Static code
*
**********************************************************************
*/
/*********************************************************************
*
*       _DrawBitLine1BPP
*/
static void  _DrawBitLine1BPP(int x, int y, U8 const GUI_UNI_PTR *p, int Diff, int xsize, const LCD_PIXELINDEX*pTrans) {
  LCD_PIXELINDEX Index0 = *(pTrans+0);
  LCD_PIXELINDEX Index1 = *(pTrans+1);
  x -= Diff;
  switch (GUI_Context.DrawMode & (LCD_DRAWMODE_TRANS | LCD_DRAWMODE_XOR)) {
  case 0:
    do {
      LCDDEV_L0_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))
        LCDDEV_L0_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 = LCD_L0_GetPixelIndex(x, y);
        LCDDEV_L0_SetPixelIndex(x, y, LCD_NUM_COLORS - 1 - Pixel);
      }
      x--;
			if (++Diff == 8) {
        Diff = 0;
				p++;
			}
		} while (--xsize);
    break;
	}
}

/*********************************************************************
*
*       _DrawBitmap
*
* Purpose:
*   Draws a bitmap (1bpp) rotated by 180 degrees.
*/
static void _DrawBitmap(int x0, int y0,
                       int xsize, int ysize,
                       int BitsPerPixel, 
                       int BytesPerLine,
                       const U8 GUI_UNI_PTR * pData, int Diff,
                       const LCD_PIXELINDEX* pTrans)
{
  int i;
  /* Use _DrawBitLineXBPP */
  for (i = 0; i < ysize; i++) {
    switch (BitsPerPixel) {
    case 1:
      _DrawBitLine1BPP(x0, y0 - i, pData, Diff, xsize, pTrans);
      break;
    }
    pData += BytesPerLine;
  }
}

/*********************************************************************
*
*       _Rect2TextRect
*
* Purpose:
*   This function transforms a given rectangle (window coordinates)
*   to the rectangle used to clip the text.
*/
static void _Rect2TextRect(GUI_RECT * pRect) {
  GUI_USE_PARA(pRect);
  /* nothing to do in case of rotating text by 180 degrees */
}

/*********************************************************************
*
*       _TransformPoint180
*
* Purpose:
*   This function transforms an unrotated point (window
*   coordinates) into a rotated point in desktop coordinates
*   and handles the rotation of the current text rectangle.
*/
static void _TransformPoint180(int * pXPos, int * pYPos) {
  GUI_RECT ClientRect = {0};
  int xPos, yPos, xNumPixel, yNumPixel;
  /* Get the client rectangle */
  #if GUI_WINSUPPORT
    WM_GetWindowRect(&ClientRect);
  #else
    GUI_GetClientRect(&ClientRect);
  #endif
  xNumPixel = LCD_GetXSize() - 1;
  yNumPixel = LCD_GetYSize() - 1;
  if (ClientRect.x1 > xNumPixel) {
    ClientRect.x1 = xNumPixel;
  }
  if (ClientRect.y1 > yNumPixel) {
    ClientRect.y1 = yNumPixel;
  }
  /* Save old positions */
  xPos = *pXPos;
  yPos = *pYPos;
  /* Handle rotation of text rectangle */
  *pXPos = ClientRect.x0 + GUI_RectDispString.x1 - (xPos - GUI_RectDispString.x0);
  *pYPos = ClientRect.y0 + GUI_RectDispString.y1 - (yPos - GUI_RectDispString.y0);
}

/*********************************************************************
*
*       _DrawBitmap180
*/
static void _DrawBitmap180(int x0, int y0, int xsize, int ysize, int xMul, int yMul,
                           int BitsPerPixel, int BytesPerLine,
                           const U8 GUI_UNI_PTR * pPixel, const LCD_PIXELINDEX* pTrans)
{
  U8  Data = 0;
  int x1, y1;
  /* Handle the optional Y-magnification */
  y1 = y0 + ysize - 1;
  x1 = x0 + xsize - 1;
  /* Rotate positions */
  _TransformPoint180(&x0, &y0);
  _TransformPoint180(&x1, &y1);
  /*  Handle BITMAP without magnification */
  if ((xMul == 1) && (yMul == 1)) {
    int Diff;
    /* Clip top */
    if (y0 > GUI_Context.ClipRect.y1) {
      int Diff = y0 - GUI_Context.ClipRect.y1;
      y0       = GUI_Context.ClipRect.y1;
      pPixel  += Diff * BytesPerLine;
      ysize   -= Diff;
    }
    /* Clip bottom */
    if (y1 < GUI_Context.ClipRect.y0) {
      int Diff = GUI_Context.ClipRect.y0 - y1;
      ysize -= Diff;
    }
    if (ysize <= 0) {
		  return;
    }
    /* Clip right side */
    if (x1 < GUI_Context.ClipRect.x0) {
      int Diff = GUI_Context.ClipRect.x0 - x1;
      xsize   -= Diff;
    }
    /* Clip left side */
    Diff = 0;
    if (x0 > GUI_Context.ClipRect.x1) {
      Diff   = x0 - GUI_Context.ClipRect.x1;
			xsize -= Diff;
			switch (BitsPerPixel) {
			case 1:
  			pPixel += (Diff >> 3); x0 += (Diff >> 3) << 3; Diff &= 7;
				break;
			}
    }
    if (xsize <= 0) {
		  return;
    }
    _DrawBitmap(x0, y0, xsize, ysize, BitsPerPixel, BytesPerLine, pPixel, Diff, pTrans);
  } else {
    /* Handle BITMAP with magnification */
    int x, y;
    int yi;
    int Shift = 8 - BitsPerPixel;
    for (y = y0, yi = 0; yi < ysize; yi++, y -= yMul, pPixel += BytesPerLine) {
      int yMax = y + yMul - 1;
      /* Draw if within clip area (Optimization ... "if" is not required !) */
      if ((yMax >= GUI_Context.ClipRect.y0) && (y <= GUI_Context.ClipRect.y1)) {
        int BitsLeft = 0;
        int xi;
        const U8 GUI_UNI_PTR * pDataLine = pPixel;
        for (x = x0, xi = 0; xi < xsize; xi++, x -= xMul) {
          U8  Index;
          if (!BitsLeft) {
            Data = *pDataLine++;
            BitsLeft =8;
          }
          Index = Data >> Shift;
          Data    <<= BitsPerPixel;
          BitsLeft -= BitsPerPixel;
          if (Index || ((GUI_Context.DrawMode & LCD_DRAWMODE_TRANS) == 0)) {
            LCD_PIXELINDEX OldColor = LCD_COLORINDEX;
            if (pTrans) {
              LCD_COLORINDEX = *(pTrans + Index);
            } else {
              LCD_COLORINDEX = Index;
            }
            LCD_FillRect(x - xMul + 1, y, x, yMax);
            LCD_COLORINDEX = OldColor;
          }
        }
      }
    }
  }
}

/*********************************************************************
*
*       Global data
*
**********************************************************************
*/
/*********************************************************************
*
*       LCD_APIList180
*
* Purpose:
*   Function pointer table for rotating text 180
*/
tLCD_APIList LCD_APIList180 = {
  (tLCD_DrawBitmap*)&_DrawBitmap180,
  &_Rect2TextRect
};

#else
void LCD_Rotate180_C(void);
void LCD_Rotate180_C(void){}
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人av福利| 久久99国产精品麻豆| 久久久激情视频| 一区二区三区中文字幕电影| 精品免费99久久| 久久综合狠狠综合久久激情 | 久久精子c满五个校花| 欧美一区二区视频免费观看| 91精品欧美福利在线观看| 欧美丰满高潮xxxx喷水动漫| 欧美一二三四区在线| 欧美成人艳星乳罩| 国产亚洲精品超碰| 国产精品电影一区二区| 亚洲乱码国产乱码精品精可以看| 亚洲免费视频中文字幕| 无吗不卡中文字幕| 精品亚洲国内自在自线福利| 成人激情免费视频| 欧美日韩在线一区二区| 91精品国产一区二区三区蜜臀| 在线成人av网站| 国产女人aaa级久久久级| 中文字幕在线一区二区三区| 性感美女久久精品| 国产精品主播直播| 91福利在线导航| 精品国产免费一区二区三区四区 | 欧美一卡在线观看| 国产精品欧美一区喷水| 午夜精品成人在线视频| 国产激情精品久久久第一区二区| 99久久伊人精品| 4438x亚洲最大成人网| 国产三级精品三级在线专区| 亚洲一区二区精品3399| 国内精品嫩模私拍在线| 91久久久免费一区二区| 久久久三级国产网站| 亚洲宅男天堂在线观看无病毒| 精品中文字幕一区二区| 在线观看日韩高清av| 中文欧美字幕免费| 日韩av成人高清| 色欧美88888久久久久久影院| 精品国产免费久久| 丝袜诱惑亚洲看片| 99re这里都是精品| 久久精品男人天堂av| 日韩国产欧美在线观看| 色呦呦国产精品| 欧美激情综合五月色丁香小说| 六月丁香综合在线视频| 欧美日韩激情一区| 亚洲永久精品国产| 99re热这里只有精品视频| 欧美精品一区二区三区四区| 亚洲一区二区在线视频| 精品国产乱码久久久久久牛牛| 亚洲综合色婷婷| 99精品欧美一区二区三区小说 | 懂色av中文一区二区三区| 91精品国产综合久久精品app| 亚洲欧美激情插| av中文字幕一区| 国产精品乱码久久久久久| 久久99九九99精品| 精品理论电影在线| 国内精品伊人久久久久av一坑| 日韩女优av电影| 九一久久久久久| 日韩精品一区在线观看| 蜜乳av一区二区三区| 日韩一区二区在线观看视频| 免费观看一级欧美片| 4hu四虎永久在线影院成人| 免费欧美日韩国产三级电影| 69久久99精品久久久久婷婷 | 亚洲国产精品传媒在线观看| 国产成人免费视| 国产精品初高中害羞小美女文| 成人晚上爱看视频| 国产精品国产自产拍高清av王其| 国产69精品一区二区亚洲孕妇| 国产精品天天摸av网| 波多野结衣中文一区| 亚洲欧美另类久久久精品2019| 一本色道久久加勒比精品| 亚洲精品中文在线观看| 欧美四级电影网| 蜜桃精品在线观看| 国产人久久人人人人爽| 99精品久久只有精品| 亚洲国产另类精品专区| 欧美一级久久久久久久大片| 国产精品自拍网站| 综合久久国产九一剧情麻豆| 欧美日韩国产首页| 激情伊人五月天久久综合| 欧美国产精品久久| 欧美三级资源在线| 狠狠色丁香婷婷综合| 中文字幕欧美一| 91精品国产91综合久久蜜臀| 国产一区二区精品久久| 亚洲精品国产一区二区精华液 | 久久久久高清精品| 色婷婷综合久久久中文一区二区| 日韩和欧美一区二区三区| 国产亚洲一区二区三区四区| 色婷婷综合久久久久中文一区二区| 日韩国产欧美在线视频| 国产精品久久久久三级| 欧美一区二区三区在线视频 | 亚洲成人免费影院| 久久久影院官网| 欧美色老头old∨ideo| 国产精品中文欧美| 日韩精品欧美成人高清一区二区| 国产日产欧美精品一区二区三区| 欧美日韩一区三区| eeuss鲁一区二区三区| 久久国产夜色精品鲁鲁99| 一区二区三区中文免费| 欧美激情一区二区三区在线| 欧美大白屁股肥臀xxxxxx| 色丁香久综合在线久综合在线观看| 国产一区二区三区电影在线观看 | 精品国产污污免费网站入口| 国产偷v国产偷v亚洲高清| 91色综合久久久久婷婷| 国产成人av资源| 另类人妖一区二区av| 亚洲成人免费看| 亚洲不卡av一区二区三区| 国产精品久久综合| 国产午夜精品美女毛片视频| 日韩一区二区三区视频| 欧美疯狂性受xxxxx喷水图片| 99久久精品免费精品国产| 国产精品一二三| 国产精品一区在线观看你懂的| 日韩精品一二区| 日韩国产精品久久| 午夜一区二区三区视频| 一个色妞综合视频在线观看| 亚洲欧洲日韩综合一区二区| 中国色在线观看另类| 国产精品婷婷午夜在线观看| 国产精品乱人伦| 亚洲人成在线播放网站岛国| 亚洲啪啪综合av一区二区三区| 国产精品免费视频网站| 亚洲婷婷综合久久一本伊一区| 中文字幕在线观看不卡| 亚洲精品欧美激情| 一区二区三区免费| 亚洲成人资源网| 久久se精品一区精品二区| 久久国产尿小便嘘嘘尿| 国产成人综合在线| 成人av在线播放网址| 日本韩国欧美在线| 欧美日韩黄色一区二区| 在线综合视频播放| 久久夜色精品一区| 国产精品久久三| 一区二区在线观看免费视频播放| 亚洲在线观看免费| 裸体歌舞表演一区二区| 国产91丝袜在线播放九色| jlzzjlzz亚洲女人18| 欧美日韩一卡二卡三卡| 精品少妇一区二区三区免费观看 | 97久久超碰国产精品| 欧美综合色免费| 日韩一区二区三区电影在线观看| 精品久久久久一区二区国产| 国产精品传媒在线| 日韩成人午夜电影| 国产激情一区二区三区| 色欧美片视频在线观看在线视频| 3751色影院一区二区三区| 日本一区二区视频在线观看| 亚洲午夜久久久久久久久电影网| 久久国产剧场电影| 在线区一区二视频| 国产午夜亚洲精品午夜鲁丝片| 亚洲伦理在线免费看| 精品一区二区在线视频| 成人av在线播放网址| 日韩一级片在线播放| 一区二区三区丝袜| 国产乱理伦片在线观看夜一区| 欧美性高清videossexo| 国产农村妇女毛片精品久久麻豆 | 天堂va蜜桃一区二区三区漫画版| 久久er99热精品一区二区| 91美女蜜桃在线| 久久久久国产精品麻豆|