GUI_Pen.c
上传用户:zbk8730
上传日期:2017-08-10
资源大小:12168k
文件大小:2k
源码类别:

uCOS

开发平台:

C/C++

  1. /*********************************************************************
  2. *                SEGGER MICROCONTROLLER SYSTEME GmbH                 *
  3. *        Solutions for real time microcontroller applications        *
  4. **********************************************************************
  5. *                                                                    *
  6. *        (c) 2002         SEGGER Microcontroller Systeme GmbH        *
  7. *                                                                    *
  8. *        Internet: www.segger.com    Support:  support@segger.com    *
  9. *                                                                    *
  10. **********************************************************************
  11. **** emWin/GSC Grafical user interface for embedded applications ****
  12. emWin is protected by international copyright laws. Knowledge of the
  13. source code may not be used to write a similar product. This file may
  14. only be used in accordance with a license and should not be re-
  15. distributed in any way. We appreciate your understanding and fairness.
  16. ----------------------------------------------------------------------
  17. File        : GUIPen.C
  18. Purpose     : Getting / Setting pen attributes
  19. ---------------------------END-OF-HEADER------------------------------
  20. */
  21. #include "GUI_Protected.H"
  22. /*      *********************************
  23.         *                               *
  24.         *      Get / Set Attributes     *
  25.         *                               *
  26.         *********************************
  27. */
  28. U8        GUI_GetPenSize   (void) {
  29.   U8 r;
  30.   GUI_LOCK();
  31.   r = GUI_Context.PenSize;
  32.   GUI_UNLOCK();
  33.   return r;
  34. }
  35. U8        GUI_GetPenShape  (void) {
  36.   U8 r;
  37.   GUI_LOCK();
  38.   r = GUI_Context.PenShape;
  39.   GUI_UNLOCK();
  40.   return r;
  41. }
  42. /*
  43.         *********************************************************
  44.         *                                                       *
  45.         *       Set Pen attributes                              *
  46.         *                                                       *
  47.         *********************************************************
  48. Purpose:  Assign color/index to foreground/ background
  49. */
  50. U8 GUI_SetPenSize   (U8 PenSize) {
  51.   U8 r;
  52.   GUI_LOCK();
  53.     r = GUI_Context.PenSize;
  54.     GUI_Context.PenSize = PenSize;
  55.   GUI_UNLOCK();
  56.   return r;
  57. }
  58. U8 GUI_SetPenShape  (U8 PenShape) {
  59.   U8 r;
  60.   GUI_LOCK();
  61.     r = GUI_Context.PenShape;
  62.     GUI_Context.PenShape = PenShape;
  63.   GUI_UNLOCK();
  64.   return r;
  65. }