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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? lcd_rotatecw.c

?? 這套代碼已經(jīng)成功一直到S3C44B0X開發(fā)板上
?? 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_RotateCW.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) 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);
}

/*********************************************************************
*
*       _TransformPointCW
*
* 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 _TransformPointCW(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.y0 + xPos;
  /* Handle rotation of text rectangle */
  *pXPos = *pXPos + GUI_RectDispString.x1 + GUI_RectDispString.y0;
  *pYPos = *pYPos + GUI_RectDispString.y0 - GUI_RectDispString.x0;
}

/*********************************************************************
*
*       _DrawBitmapCW
*/
static void _DrawBitmapCW(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 */
  _TransformPointCW(&x0, &y0);
  _TransformPointCW(&x1, &y1);
  /*  Handle BITMAP without magnification */
  if ((xMul == 1) && (yMul == 1)) {
    int Diff = 0;
    /* Clip top */
    if (y1 > GUI_Context.ClipRect.y1) {
      int Diff = y1 - GUI_Context.ClipRect.y1; 
      xsize -= Diff;
    }
    /* Clip bottom */
    if (y0 < GUI_Context.ClipRect.y0) {
      Diff = GUI_Context.ClipRect.y1 - y0;
			xsize -= Diff;
			switch (BitsPerPixel) {
			case 1:
  			pPixel += (Diff >> 3); y0 -= (Diff >> 3) << 3; Diff &= 7;
				break;
			}
    }
    if (ysize <=0) {
		  return;
    }
    /* Clip right side */
    if (x0 > GUI_Context.ClipRect.x1) {
      int Diff = x0 - GUI_Context.ClipRect.x1;
      ysize -= Diff;
      x0 -= Diff;
      pPixel += Diff * BytesPerLine;
    }
    /* Clip left side */
    if (x1 < GUI_Context.ClipRect.x0) {
      int Diff = GUI_Context.ClipRect.x0 - x1;
      x1 += 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(xMax, y, x, y + xMul - 1);
            LCD_COLORINDEX = OldColor;
          }
        }
      }
    }
  }
}

/*********************************************************************
*
*       Global data
*
**********************************************************************
*/
/*********************************************************************
*
*       LCD_APIListCW
*
* Purpose:
*   Function pointer table for rotating text CW
*/
tLCD_APIList LCD_APIListCW = {
  (tLCD_DrawBitmap*)&_DrawBitmapCW,
  &_Rect2TextRect
};

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美丝袜第三区| 欧美色综合网站| 欧美色网站导航| 欧美va亚洲va| 亚洲最新视频在线观看| 国产一区二区三区日韩| 在线免费观看成人短视频| 亚洲精品在线网站| 午夜欧美2019年伦理| 91亚洲永久精品| 久久久综合网站| 日本在线播放一区二区三区| 91理论电影在线观看| 国产欧美精品国产国产专区| 蜜桃av噜噜一区| 中文无字幕一区二区三区| 日本女人一区二区三区| 北岛玲一区二区三区四区| 91精品黄色片免费大全| 亚洲国产一区在线观看| 91麻豆6部合集magnet| 国产精品你懂的在线欣赏| 麻豆中文一区二区| 91精品国产色综合久久 | 色综合色狠狠天天综合色| 精品免费国产一区二区三区四区| 亚洲国产精品一区二区尤物区| 99视频一区二区三区| 国产欧美一区二区三区网站 | 国产日韩三级在线| 麻豆精品新av中文字幕| 欧美一区二区黄| 日本伊人午夜精品| 欧美一级免费大片| 美腿丝袜亚洲三区| 欧美va在线播放| 韩国一区二区三区| 国产日韩欧美在线一区| 高清久久久久久| 国产精品超碰97尤物18| 99re成人精品视频| 亚洲精品欧美专区| 欧美日韩国产首页| 奇米在线7777在线精品| 日韩欧美国产一区二区三区| 久久精品国产成人一区二区三区| 精品国产一二三| 国产传媒一区在线| 国产精品视频免费| 91传媒视频在线播放| 日韩激情在线观看| 国产亚洲一区字幕| 色综合久久久久久久久| 亚洲一区二区av电影| 欧美一区二区三区视频免费| 久久se这里有精品| 国产精品视频一二三| 欧美性受xxxx黑人xyx性爽| 日韩在线一二三区| 久久人人爽爽爽人久久久| 成人av网址在线| 夜夜夜精品看看| 精品少妇一区二区三区日产乱码 | 国产精品国产自产拍高清av王其| a4yy欧美一区二区三区| 五月激情综合网| 2020国产精品| 91福利小视频| 国产精品一区二区不卡| 亚洲综合激情网| 久久精品一区四区| 在线观看免费成人| 国产麻豆欧美日韩一区| 一区二区三区在线免费播放| 欧美不卡一区二区三区| 91污在线观看| 国产真实乱对白精彩久久| 亚洲精品免费在线观看| 久久蜜桃一区二区| 欧美精品 日韩| 成人午夜免费视频| 美国一区二区三区在线播放| 亚洲精品欧美综合四区| 久久亚洲欧美国产精品乐播| 欧美日韩在线不卡| www.日韩av| 国产一区免费电影| 日本va欧美va瓶| 一区二区三区色| 国产清纯美女被跳蛋高潮一区二区久久w | 欧美三级在线播放| 99麻豆久久久国产精品免费| 极品少妇xxxx精品少妇偷拍| 亚洲国产aⅴ成人精品无吗| 国产精品九色蝌蚪自拍| 国产日韩欧美一区二区三区综合| 日韩精品最新网址| 欧美日韩高清一区| 在线观看不卡一区| 91蜜桃免费观看视频| 粉嫩av亚洲一区二区图片| 久久精品久久精品| 日韩1区2区日韩1区2区| 香蕉久久一区二区不卡无毒影院| 成人欧美一区二区三区小说| 国产日产亚洲精品系列| 精品成人免费观看| 欧美v亚洲v综合ⅴ国产v| 日韩欧美视频在线| 日韩一级高清毛片| 欧美不卡激情三级在线观看| 欧美一卡2卡3卡4卡| 欧美一区二区三区在| 6080国产精品一区二区| 欧美久久久久中文字幕| 欧美精品久久天天躁| 欧美一区二区三区视频免费播放 | 欧美日韩在线播放三区四区| 91免费观看视频| 91精品福利视频| 欧美午夜精品久久久| 欧美久久久久久久久久| 欧美一级精品在线| 久久精品亚洲国产奇米99| www成人在线观看| 欧美激情在线观看视频免费| 国产精品久久久久久久久图文区| 亚洲欧洲成人自拍| 亚洲一区二区偷拍精品| 视频在线在亚洲| 麻豆精品一区二区综合av| 国精品**一区二区三区在线蜜桃| 国产精品88888| 99精品欧美一区二区蜜桃免费| 91同城在线观看| 欧美精品aⅴ在线视频| 2019国产精品| 亚洲精品老司机| 日本va欧美va瓶| 成人aa视频在线观看| 欧美日韩激情在线| 久久影视一区二区| 亚洲精选视频在线| 免费在线看成人av| 成人一区二区三区中文字幕| 欧美亚一区二区| 久久看人人爽人人| 亚洲国产成人高清精品| 国产精品一线二线三线精华| 91一区在线观看| 日韩欧美一二三四区| 亚洲图片激情小说| 蜜桃一区二区三区四区| 91亚洲精华国产精华精华液| 555www色欧美视频| 中文字幕中文字幕中文字幕亚洲无线| 一区二区三区毛片| 国产河南妇女毛片精品久久久 | 亚洲一线二线三线视频| 韩国三级在线一区| 欧美系列日韩一区| 亚洲国产岛国毛片在线| 日韩精品免费视频人成| 99久久精品国产一区二区三区| 欧美一级日韩免费不卡| 亚洲免费资源在线播放| 国产一区二区三区黄视频| 欧美性做爰猛烈叫床潮| 国产精品免费看片| 精品亚洲免费视频| 欧美调教femdomvk| 亚洲免费观看高清完整版在线 | 国产精品123区| 欧美精品久久久久久久多人混战| 日本一区二区三区在线不卡| 日韩专区中文字幕一区二区| 色婷婷综合视频在线观看| 久久精品视频免费| 麻豆精品一区二区av白丝在线 | 日本电影亚洲天堂一区| 国产清纯白嫩初高生在线观看91 | 亚洲一二三区在线观看| 北岛玲一区二区三区四区| 久久综合久久综合亚洲| 日韩专区一卡二卡| 欧美另类变人与禽xxxxx| 一区二区在线观看视频| eeuss影院一区二区三区| 国产偷国产偷亚洲高清人白洁| 美女www一区二区| 日韩午夜中文字幕| 日本在线不卡一区| 3d动漫精品啪啪| 日韩国产成人精品| 欧美疯狂性受xxxxx喷水图片| 亚洲精品免费在线观看| 日本韩国精品在线| 亚洲福利一区二区三区| 欧美电影在线免费观看| 亚洲电影在线播放|