[interfacekit] more clipping rects functions
- From: burton666 <burton666@xxxxxxxxx>
- To: interfacekit <interfacekit@xxxxxxxxxxxxx>
- Date: Tue, 22 Jul 2003 16:58:00 +0200
Hi all.
I just wanted you to know that I just committed some more methods for
clipping_rect handling.
You can find them in current/headers/private/interface/clipping.h, so that
clipping rects can be used almost everywhere in place of BRects (some
functions, like OffsetTo/By are still missing, but I'm waiting for your
comments before implementing the whole range).
Why did I do that, will you ask... well, clipping_rects are used extensively in
the game kit, so these methods will probably be useful when someone will work
on the game kit classes. Moreover, I really think that we should change our app
server to use clipping_rects instead of BRects. Ok, I'm not expecting that DW
"wastes" his time to change the whole code right away, but in my opinion it's a
thing that should really be done.
Why?
Well, the app server uses BRegion extensively, right? When BRegion's methods
which accept BRects are called, the class converts the BRect(floating
coordinates) to a clipping_rect (integer only coordinates). This operation is
somewhat heavy, since is done many times.
Another reason is that we don't need at all decimal coordinates in our app
server, and that makes the whole thing slower.
comments?
Other related posts:
- » [interfacekit] more clipping rects functions