summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-03-03 14:16:02 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-03-03 14:16:02 +0100
commitea3e3cdae879ea62f371874cf4ce1cde020ce969 (patch)
tree54e226f279f147d07081f0978876f9ab6f06fdbc /tools
parentaccdb573f76a7cb599f2941fb45ba3f16090b757 (diff)
slidecopy: +Rectangle::Transpose
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/gen.hxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/inc/tools/gen.hxx b/tools/inc/tools/gen.hxx
index 0d82f4d73160..2ab762ef82da 100644
--- a/tools/inc/tools/gen.hxx
+++ b/tools/inc/tools/gen.hxx
@@ -423,6 +423,7 @@ public:
Point Center() const;
void Move( long nHorzMove, long nVertMove );
+ inline void Transpose();
inline void SetPos( const Point& rPoint );
void SetSize( const Size& rSize );
inline Size GetSize() const;
@@ -581,6 +582,20 @@ inline void Rectangle::Move( long nHorzMove, long nVertMove )
nBottom += nVertMove;
}
+void Rectangle::Transpose()
+{
+ if ( !IsEmpty() )
+ {
+ long swap( nLeft );
+ nLeft = nTop;
+ nTop = swap;
+
+ swap = nRight;
+ nRight = nBottom;
+ nBottom = swap;
+ }
+}
+
inline void Rectangle::SetPos( const Point& rPoint )
{
if ( nRight != RECT_EMPTY )