History log of /haiku/src/kits/interface/Region.cpp
Revision Date Author Comments
# ab319eb7 29-Feb-2020 Augustin Cavalier <waddlesplash@gmail.com>

BRegion: Do not "cheaply convert" to the internal format.

_ConvertToInternal does the same thing, and should get inlined
under normal circumstances, so just use it.

No functional change (intended).

Change-Id: Ic4fc9daeb33ab33967d795065a077f282e844f6d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2297
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>


# f816ef57 29-Feb-2020 Augustin Cavalier <waddlesplash@gmail.com>

BRegion: Remove unneeded inline "documentation."

All this (and more) is in Region.dox already.

Change-Id: I94ff154cc78cda87d82941deb30f73cac39c3409
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2295
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>


# 33d60fa2 19-Jun-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

BRegion: add ScaleBy(BSize) and user documentation.


# 669ac9d6 19-Jun-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

BRegion: add ScaleBy method.

* Is there a reason to not have it?


# 1f424632 11-Jun-2014 John Scipione <jscipione@gmail.com>

Style fixes to IK, focus on docs


# daabbbe5 04-Jun-2014 John Scipione <jscipione@gmail.com>

BRegion: Style fix, update parameter name

No functional change.

Trying to indentify each kind of object uniquely and consistently.

... update docs as well.


# 44cee340 03-Jun-2014 John Scipione <jscipione@gmail.com>

BRegion: Style updates for documentation.

No functional changes intended.

* Updated copyright information.
* Reduced doxygen documentation down to a helpful summary
in a regular comment, the documentation has been moved into
the Haiku Book.
* Some parameter renaming for consistency and clarity.
* A few other style fixes.


# ac4525b2 10-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Changed BRegion to use int32 instead of long.

There is no need for fCount and fDataSize to be long, not going to have
more than 2^32 rectangles in a region. Thanks Axel for pointing that
out.


# 3a850e1a 25-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Remove empty line, thanks Axel!



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42488 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c0dad949 24-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

BRect's OffsetBy takes a BPoint. Add a similar BRegion method to be more consistent. This one takes a const reference instead a complete BPoint object.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42476 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 32a44923 14-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

* Use B_PRI* macros.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42176 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 49b582ef 01-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

Fixed a few more coding style issues, thanks Axel!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29853 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac754ba0 31-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

Patch by Brecht Machiels: Add operator==() to BRegion. Thanks a lot!
Also fixed some coding style inconsistency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29849 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3c7dd7c3 28-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Added const versions of the methods that should have been declared like
that from the start. Please review for possible binary compatibility problems!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26663 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 748347fc 26-Feb-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Check for invalid rects in BRegion::Include() and Exclude(). This fixes
weird text selection in BTextView() (for example, when an empty line was
part of the selection).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24142 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 374b5544 11-Jan-2008 Stephan Aßmus <superstippi@gmx.de>

* expose the XOR function for BRegions (for now called "ExclusiveInclude")
which already existed in the region backend ported from XOrg


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23394 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e927a5f 30-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

malloc.h ain't no standard header. Use stdlib.h instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22776 a95241bf-73f2-0310-859d-f6bbb57e9c96


# caacab37 30-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* small cleanup, added comment about out of memory condition


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22126 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae3a7f4d 17-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* don't leak the rect data in case of failed realloc()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22006 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d069bd69 22-Jul-2007 Stephan Aßmus <superstippi@gmx.de>

* small correction in error handling code path


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21684 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ed225430 19-Jul-2007 Stephan Aßmus <superstippi@gmx.de>

* just realized a bug already when reading over the commit log...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21666 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 582da173 19-Jul-2007 Stephan Aßmus <superstippi@gmx.de>

* complete reimplementation of BRegion and it's backend

I "ported" the region implementation from XOrg to work on BRegion data.

This resulted in pretty much the same code structure as before, with
RegionSupport.cpp containing the messy details. Only now it _is_ really messy
from a code beauty point of view. I didn't exactly feel like cleaning it
up right now... but I guess I will have to.

So what does this mean - our BRegion implementation was very slow (no offense!),
and on top of that it scaled very badly with more and more rects. The new
implementation seems to be on par with the very fast R5 implementation and
the data looks exactly the same too. BRegion is very performance critical
for the app_server, and I cannot wait to try this on my slow computer...

Some changes are noteworthy: The right and bottom coordinates of
BRegion internal data are now exclusive! I inherited that from the
XOrg implementation and didn't feel like changing the code, seeing it
is probably tested quite well. The conversion is handled transparently.

Secondly, constructing a BRegion with just one rect is not invoking
malloc anymore for the member data, this makes it much more efficient
to use temporary BRegions with just one rect, both externally and internally
in the BRegion implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21665 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 58917990 08-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

* this should improve the performance of operator=


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16658 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a2b387ad 06-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

prevent applying zero offsets to all rects

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15361 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0f02f20 06-Nov-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Handle out of memory conditions in the constructors more gracefully. We might end up using set_size() for every allocation (would probably make more sense)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14722 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c497670 03-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

RegionSupport accepts, as parameters, references to BRegions (consts when possible) instead of pointers. Note: this is not a functional change

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12936 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 28930a12 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

small changes and fixes here and there

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12480 a95241bf-73f2-0310-859d-f6bbb57e9c96


# edc6e254 01-Jul-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

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


# 2ef70833 10-Nov-2003 haydentech <haydentech@nowhere.fake>

Janitorial work


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5302 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4be90e7f 24-Oct-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed a possible buffer overflow in r_or() and r_sub() (thanks to Ingo Weinhold for his advices), stripped BRegion of all his friends, and moved them into a single class (BRegion::Support()). Removed "find_small_bottom()", as we didn't use it at all. Added some debugging output to BRegion::Support (that will help fixing bugs)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5131 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d1a0ee7 05-Sep-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

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


# 72f334d1 03-Aug-2003 shadow303 <shadow303@nowhere.fake>

gcc 3 fixes; strip ^M characters from TextView.cpp


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4226 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 791e557c 14-Jul-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented the last missing function, r_sub (it could be written a bit better, though). Moved the helper methods to a separate file, cleaned up a bit the implementation, changed some things in the license.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3965 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 40564fea 09-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

Added license and header


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3923 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 336449f9 09-Jul-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed (hopefully) and uglified r_or. It wasn't just ugly enough before :P.
Implemented sort_trans (now I understood what it was for). Include methods should really work now. Note that r_or uses 8Kb on the stack everytime it's called, no matter how many rectangles it has to elaborate. Can be changed, though. Some cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3919 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b98a12f0 03-Jul-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed some bugs pointed out by Marc. Thanks Marc!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3817 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b8922a58 03-Jul-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed some small bugs in (sub|or)_region_complex. Fixed a freezing bug in sort_rects. Implemented r_or. Now just r_sub is missing.
Tested Include methods and IntersectWith(). They work fine.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3815 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 319b95be 02-Jul-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented sub_region_complex and or_region_complex. They divide the plane into horizontal bands, then pass the area to r_sub or r_or, which do the real work. Tested xxx_region_complex with R5's r_or and r_sub: they work fine. Just those last functions are missing now. Documented a bit more the private C functions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3805 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e08165bb 30-Jun-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed an allocation bug in BRegion::set_size, started to comment BRegion with Doxygen (just the public methods and some friend functions for now). Added BRegion to the build.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3755 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 15cfed46 27-Jun-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed sort_rects(). Rects are sorted by their top value, not by their left as I tought in the first place. I had already fixed or_region_no_x, I just forgot to update sort_rects().
Fixed a typing bug in PrintToStream().
Added a comment.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3689 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0147056b 26-Jun-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a partial implementation of BRegion


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3669 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33d60fa21fb5df00b4309e20af8b79de506ac858 19-Jun-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

BRegion: add ScaleBy(BSize) and user documentation.


# 669ac9d6f57c4535f10c5e4eaf90cc3354d9dbc7 19-Jun-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

BRegion: add ScaleBy method.

* Is there a reason to not have it?


# 1f424632be5dcad5b81a23080eb205ab6471cd7b 11-Jun-2014 John Scipione <jscipione@gmail.com>

Style fixes to IK, focus on docs


# daabbbe5f95dbaa5f0c137c67dcce643ff202e32 04-Jun-2014 John Scipione <jscipione@gmail.com>

BRegion: Style fix, update parameter name

No functional change.

Trying to indentify each kind of object uniquely and consistently.

... update docs as well.


# 44cee34013ec8dc148c06f7da30a131b3a542b6e 03-Jun-2014 John Scipione <jscipione@gmail.com>

BRegion: Style updates for documentation.

No functional changes intended.

* Updated copyright information.
* Reduced doxygen documentation down to a helpful summary
in a regular comment, the documentation has been moved into
the Haiku Book.
* Some parameter renaming for consistency and clarity.
* A few other style fixes.


# ac4525b2a5a2f3fa3805efaf0c61f88fe1ff1e30 10-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Changed BRegion to use int32 instead of long.

There is no need for fCount and fDataSize to be long, not going to have
more than 2^32 rectangles in a region. Thanks Axel for pointing that
out.


# 3a850e1a1ad7b6a19365368c9600f0946f03d8b9 25-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Remove empty line, thanks Axel!



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42488 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c0dad949eef84a7f64a1d8f8b404c8c81b7e4dce 24-Jul-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

BRect's OffsetBy takes a BPoint. Add a similar BRegion method to be more consistent. This one takes a const reference instead a complete BPoint object.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42476 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 32a44923a62c2096ba6d654737a4dadf19e100cd 14-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

* Use B_PRI* macros.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42176 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 49b582efd69d8802bbffe1fc50e3f601c4f1faa1 01-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

Fixed a few more coding style issues, thanks Axel!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29853 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac754ba0a2a1e5557094a14305e8a41826bafea7 31-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

Patch by Brecht Machiels: Add operator==() to BRegion. Thanks a lot!
Also fixed some coding style inconsistency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29849 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3c7dd7c3464c0575f7c0616556967d9acb3ebb2f 28-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Added const versions of the methods that should have been declared like
that from the start. Please review for possible binary compatibility problems!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26663 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 748347fc200a9e1c901049c9f15d835fc3f675e4 26-Feb-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Check for invalid rects in BRegion::Include() and Exclude(). This fixes
weird text selection in BTextView() (for example, when an empty line was
part of the selection).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24142 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 374b5544a99303dbcb9aba3c9a70c597107bab43 11-Jan-2008 Stephan Aßmus <superstippi@gmx.de>

* expose the XOR function for BRegions (for now called "ExclusiveInclude")
which already existed in the region backend ported from XOrg


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23394 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e927a5fc080cb934e7584454f472cacf4c3e361 30-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

malloc.h ain't no standard header. Use stdlib.h instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22776 a95241bf-73f2-0310-859d-f6bbb57e9c96


# caacab3726223f7515664dbed6073d94db00a12c 30-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* small cleanup, added comment about out of memory condition


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22126 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae3a7f4dacf2a8db5ec3ba87b5ff342a348af310 17-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* don't leak the rect data in case of failed realloc()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22006 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d069bd6917841a2a90647e9ffbc9d93ca12e4a35 22-Jul-2007 Stephan Aßmus <superstippi@gmx.de>

* small correction in error handling code path


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21684 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ed2254308be290138c1cda130b7c390be17bbb66 19-Jul-2007 Stephan Aßmus <superstippi@gmx.de>

* just realized a bug already when reading over the commit log...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21666 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 582da17386c4a192ca30270d6b0b95f561cf5843 19-Jul-2007 Stephan Aßmus <superstippi@gmx.de>

* complete reimplementation of BRegion and it's backend

I "ported" the region implementation from XOrg to work on BRegion data.

This resulted in pretty much the same code structure as before, with
RegionSupport.cpp containing the messy details. Only now it _is_ really messy
from a code beauty point of view. I didn't exactly feel like cleaning it
up right now... but I guess I will have to.

So what does this mean - our BRegion implementation was very slow (no offense!),
and on top of that it scaled very badly with more and more rects. The new
implementation seems to be on par with the very fast R5 implementation and
the data looks exactly the same too. BRegion is very performance critical
for the app_server, and I cannot wait to try this on my slow computer...

Some changes are noteworthy: The right and bottom coordinates of
BRegion internal data are now exclusive! I inherited that from the
XOrg implementation and didn't feel like changing the code, seeing it
is probably tested quite well. The conversion is handled transparently.

Secondly, constructing a BRegion with just one rect is not invoking
malloc anymore for the member data, this makes it much more efficient
to use temporary BRegions with just one rect, both externally and internally
in the BRegion implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21665 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5891799085e1349c2e4caf95608d3bc3b4b9d05a 08-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

* this should improve the performance of operator=


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16658 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a2b387ad6ec4ef091e8b7f6ec59d9212d17f6954 06-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

prevent applying zero offsets to all rects

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15361 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0f02f2065e649bdd75d6117bfa9db9449d6efdf 06-Nov-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Handle out of memory conditions in the constructors more gracefully. We might end up using set_size() for every allocation (would probably make more sense)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14722 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c49767038471650bd35381b458040abe5a7f98f 03-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

RegionSupport accepts, as parameters, references to BRegions (consts when possible) instead of pointers. Note: this is not a functional change

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12936 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 28930a1240a314a0d984c70368ec83aa5d329272 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

small changes and fixes here and there

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12480 a95241bf-73f2-0310-859d-f6bbb57e9c96


# edc6e254f31e94ba0da5a7adb534bc0ad411c035 01-Jul-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

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


# 2ef708336429e782ae56a01eb2770b1716728b3f 10-Nov-2003 haydentech <haydentech@nowhere.fake>

Janitorial work


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5302 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4be90e7fc18272a0431df7e816468040a25f45db 24-Oct-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed a possible buffer overflow in r_or() and r_sub() (thanks to Ingo Weinhold for his advices), stripped BRegion of all his friends, and moved them into a single class (BRegion::Support()). Removed "find_small_bottom()", as we didn't use it at all. Added some debugging output to BRegion::Support (that will help fixing bugs)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5131 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d1a0ee7c18f67802ce89bb126da167ef6f46636 05-Sep-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

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


# 72f334d12f75edfe0ad825ccc04953b882170591 03-Aug-2003 shadow303 <shadow303@nowhere.fake>

gcc 3 fixes; strip ^M characters from TextView.cpp


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4226 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 791e557c1b43264c2e738cef36725461b98c6366 14-Jul-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented the last missing function, r_sub (it could be written a bit better, though). Moved the helper methods to a separate file, cleaned up a bit the implementation, changed some things in the license.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3965 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 40564fead11bc909d729fd4afb7ccc1764778381 09-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

Added license and header


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3923 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 336449f9211d46ca648e13dde42c0914f4065954 09-Jul-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed (hopefully) and uglified r_or. It wasn't just ugly enough before :P.
Implemented sort_trans (now I understood what it was for). Include methods should really work now. Note that r_or uses 8Kb on the stack everytime it's called, no matter how many rectangles it has to elaborate. Can be changed, though. Some cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3919 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b98a12f02295261ea195a3dbe4e11acbfe6b9faf 03-Jul-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed some bugs pointed out by Marc. Thanks Marc!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3817 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b8922a588bd9c4aea7e8181b929490e49b4788a9 03-Jul-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed some small bugs in (sub|or)_region_complex. Fixed a freezing bug in sort_rects. Implemented r_or. Now just r_sub is missing.
Tested Include methods and IntersectWith(). They work fine.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3815 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 319b95be85555300a91a990eb8d3631b316420de 02-Jul-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented sub_region_complex and or_region_complex. They divide the plane into horizontal bands, then pass the area to r_sub or r_or, which do the real work. Tested xxx_region_complex with R5's r_or and r_sub: they work fine. Just those last functions are missing now. Documented a bit more the private C functions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3805 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e08165bb6f27011bd45bdf26472b2fbdfc52b7f8 30-Jun-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed an allocation bug in BRegion::set_size, started to comment BRegion with Doxygen (just the public methods and some friend functions for now). Added BRegion to the build.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3755 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 15cfed465c6d1d94dd8bc9346af70adcc00707a2 27-Jun-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed sort_rects(). Rects are sorted by their top value, not by their left as I tought in the first place. I had already fixed or_region_no_x, I just forgot to update sort_rects().
Fixed a typing bug in PrintToStream().
Added a comment.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3689 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0147056b8150d18ca0251e11b79de19891068633 26-Jun-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a partial implementation of BRegion


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3669 a95241bf-73f2-0310-859d-f6bbb57e9c96