12 Commits

Author SHA1 Message Date
Dmitry Marakasov
7506b05a77 Implement Rect::Contains(Rect), add corresponding test 2014-12-29 22:04:43 +03:00
Dmitry Marakasov
518f9fff35 Add test for multiplication/division 2014-12-29 22:00:49 +03:00
Dmitry Marakasov
e18f54d302 Add test for Point/Rect construction and comparison from/with corresponding SDL objects 2014-12-29 21:58:38 +03:00
Dmitry Marakasov
65b5446fd1 Axe out remaining uses of old Point/Rect API 2014-12-25 19:30:37 +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
f8c6b2a9fb Add operators to offset a Rect by a Point 2014-12-20 18:04:28 +03:00
Dmitry Marakasov
359a0e93c8 Implement Rect::Contains(Point) 2014-11-24 01:52:49 +03:00
Dmitry Marakasov
1ec8df2964 More Get() tests 2014-02-21 23:54:22 +04:00
Dmitry Marakasov
5a61a8f51b Fix Get() for null Points and Rects, add tests for it 2014-02-21 23:46:37 +04:00
Dmitry Marakasov
8e6bf5fc2f Add basic Point arith 2014-02-21 20:09:11 +04:00
Dmitry Marakasov
f6d6572602 Fix Rect::FromCenter and add test for it 2014-02-11 06:01:36 +04:00
Dmitry Marakasov
07bf0aa3d5 Add Point and Rect tests 2014-02-11 05:51:15 +04:00