summaryrefslogtreecommitdiff
path: root/basegfx/source/range
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/source/range')
-rw-r--r--basegfx/source/range/b2drange.cxx20
-rw-r--r--basegfx/source/range/b3drange.cxx19
2 files changed, 39 insertions, 0 deletions
diff --git a/basegfx/source/range/b2drange.cxx b/basegfx/source/range/b2drange.cxx
index 2f4a3e08e69e..331c5431bcf3 100644
--- a/basegfx/source/range/b2drange.cxx
+++ b/basegfx/source/range/b2drange.cxx
@@ -51,6 +51,19 @@ namespace basegfx
}
}
+ B2DRange& B2DRange::operator*=( const ::basegfx::B2DHomMatrix& rMat )
+ {
+ transform(rMat);
+ return *this;
+ }
+
+ const B2DRange& B2DRange::getUnitB2DRange()
+ {
+ static const B2DRange aUnitB2DRange(0.0, 0.0, 1.0, 1.0);
+
+ return aUnitB2DRange;
+ }
+
B2IRange fround(const B2DRange& rRange)
{
return rRange.isEmpty() ?
@@ -58,6 +71,13 @@ namespace basegfx
B2IRange(fround(rRange.getMinimum()),
fround(rRange.getMaximum()));
}
+
+ B2DRange operator*( const ::basegfx::B2DHomMatrix& rMat, const B2DRange& rB2DRange )
+ {
+ B2DRange aRes( rB2DRange );
+ return aRes *= rMat;
+ }
+
} // end of namespace basegfx
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/source/range/b3drange.cxx b/basegfx/source/range/b3drange.cxx
index f779f1855d79..879dbb0f9974 100644
--- a/basegfx/source/range/b3drange.cxx
+++ b/basegfx/source/range/b3drange.cxx
@@ -40,6 +40,25 @@ namespace basegfx
}
}
+ B3DRange& B3DRange::operator*=( const ::basegfx::B3DHomMatrix& rMat )
+ {
+ transform(rMat);
+ return *this;
+ }
+
+ const B3DRange& B3DRange::getUnitB3DRange()
+ {
+ static const B3DRange aUnitB3DRange(0.0, 0.0, 0.0, 1.0, 1.0, 1.0);
+
+ return aUnitB3DRange;
+ }
+
+ B3DRange operator*( const ::basegfx::B3DHomMatrix& rMat, const B3DRange& rB3DRange )
+ {
+ B3DRange aRes( rB3DRange );
+ return aRes *= rMat;
+ }
+
} // end of namespace basegfx
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */