Engauge Digitizer  2
CursorSize.cpp
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 
10 int CursorSizeToPixels (CursorSize cursorSize)
11 {
12  ENGAUGE_ASSERT (cursorSize < NUM_CURSOR_SIZES);
13 
14  switch (cursorSize) {
15  case CURSOR_SIZE_16:
16  return 16;
17 
18  case CURSOR_SIZE_32:
19  return 32;
20 
21  case CURSOR_SIZE_48:
22  return 48;
23 
24  case CURSOR_SIZE_64:
25  return 64;
26 
27  default:
28  break;
29  }
30 
31  ENGAUGE_ASSERT (false);
32  return 0;
33 }