Engauge Digitizer 2
Loading...
Searching...
No Matches
CursorSize.cpp
Go to the documentation of this file.
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
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}
int CursorSizeToPixels(CursorSize cursorSize)
CursorSize
Custom cursor sizes supported on all platforms for the most part, according to QCursor documentation.
Definition CursorSize.h:11
@ CURSOR_SIZE_48
Definition CursorSize.h:14
@ CURSOR_SIZE_32
Definition CursorSize.h:13
@ CURSOR_SIZE_16
Definition CursorSize.h:12
@ CURSOR_SIZE_64
Definition CursorSize.h:15
@ NUM_CURSOR_SIZES
Definition CursorSize.h:16
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) define ENGAUGE...