summaryrefslogtreecommitdiff
path: root/basegfx/inc/basegfx/range/basicrange.hxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-11-26 17:35:53 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-11-26 17:35:53 +0000
commitfe0e0b307f25a88ef9889bc936d49b6a07bd2031 (patch)
treebfb460f152bda365295325407d7725ace4569b4e /basegfx/inc/basegfx/range/basicrange.hxx
parentfa693602868a0e405f1827f1fdb240c22b0fff7d (diff)
INTEGRATION: CWS presentationengine01 (1.6.2); FILE MERGED
2004/11/17 18:54:10 thb 1.6.2.2: RESYNC: (1.6-1.7); FILE MERGED 2004/09/23 20:19:07 thb 1.6.2.1: #110496# Added intersect method to all range types
Diffstat (limited to 'basegfx/inc/basegfx/range/basicrange.hxx')
-rw-r--r--basegfx/inc/basegfx/range/basicrange.hxx24
1 files changed, 22 insertions, 2 deletions
diff --git a/basegfx/inc/basegfx/range/basicrange.hxx b/basegfx/inc/basegfx/range/basicrange.hxx
index 025b47176558..c3e47f9efbc7 100644
--- a/basegfx/inc/basegfx/range/basicrange.hxx
+++ b/basegfx/inc/basegfx/range/basicrange.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: basicrange.hxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: pjunck $ $Date: 2004-11-03 08:36:11 $
+ * last change: $Author: rt $ $Date: 2004-11-26 18:35:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -174,6 +174,26 @@ namespace basegfx
}
}
+ void intersect(const BasicRange& rRange)
+ {
+ if( !overlaps( rRange ) )
+ {
+ reset();
+ }
+ else
+ {
+ if(rRange.mnMinimum > mnMinimum)
+ {
+ mnMinimum = rRange.mnMinimum;
+ }
+
+ if(rRange.mnMaximum < mnMaximum)
+ {
+ mnMaximum = rRange.mnMaximum;
+ }
+ }
+ }
+
void grow(T nValue)
{
bool bLessThanZero(nValue < 0);