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

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

?? lcd_rotateccw.c

?? UC_GUI開發源代碼,里面含有范例,源文件
?? C
字號:
/*
*********************************************************************************************************
*                                             uC/GUI V3.98
*                        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_RotateCCW.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);
  y -= Diff;
  switch (GUI_Context.DrawMode & (LCD_DRAWMODE_TRANS | LCD_DRAWMODE_XOR)) {
  case 0:
    do {
      LCDDEV_L0_SetPixelIndex(x, y, (*p & (0x80 >> Diff)) ? Index1 : Index0);
      y--;
			if (++Diff == 8) {
        Diff = 0;
				p++;
			}
		} while (--xsize);
    break;
  case LCD_DRAWMODE_TRANS:
    do {
  		if (*p & (0x80 >> Diff))
        LCDDEV_L0_SetPixelIndex(x, y, Index1);
      y--;
			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);
      }
      y--;
			if (++Diff == 8) {
        Diff = 0;
				p++;
			}
		} while (--xsize);
    break;
	}
}

/*********************************************************************
*
*       _DrawBitmap
*
* Purpose:
*   Draws a bitmap (1bpp) counter clockwise.
*/
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 + i, y0, 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) {
  int x1, y1;
  x1 = pRect->x1;
  y1 = pRect->y1;
  pRect->x1 = pRect->x0 + (y1 - pRect->y0);
  pRect->y1 = pRect->y0 + (x1 - pRect->x0);
}

/*********************************************************************
*
*       _TransformPointCCW
*
* 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 _TransformPointCCW(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;
  /* Rotate and add window origin */
  *pXPos = ClientRect.x0 + yPos;
  *pYPos = ClientRect.y1 - xPos;
  /* Handle rotation of text rectangle */
  *pXPos = *pXPos + GUI_RectDispString.x0 - GUI_RectDispString.y0;
  *pYPos = *pYPos + GUI_RectDispString.y1 - (ClientRect.y1 - ClientRect.y0) + GUI_RectDispString.x0;
}

/*********************************************************************
*
*       _DrawBitmapCCW
*/
static void _DrawBitmapCCW(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 */
  _TransformPointCCW(&x0, &y0);
  _TransformPointCCW(&x1, &y1);
  /*  Handle BITMAP without magnification */
  if ((xMul == 1) && (yMul == 1)) {
    int Diff = 0;
    /* Clip top */
    if (y1 < GUI_Context.ClipRect.y0) {
      int Diff = GUI_Context.ClipRect.y0 - y1;
      xsize -= Diff;
    }
    /* Clip bottom */
    if (y0 > GUI_Context.ClipRect.y1) {
      Diff = y0 - GUI_Context.ClipRect.y1;
			xsize -= Diff;
			switch (BitsPerPixel) {
			case 1:
  			pPixel += (Diff >> 3); y0 -= (Diff >> 3) << 3; Diff &= 7;
				break;
			}
    }
    if (ysize <= 0) {
		  return;
    }
    /* Clip right side */
    if (x1 > GUI_Context.ClipRect.x1) {
      int Diff = x1 - GUI_Context.ClipRect.x1;
      ysize -= Diff;
    }
    /* Clip left side */
    if (x0 < GUI_Context.ClipRect.x0) {
      int Diff = GUI_Context.ClipRect.x0 - x0;
      pPixel += Diff * BytesPerLine;
      x0 += Diff;
      ysize -= Diff;
    }
    if (xsize <= 0) {
		  return;
    }
    _DrawBitmap(x0, y0, xsize, ysize, BitsPerPixel, BytesPerLine, pPixel, Diff, pTrans);
  } else {
    /* Handle BITMAP with magnification */
    int x, y, xi, yi;
    int Shift = 8 - BitsPerPixel;
    for (x = x0, xi = 0; xi < ysize; xi++, x += yMul, pPixel += BytesPerLine) {
      int xMax = x + yMul - 1;
      if ((xMax >= GUI_Context.ClipRect.x0) && (x <= GUI_Context.ClipRect.x1)) {
        int BitsLeft = 0;
        const U8 GUI_UNI_PTR * pDataLine = pPixel;
        for (y = y0, yi = 0; yi < xsize; yi++, y -= 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, y - xMul + 1, xMax, y);
            LCD_COLORINDEX = OldColor;
          }
        }
      }
    }
  }
}

/*********************************************************************
*
*       Global data
*
**********************************************************************
*/
/*********************************************************************
*
*       LCD_APIListCCW
*
* Purpose:
*   Function pointer table for rotating text CCW
*/
tLCD_APIList LCD_APIListCCW = {
  (tLCD_DrawBitmap*)&_DrawBitmapCCW,
  &_Rect2TextRect
};

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久高清一区二区三区| 久久综合久久综合久久| 欧美极品aⅴ影院| 午夜视频在线观看一区二区| 成人黄色电影在线 | 国产一区二区三区电影在线观看| 99综合电影在线视频| 精品免费国产二区三区| 亚洲午夜免费福利视频| 成人性生交大片免费看在线播放| 91精品国产免费久久综合| 亚洲免费伊人电影| 成人av网址在线观看| 欧美大黄免费观看| 亚洲v中文字幕| 在线精品视频小说1| 国产精品视频一二| 国产一区二区影院| 日韩欧美一级二级三级| 日韩国产欧美视频| 欧美专区日韩专区| 亚洲精品视频一区二区| 国产传媒久久文化传媒| 精品日本一线二线三线不卡| 日韩—二三区免费观看av| 在线免费观看日韩欧美| 亚洲三级在线免费观看| 国产一区不卡视频| 欧美xxxxxxxxx| 日韩电影在线免费| 91精品蜜臀在线一区尤物| 香蕉影视欧美成人| 欧美在线一二三四区| 椎名由奈av一区二区三区| 成人a免费在线看| 国产拍欧美日韩视频二区| 国产成人午夜电影网| 久久综合九色欧美综合狠狠| 国产一区 二区| 久久精品日产第一区二区三区高清版 | 日韩一区二区电影| 麻豆专区一区二区三区四区五区| 7777精品伊人久久久大香线蕉经典版下载 | 欧美国产精品专区| 豆国产96在线|亚洲| 国产欧美一区二区精品性色 | 一区二区高清在线| 欧美在线免费观看视频| 亚洲自拍与偷拍| 欧美性色欧美a在线播放| 亚洲国产精品自拍| 欧美二区三区91| 欧美a一区二区| 欧美成人aa大片| 狠狠v欧美v日韩v亚洲ⅴ| 2014亚洲片线观看视频免费| 国产福利不卡视频| 最新久久zyz资源站| 91成人网在线| 日韩在线观看一区二区| 日韩精品一区二区三区在线观看 | 激情久久久久久久久久久久久久久久| 日韩精品一区二区三区视频播放 | 欧美在线观看一区二区| 亚洲成人动漫一区| 91精品国产91久久久久久最新毛片| 久久黄色级2电影| 国产日韩一级二级三级| 99视频有精品| 亚洲h在线观看| 精品国产一区二区三区av性色| 国产成人一区在线| 亚洲综合视频在线观看| 日韩一区二区电影| 成人午夜短视频| 亚洲国产成人tv| 精品久久久网站| 成人免费看的视频| 亚洲成人动漫一区| 国产午夜亚洲精品午夜鲁丝片| av在线一区二区| 日韩成人av影视| 中文字幕欧美三区| 欧美电影一区二区三区| 国产成人高清视频| 亚洲不卡av一区二区三区| 精品1区2区在线观看| av毛片久久久久**hd| 日日夜夜精品视频天天综合网| 久久久久久久网| 欧美四级电影网| 国产高清亚洲一区| 亚洲v中文字幕| 国产精品每日更新在线播放网址| 欧美日韩一卡二卡| 丁香啪啪综合成人亚洲小说 | 亚洲国产精品黑人久久久| 欧美色图第一页| 国产成人综合亚洲91猫咪| 亚洲成人久久影院| 欧美国产精品一区| 91精品国产综合久久久久久久 | 美洲天堂一区二卡三卡四卡视频| 国产精品久久久久久久久免费桃花| 欧美另类一区二区三区| 成人网页在线观看| 蜜臀av一级做a爰片久久| 亚洲免费伊人电影| 久久久久免费观看| 欧美日本国产一区| gogogo免费视频观看亚洲一| 免费观看一级特黄欧美大片| 一区在线中文字幕| 久久看人人爽人人| 欧美一区二区三区精品| 色偷偷久久人人79超碰人人澡| 国产精品主播直播| 日韩福利视频导航| 亚洲国产日韩av| 日韩一区中文字幕| 久久久久久夜精品精品免费| 欧美一级在线观看| 在线观看免费成人| 99精品一区二区| 国产成人免费xxxxxxxx| 麻豆成人免费电影| 亚洲第四色夜色| 亚洲精品va在线观看| 国产欧美日韩在线| 久久只精品国产| 精品国产一区二区三区久久久蜜月 | 5月丁香婷婷综合| 色噜噜狠狠色综合中国| 不卡的看片网站| 国产很黄免费观看久久| 老司机午夜精品99久久| 日本亚洲欧美天堂免费| 亚洲欧洲精品一区二区精品久久久 | 日本美女一区二区三区| 国产精品久久久久天堂| 精品国内片67194| 欧美一级午夜免费电影| 欧美人妖巨大在线| 91成人在线免费观看| 色视频成人在线观看免| av成人免费在线观看| 国产成人精品亚洲777人妖| 国产在线播精品第三| 狠狠色丁香婷婷综合久久片| 久久激情五月婷婷| 久久99精品一区二区三区| 青青草伊人久久| 日本成人在线看| 美腿丝袜亚洲三区| 麻豆精品在线看| 麻豆一区二区三区| 伦理电影国产精品| 精品一区二区三区香蕉蜜桃| 久色婷婷小香蕉久久| 裸体一区二区三区| 极品少妇xxxx偷拍精品少妇| 韩日av一区二区| 国产一区二区精品久久91| 国产精品99久久久久久久女警 | 国产精品亚洲а∨天堂免在线| 国产伦精一区二区三区| 国产成人精品免费| 99久久99久久精品免费看蜜桃| 色综合天天做天天爱| 日本道精品一区二区三区| 在线观看www91| 91精品一区二区三区在线观看| 欧美一级午夜免费电影| 精品国产精品一区二区夜夜嗨| 久久人人爽爽爽人久久久| 欧美激情资源网| 亚洲三级在线免费观看| 亚洲chinese男男1069| 免费日本视频一区| 国产尤物一区二区在线| jizzjizzjizz欧美| 欧美日韩国产综合草草| 日韩视频一区二区三区在线播放| 精品国产乱码91久久久久久网站| 国产日韩高清在线| 一区二区三区精品久久久| 日本网站在线观看一区二区三区| 韩国午夜理伦三级不卡影院| 大胆欧美人体老妇| 欧美三级欧美一级| 精品国精品国产| 国产精品高潮久久久久无| 亚洲一区二区三区中文字幕在线| 日韩国产精品久久久久久亚洲| 韩国精品主播一区二区在线观看 | 国产乱色国产精品免费视频| www.av亚洲| 69p69国产精品| 国产精品视频线看| 日韩不卡一区二区|