Example #1
0
/*********************************************************************
*
*       _FlushLine
*/
static void _FlushLine(void) {
  int i;
  int iEnd = _x1_InUse-_x0;
  int IMax = GUI_Context.AA_Factor * GUI_Context.AA_Factor;
  for (i =_x0_InUse-_x0; i<=iEnd; i++) {
    int Intens = *(pabAABuffer+i);
    if (Intens) {
      /* Check we can use line draw */
      if (Intens == IMax) {
        int j;
        for (j=i; j<iEnd; ) {
          if (*(pabAABuffer+j+1) != IMax) {
            break;
          }
          j++;
        }
        /* Draw the full pixel(s) */
        if (j!=i) {
          pLCD_HLPrev->pfDrawHLine(_x0+i, _y, _x0+j);
          i = j;  /*xxx*/
        } else {
          LCD_HL_DrawPixel (_x0+i,_y);
        }
      } else {
        LCD_SetPixelAA(_x0+i,_y, (15*Intens+IMax/2)/IMax);
      }
    }    
  }
  _CleanLine();
}
Example #2
0
static void DrawTrans(int x0, int y0, int XSize, int YSize, int BytesPerLine, const U8*pData) {
  int x, y;
  for (y = 0; y < YSize; y++) {
    const U8 *pData0 = pData;
    U8 Rem = XSize & 3;
    for (x = 0; x < XSize - 1; x += 4) {
      LCD_SetPixelAA(x + x0    , y0 + y, aConvTable[((*pData0  ) >> 6)       ]);
      LCD_SetPixelAA(x + x0 + 1, y0 + y, aConvTable[((*pData0  ) >> 4) & 0x03]);
      LCD_SetPixelAA(x + x0 + 2, y0 + y, aConvTable[((*pData0  ) >> 2) & 0x03]);
      LCD_SetPixelAA(x + x0 + 3, y0 + y, aConvTable[((*pData0++)     ) & 0x03]);
  	}
    if (Rem) {
      LCD_SetPixelAA(x + x0    , y0 + y, aConvTable[((*pData0  ) >> 6)       ]);
      if (Rem > 1) {
        LCD_SetPixelAA(x + x0 + 1, y0 + y, aConvTable[((*pData0  ) >> 4) & 0x03]);
        if (Rem > 2) {
          LCD_SetPixelAA(x + x0 + 2, y0 + y, aConvTable[((*pData0  ) >> 2) & 0x03]);
        }
      }
    }