-
Notifications
You must be signed in to change notification settings - Fork 41
/
Size.h
54 lines (40 loc) · 1.81 KB
/
Size.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
////////////////////////////////////////////////////////////////////////////////
// -------------------------------------------------------------------------- //
// //
// (C) 2010-2017 Robot Developers //
// See LICENSE for licensing info //
// //
// -------------------------------------------------------------------------- //
////////////////////////////////////////////////////////////////////////////////
//----------------------------------------------------------------------------//
// Prefaces //
//----------------------------------------------------------------------------//
#pragma once
#include "Global.h"
ROBOT_NS_BEGIN
class Point;
//----------------------------------------------------------------------------//
// Classes //
//----------------------------------------------------------------------------//
////////////////////////////////////////////////////////////////////////////////
class ROBOT_EXPORT Size
{
public:
Size (int32 value = 0);
Size (int32 w, int32 h);
public:
bool IsZero (void) const;
bool IsEmpty (void) const;
Point ToPoint (void) const;
public:
Size& operator += (const Size& size);
Size& operator -= (const Size& size);
Size operator + (const Size& size) const;
Size operator - (const Size& size) const;
bool operator == (const Size& size) const;
bool operator != (const Size& size) const;
public:
int32 W; // Width of the size
int32 H; // Height of the size
};
ROBOT_NS_END