41 Commits

Author SHA1 Message Date
Dmitry Marakasov
fa3cb7bcd9 Add std::hash support for Point and Rect 2015-11-26 13:42:16 +03:00
Dmitry Marakasov
a63cdde38f Move Rect and Point comparison operators out of classes 2015-11-26 13:14:17 +03:00
Dmitry Marakasov
95142b065c Add Point and Rect less-than operator
This allows using them as map and set keys
2015-11-26 12:57:36 +03:00
Dmitry Marakasov
63cd8feebc Move most other Point methods to the header to allow inlining 2015-07-07 15:41:53 +03:00
Dmitry Marakasov
5a55e91987 Constexprify Point arith ops 2015-07-07 15:41:45 +03:00
Dmitry Marakasov
d11345b6df Initial Point constexpr support: constructors and comparison operators 2015-07-07 05:17:09 +03:00
Dmitry Marakasov
51120adc62 Fix documentation 2015-07-03 22:26:57 +03:00
Dmitry Marakasov
495f873736 Add div/mul/remainder operators with another Point as an argument 2015-07-03 22:22:48 +03:00
Dmitry Marakasov
47f0263ca3 Add unary minus operator for Point 2015-07-03 22:21:02 +03:00
Dmitry Marakasov
1001bf8fa2 Add memberwise remainter operators for Point 2015-07-03 22:00:59 +03:00
Dmitry Marakasov
0215d2526e Fix typo 2015-07-03 21:52:53 +03:00
Dmitry Marakasov
fdcbcddc1d Implement stream output operators for Point and Rect 2015-01-20 02:56:34 +03:00
Dmitry Marakasov
fa7ba94957 Implement Point::Wrap 2015-01-20 02:38:16 +03:00
Dmitry Marakasov
9d90792378 Implement Point::Clamp(Rect) 2015-01-19 01:05:05 +03:00
Dmitry Marakasov
40e8f71efa Make setters return reference to self: Point and Rect 2015-01-19 00:47:25 +03:00
Dmitry Marakasov
0f1dd26ebd Add in/out specifiers to param documentation 2015-01-12 21:43:28 +03:00
Dmitry Marakasov
feaec6838b Remove deprecated functions 2015-01-11 06:39:50 +03:00
Dmitry Marakasov
7a1f6d8f0d Fix typos 2015-01-10 22:11:50 +03:00
Dmitry Marakasov
f4823de989 Add Point memberwise division/multiplication 2014-12-29 21:54:14 +03:00
Dmitry Marakasov
a1d01e89d4 Add Point/Rect constructors taking SDL_Point/SDL_Rect 2014-12-27 21:21:29 +03:00
Dmitry Marakasov
78e985719e Add references to SDL docs and exception info 2014-12-26 22:36:29 +03:00
Dmitry Marakasov
7d11af7005 Fix case of param/returns descriptions 2014-12-26 21:41:18 +03:00
Dmitry Marakasov
d6c070633c Document Point and Rect 2014-12-26 20:33:22 +03:00
Dmitry Marakasov
dda468ae62 Mark deprecated functions as such 2014-12-25 22:34:16 +03:00
Dmitry Marakasov
6d0213810b Switch to Optional
Remove "valid" flag from Rect and Point, derive them directly from
SDL_Rect and SDL_Point structures, simplify logic. Now x/y/w/h member
variables are directly accessible and Rect/Point may be passed as
SDL_Rect/SDL_Point via pointer or reference.

Change all cases where Null Rects and Points were used to Optional.

invalid state related functions like Null(), IsNull() and Get() are
now deprecated but are not removed yet for compatibility sake.
2014-12-25 19:10:41 +03:00
Dmitry Marakasov
46591a9cbf Update project comment 2014-12-18 02:52:08 +03:00
Dmitry Marakasov
0124e2703a Update copyright years 2014-12-18 02:51:49 +03:00
Dmitry Marakasov
6ed9b7a578 Remove unneeded argument names 2014-02-22 00:39:50 +04:00
Dmitry Marakasov
8e6bf5fc2f Add basic Point arith 2014-02-21 20:09:11 +04:00
Dmitry Marakasov
7b4b6c051a Don't use allocations inside Point and Rect
Instead, use boolean validity flag, which is much more practical
2014-02-21 17:11:48 +04:00
Dmitry Marakasov
1e4e1cb560 Define default ctors/assignments in source files to avoid using objects of incomplete type in them 2014-02-11 05:51:13 +04:00
Dmitry Marakasov
0365329dc0 Add Point and Rect comparison operators 2014-02-11 05:44:08 +04:00
Dmitry Marakasov
802322ef1b Add Point and Rect setters
While here, fix Rect::GetX2 and Rect::GetY2 off-by-one errors
2014-02-11 04:33:24 +04:00
Dmitry Marakasov
14819ba188 Remove Swap() methods as there's std::swap for this 2014-02-11 04:19:51 +04:00
Dmitry Marakasov
2c16af7f12 Sort out SDL_point forward declaration 2013-12-18 16:27:34 +04:00
Dmitry Marakasov
151f9704ac Merge branch 'master' of github.com:AMDmi3/libSDL2pp 2013-12-18 06:22:47 +04:00
Dmitry Marakasov
92925a9620 Add a way to swap some types of objects 2013-12-18 06:15:46 +04:00
Carl Schwope
1c1f37b76e make destructors virtual 2013-11-14 15:53:51 -05:00
Dmitry Marakasov
76124eb4a5 Explicitely declare default move ctors and assignments 2013-09-20 23:34:20 +04:00
Dmitry Marakasov
aa615060e4 Add getters and checks for nullness 2013-09-18 03:04:47 +04:00
Dmitry Marakasov
c122f11643 Initial import 2013-09-06 01:47:05 +04:00