[haiku-commits] r42476 - in haiku/trunk: headers/os/interface src/kits/interface

  • From: clemens.zeidler@xxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 25 Jul 2011 01:53:13 +0200 (CEST)

Author: czeidler
Date: 2011-07-25 01:53:12 +0200 (Mon, 25 Jul 2011)
New Revision: 42476
Changeset: https://dev.haiku-os.org/changeset/42476

Modified:
   haiku/trunk/headers/os/interface/Region.h
   haiku/trunk/src/kits/interface/Region.cpp
Log:
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.
  


Modified: haiku/trunk/headers/os/interface/Region.h
===================================================================
--- haiku/trunk/headers/os/interface/Region.h   2011-07-24 23:49:30 UTC (rev 
42475)
+++ haiku/trunk/headers/os/interface/Region.h   2011-07-24 23:53:12 UTC (rev 
42476)
@@ -56,6 +56,7 @@
 
                        void                            PrintToStream() const;
 
+                       void                            OffsetBy(const BPoint& 
point);
                        void                            OffsetBy(int32 x, int32 
y);
 
                        void                            MakeEmpty();

Modified: haiku/trunk/src/kits/interface/Region.cpp
===================================================================
--- haiku/trunk/src/kits/interface/Region.cpp   2011-07-24 23:49:30 UTC (rev 
42475)
+++ haiku/trunk/src/kits/interface/Region.cpp   2011-07-24 23:53:12 UTC (rev 
42476)
@@ -342,6 +342,14 @@
 // #pragma mark -
 
 
+
+void
+BRegion::OffsetBy(const BPoint& point)
+{
+       OffsetBy(point.x, point.y);
+}
+
+
 /*!    \brief Offsets all region's rects, and bounds by the given values.
        \param dh The horizontal offset.
        \param dv The vertical offset.


Other related posts: