Commit Graph

15 Commits

Author SHA1 Message Date
Augustin Cavalier 171057c06a clipping.h: Rewrite copyright header to use the "new" style.
Also trim trailing spaces.

Change-Id: I598dfa2c69f584eaa004211339c73a26dd93af93
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2296
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-01 18:20:56 +00:00
Adrien Destugues 9576c4b742 BRegion scaling: fix semantics to avoid holes/overlaps
Thanks to Stippi for pointing this out.
2014-06-19 19:23:29 +02:00
Adrien Destugues 669ac9d6f5 BRegion: add ScaleBy method.
* Is there a reason to not have it?
2014-06-19 18:05:14 +02:00
Stephan Aßmus af3ac4e80f replaced usage of floor() and ceil() to convert from
BRect to clipping_rect with simple C casts. I think this
is more adequate, since clipping_rects are used for
pixel indices. This change fixes some graphics problems too,
it appears that cursor coords are fractional on Haiku, even
with a normal mouse. In Playground, this resulted in the
hit points being rendered wrongly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-19 22:26:17 +00:00
Stefano Ceccherini a410e190a4 Added rect_contains()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-03 14:12:10 +00:00
Stefano Ceccherini e13bd0e1a8 Reverted to the original comment, as I had worked on an older version of this file.
Took the chance to add the license header.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 07:36:57 +00:00
Stefano Ceccherini 0cc992995e Changed some parameters to be passed through const reference [A change suggested by Christian Packmann]. This gives a nice speed boost.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-24 06:31:36 +00:00
Stefano Ceccherini 61c93e14bc Researched and removed a TODO item
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-09 07:13:03 +00:00
Stefano Ceccherini edc6e254f3 Fixed the outstanding BRegion bug. It turned out that rects_intersect() returned true in some cases when called with an invalid clipping_rect. Added an ASSERT() call to BRegion::_AddRect(), which would've saved my day.
Added some comments


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-01 06:16:00 +00:00
Stefano Ceccherini d8a7172a91 simplified rects_intersect(). Now it's very similar to BRect::Intersects()
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-24 10:50:41 +00:00
Stefano Ceccherini 8d1a0ee7c1 Fixed a bug in BRegion copy constructor. If one constructed a BRegion with
BRegion region(region), the region would have been put into an unitialized state. Took the chance to cleanup a bit the code, using some methods of clipping.h. Changed the way offset_rect works, and changed its name too. Added a note to Region.cpp


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-05 10:16:34 +00:00
Stefano Ceccherini e6404469ad added offsect_rect, fixed a spelling error
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4362 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-22 09:12:56 +00:00
Stefano Ceccherini 2a0863af09 Some more clipping_rects methods, based on BRects methods. Currently unused, but could be used in the Game Kit and, why not, also in the app server itself.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-22 12:49:49 +00:00
Stefano Ceccherini d4400ac125 A line can be too a valid rect.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-03 06:29:06 +00:00
Stefano Ceccherini 0147056b81 Added a partial implementation of BRegion
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-26 10:09:01 +00:00