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

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

?? lcd_rotateccw.c

?? ucgui3.90原嗎,有memdev部分,支持彩旦
?? 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_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一区二区三区免费野_久草精品视频
日韩精品一区二区三区视频播放 | 中文字幕在线不卡一区| 日韩一区二区三区免费看| 欧美日韩国产小视频在线观看| 在线精品视频小说1| 欧洲一区二区三区在线| 欧美视频自拍偷拍| 欧美日韩在线亚洲一区蜜芽| 欧美日韩免费观看一区三区| 欧美人牲a欧美精品| 欧美精品电影在线播放| 日韩三级高清在线| 精品成人一区二区| 国产欧美一区二区三区在线老狼| 国产拍欧美日韩视频二区| 中文字幕五月欧美| 亚洲激情六月丁香| 亚洲va在线va天堂| 日本欧美一区二区三区乱码| 久久精品国产网站| 国产一区激情在线| 成av人片一区二区| 日本精品裸体写真集在线观看| 欧美在线色视频| 制服丝袜av成人在线看| 精品国偷自产国产一区| 国产精品你懂的| 亚洲高清一区二区三区| 久久成人免费日本黄色| 懂色av一区二区在线播放| 色综合天天综合网天天狠天天 | 欧美精品欧美精品系列| 欧美v国产在线一区二区三区| 亚洲国产成人午夜在线一区| 亚洲欧美色图小说| 日韩av电影一区| 国产99一区视频免费| 精品污污网站免费看| 精品国产伦理网| 亚洲欧美日韩小说| 日本不卡一区二区三区| 成人免费毛片aaaaa**| 欧美性xxxxxxxx| 精品成人在线观看| 亚洲欧洲制服丝袜| 久久国产尿小便嘘嘘尿| 成人黄色软件下载| 欧美一区二区三区在线看| 国产欧美日韩麻豆91| 亚洲成人综合视频| 岛国一区二区在线观看| 欧美一区二区美女| 亚洲婷婷在线视频| 久久福利资源站| 91小视频免费看| 久久亚洲影视婷婷| 午夜精品免费在线观看| 成人高清视频在线观看| 欧美一级视频精品观看| 亚洲精选一二三| 国产在线麻豆精品观看| 欧美日韩国产片| 亚洲欧美在线视频观看| 紧缚奴在线一区二区三区| 欧美在线制服丝袜| 欧美国产亚洲另类动漫| 美女一区二区久久| 欧美主播一区二区三区| 国产精品短视频| 国产另类ts人妖一区二区| 日韩一区二区免费电影| 一区二区久久久久久| 国产高清久久久| 日韩欧美精品在线视频| 亚洲成人综合在线| 一本到三区不卡视频| 日本一区二区三区四区在线视频 | 久久精品国产99久久6| 在线精品视频免费播放| 国产精品久久久久久久午夜片| 蜜乳av一区二区| 欧美日韩激情一区| 有码一区二区三区| 成人免费视频免费观看| 久久久久国产精品麻豆ai换脸 | 黑人巨大精品欧美一区| 欧美久久久久久蜜桃| 一区二区三区在线视频免费观看| 国产成人精品亚洲日本在线桃色| 欧美电视剧在线观看完整版| 日韩中文字幕一区二区三区| 欧美日韩一区在线| 亚洲综合偷拍欧美一区色| 色播五月激情综合网| 亚洲人一二三区| 91精品福利在线| 亚洲国产日韩av| 欧美日韩国产另类一区| 亚洲成av人片在线| 欧美日韩一本到| 日韩中文字幕不卡| 日韩一区二区三区在线| 奇米影视一区二区三区| 日韩欧美高清dvd碟片| 蜜臀av在线播放一区二区三区| 欧美一级精品在线| 九九国产精品视频| 国产日韩精品久久久| 成人免费毛片app| 亚洲色图欧洲色图| 在线亚洲高清视频| 亚洲高清中文字幕| 日韩一区二区不卡| 极品少妇一区二区| 久久久久国产一区二区三区四区| 国产不卡视频一区| 综合激情网...| 色综合夜色一区| 亚洲成人av在线电影| 日韩欧美亚洲一区二区| 国产精品正在播放| 1区2区3区精品视频| 欧美亚洲一区二区在线| 亚洲va中文字幕| 精品久久久久久久久久久院品网| 成人综合婷婷国产精品久久蜜臀| 日韩理论电影院| 6080国产精品一区二区| 国产精品自在欧美一区| 国产精品久久久久久福利一牛影视| 色综合亚洲欧洲| 蜜臀av性久久久久av蜜臀妖精| 国产天堂亚洲国产碰碰| 97精品视频在线观看自产线路二| 午夜国产精品影院在线观看| 日韩精品一区二区三区视频| 成年人网站91| 日韩激情视频在线观看| 国产亚洲成年网址在线观看| 91美女视频网站| 美女在线视频一区| 最新久久zyz资源站| 欧美美女黄视频| 国产尤物一区二区| 一区二区三区四区中文字幕| 欧美一区二区三区精品| 成人美女在线观看| 亚洲v精品v日韩v欧美v专区| 国产三级一区二区三区| 91官网在线观看| 国产在线播放一区二区三区| 一区二区三区免费网站| 精品国内片67194| 欧美伊人久久大香线蕉综合69| 精品一区免费av| 亚洲一区二区三区视频在线| 精品毛片乱码1区2区3区| 色偷偷成人一区二区三区91| 久久国产成人午夜av影院| 亚洲综合免费观看高清完整版| 精品国产a毛片| 欧美三区免费完整视频在线观看| 国产乱码精品一区二区三区五月婷 | 日韩欧美在线影院| av电影在线观看一区| 美女脱光内衣内裤视频久久网站| 一区二区三区中文字幕| 久久久不卡影院| 91精品综合久久久久久| 日本韩国一区二区| 成人国产精品免费观看动漫| 久久av中文字幕片| 三级欧美在线一区| 亚洲免费观看高清完整版在线 | 国产午夜精品久久久久久免费视 | 91精品国产综合久久香蕉麻豆| 成人精品视频网站| 国模冰冰炮一区二区| 偷拍自拍另类欧美| 亚洲最快最全在线视频| 中文字幕成人在线观看| 欧美一级黄色录像| 91精品国产综合久久小美女| 欧洲av在线精品| 91一区二区三区在线播放| 国产高清久久久| 精品一区二区三区蜜桃| 日韩成人免费看| 亚洲va欧美va天堂v国产综合| 亚洲欧美另类久久久精品2019| 国产欧美日韩视频一区二区| 久久久www成人免费无遮挡大片| 欧美一卡在线观看| 欧美喷潮久久久xxxxx| 色综合天天性综合| 99re热这里只有精品视频| 成人免费毛片片v| 岛国av在线一区| 国产·精品毛片| 高清beeg欧美|