1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released      *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission.     *
5  ******************************************************************************************************/
6 
7 #include "CursorSize.h"
8 #include "EngaugeAssert.h"
9 #include "Logger.h"
10 
CursorSizeToPixels(CursorSize cursorSize)11 int CursorSizeToPixels (CursorSize cursorSize)
12 {
13   ENGAUGE_ASSERT (cursorSize < NUM_CURSOR_SIZES);
14 
15   switch (cursorSize) {
16   case CURSOR_SIZE_16:
17     return 16;
18 
19   case CURSOR_SIZE_32:
20     return 32;
21 
22   case CURSOR_SIZE_48:
23     return 48;
24 
25   case CURSOR_SIZE_64:
26     return 64;
27 
28   default:
29     break;
30   }
31 
32   LOG4CPP_ERROR_S ((*mainCat)) << "CursorSizeToPixels encountered unexpected cursor size " << cursorSize;
33   ENGAUGE_ASSERT (false);
34   return 0;
35 }
36