Ejemplo n.º 1
0
void GUI_DrawBitmapExp(int x0,    int y0,
                       int XSize, int YSize,
                       int XMul,  int YMul,
                       int BitsPerPixel, 
                       int BytesPerLine,
                       const U8* pData,
                       const GUI_LOGPALETTE* pPal)
{
  GUI_DRAWMODE PrevDraw;
  GUI_LOCK();
  PrevDraw = GUI_SetDrawMode((pPal && pPal->HasTrans) ? GUI_DRAWMODE_TRANS : 0);
  #if (GUI_WINSUPPORT)
    WM_ADDORG(x0,y0);
    {
      GUI_RECT r;
      r.x0 = x0;
      r.x1 = x0 + XSize * XMul -1;
      r.y0 = y0;
      r.y1 = y0 + YSize * YMul -1;
      WM_ITERATE_START(&r); {
  #endif
  LCD_DrawBitmap( x0, y0 ,XSize ,YSize, XMul, YMul
                 ,BitsPerPixel, BytesPerLine, pData, pPal);
  #if (GUI_WINSUPPORT)
      } WM_ITERATE_END();
    }
  #endif
  GUI_SetDrawMode(PrevDraw);
  GUI_UNLOCK();
}
Ejemplo n.º 2
0
void GUI_DrawPolyLine     (const GUI_POINT* pPoints, int NumPoints, int x0, int y0) {
  GUI_LOCK();
  #if (GUI_WINSUPPORT)
    WM_ADDORG(x0,y0);
    WM_ITERATE_START(NULL); {
  #endif
  _DrawPolyLine (pPoints, NumPoints, x0, y0);
  #if (GUI_WINSUPPORT)
    } WM_ITERATE_END();
  #endif
  GUI_UNLOCK();
}
Ejemplo n.º 3
0
/*********************************************************************
*
*       GUI_DrawPoint
*/
void GUI_DrawPoint(int x, int y) {
  GUI_LOCK();
  #if (GUI_WINSUPPORT)
    WM_ADDORG(x, y);
    WM_ITERATE_START(NULL); {
  #endif
  GL_DrawPoint(x, y);
  #if (GUI_WINSUPPORT)
    } WM_ITERATE_END();
  #endif
  GUI_UNLOCK();
}
Ejemplo n.º 4
0
/*********************************************************************
*
*       GUI_DrawGraph
*/  
void GUI_DrawGraph(I16 *pay, int NumPoints, int x0, int y0) {
  GUI_LOCK();
  #if (GUI_WINSUPPORT)
    WM_ADDORG(x0,y0);
    WM_ITERATE_START(NULL); {
  #endif
  _DrawGraph(pay, NumPoints, x0, y0);
  #if (GUI_WINSUPPORT)
    } WM_ITERATE_END();
  #endif
  GUI_UNLOCK();
}
Ejemplo n.º 5
0
/*********************************************************************
*
*       _DrawPolyLine
*/
static void _DrawPolyLine(const GUI_POINT * pPoints, int NumPoints, int x0, int y0) {
  unsigned PixelCnt;
  PixelCnt = 0;
  WM_ADDORG(x0,y0);
  WM_ITERATE_START(NULL); {
    GL_MoveTo(pPoints->x + x0, y0 - pPoints->y);
    while (--NumPoints >0) {
      pPoints++;
      GL_DrawLineToEx(pPoints->x + x0, y0 - pPoints->y, &PixelCnt);
    }
  } WM_ITERATE_END();
}
Ejemplo n.º 6
0
/*********************************************************************
*
*       _DrawMax
*/
static void _DrawMax(void) {
  GUI_RECT r;
  WM_GetInsideRect(&r);
  WM_ADDORG(r.x0, r.y0);
  WM_ADDORG(r.x1, r.y1);
  WM_ITERATE_START(&r); {
    LCD_DrawHLine(r.x0 + 1, r.y0 + 1, r.x1 - 1);
    LCD_DrawHLine(r.x0 + 1, r.y0 + 2, r.x1 - 1);
    LCD_DrawHLine(r.x0 + 1, r.y1 - 1, r.x1 - 1);
    LCD_DrawVLine(r.x0 + 1, r.y0 + 1, r.y1 - 1);
    LCD_DrawVLine(r.x1 - 1, r.y0 + 1, r.y1 - 1);
  } WM_ITERATE_END();
}
Ejemplo n.º 7
0
/*********************************************************************
*
*       GUI_DrawFocusRect
*/
void GUI_DrawFocusRect(const GUI_RECT *pRect, int Dist) {
  GUI_RECT r;
  GUI__ReduceRect(&r, pRect, Dist);
  GUI_LOCK();
  #if (GUI_WINSUPPORT)
    WM_ADDORG(r.x0, r.y0);
    WM_ADDORG(r.x1, r.y1);
    WM_ITERATE_START(&r); {
  #endif
    _DrawFocusRect(&r);
  #if (GUI_WINSUPPORT)
    } WM_ITERATE_END();
  #endif
  GUI_UNLOCK();
}
Ejemplo n.º 8
0
/*********************************************************************
*
*       GUI_DrawPixel
*/
void GUI_DrawPixel(int x, int y) {
  #if (GUI_WINSUPPORT)
    GUI_RECT r;
  #endif
  GUI_LOCK();
  #if (GUI_WINSUPPORT)
    WM_ADDORG(x,y);
    r.x0 = r.x1 = x;
    r.y0 = r.y1 = y;
    WM_ITERATE_START(&r); {
  #endif
  LCD_HL_DrawPixel(x,y);
  #if (GUI_WINSUPPORT)
    } WM_ITERATE_END();
  #endif
  GUI_UNLOCK();
}
Ejemplo n.º 9
0
/*********************************************************************
*
*       GUI_FillRect
*/
void GUI_FillRect(int x0, int y0, int x1, int y1) {
  #if (GUI_WINSUPPORT)
    GUI_RECT r;
  #endif
  GUI_LOCK();
  #if (GUI_WINSUPPORT)
    WM_ADDORG(x0,y0);
    WM_ADDORG(x1,y1);
    r.x0 = x0; r.x1 = x1;
    r.y0 = y0; r.y1 = y1;
    WM_ITERATE_START(&r); {
  #endif
  LCD_FillRect(x0,y0,x1,y1);
  #if (GUI_WINSUPPORT)
    } WM_ITERATE_END();
  #endif
  GUI_UNLOCK();
}
Ejemplo n.º 10
0
/*********************************************************************
*
*       GUI_DrawVLine
*/
void GUI_DrawVLine(int x0, int y0, int y1) {
  #if (GUI_WINSUPPORT)
    GUI_RECT r;
  #endif
  GUI_LOCK();
  #if (GUI_WINSUPPORT)
    WM_ADDORG(x0,y0);
    WM_ADDORGY(y1);
    r.x1 = r.x0 = x0;
    r.y0 = y0;
    r.y1 = y1;
    WM_ITERATE_START(&r); {
  #endif
  LCD_DrawVLine(x0, y0, y1);
  #if (GUI_WINSUPPORT)
    } WM_ITERATE_END();
  #endif
  GUI_UNLOCK();
}
Ejemplo n.º 11
0
/*********************************************************************
*
*       _DrawRestore
*/
static void _DrawRestore(void) {
  GUI_RECT r;
  int Size;
  WM_GetInsideRect(&r);
  WM_ADDORG(r.x0, r.y0);
  WM_ADDORG(r.x1, r.y1);
  Size = ((r.x1 - r.x0 + 1) << 1) / 3;
  WM_ITERATE_START(&r); {
    LCD_DrawHLine(r.x1 - Size, r.y0 + 1,        r.x1 - 1);
    LCD_DrawHLine(r.x1 - Size, r.y0 + 2,        r.x1 - 1);
    LCD_DrawHLine(r.x0 + Size, r.y0 + Size,     r.x1 - 1);
    LCD_DrawVLine(r.x1 - Size, r.y0 + 1,        r.y1 - Size);
    LCD_DrawVLine(r.x1 - 1,    r.y0 + 1,        r.y0 + Size);
    LCD_DrawHLine(r.x0 + 1,    r.y1 - Size,     r.x0 + Size);
    LCD_DrawHLine(r.x0 + 1,    r.y1 - Size + 1, r.x0 + Size);
    LCD_DrawHLine(r.x0 + 1,    r.y1 - 1,        r.x0 + Size);
    LCD_DrawVLine(r.x0 + 1,    r.y1 - Size,     r.y1 - 1);
    LCD_DrawVLine(r.x0 + Size, r.y1 - Size,     r.y1 - 1);
  } WM_ITERATE_END();
}
Ejemplo n.º 12
0
/*********************************************************************
*
*       GUI_InvertRect
*/
void GUI_InvertRect(int x0, int y0, int x1, int y1) {
  GUI_DRAWMODE PrevDraw;
  #if (GUI_WINSUPPORT)
    GUI_RECT r;
  #endif
  GUI_LOCK();
  PrevDraw = GUI_SetDrawMode(GUI_DRAWMODE_XOR);
  #if (GUI_WINSUPPORT)
    WM_ADDORG(x0, y0);
    WM_ADDORG(x1, y1);
    r.x0 = x0;
    r.x1 = x1;
    r.y0 = y0;
    r.y1 = y1;
    WM_ITERATE_START(&r); {
  #endif
  LCD_FillRect(x0, y0, x1, y1);
  #if (GUI_WINSUPPORT)
    } WM_ITERATE_END();
  #endif
  GUI_SetDrawMode(PrevDraw);
  GUI_UNLOCK();
}