summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basegfx/source/range/b2drange.cxx18
-rw-r--r--basegfx/source/range/b3drange.cxx23
2 files changed, 37 insertions, 4 deletions
diff --git a/basegfx/source/range/b2drange.cxx b/basegfx/source/range/b2drange.cxx
index a5c6122c460e..8a0ff5fbde1a 100644
--- a/basegfx/source/range/b2drange.cxx
+++ b/basegfx/source/range/b2drange.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2drange.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:11 $
+ * last change: $Author: pjunck $ $Date: 2004-11-03 08:39:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,8 +63,22 @@
#include <basegfx/range/b2drange.hxx>
#endif
+#ifndef _BGFX_RANGE_B2IRANGE_HXX
+#include <basegfx/range/b2irange.hxx>
+#endif
+
+#ifndef _BGFX_NUMERIC_FTOOLS_HXX
+#include <basegfx/numeric/ftools.hxx>
+#endif
+
namespace basegfx
{
+ B2IRange fround(const B2DRange& rRange)
+ {
+ return B2IRange(
+ fround(rRange.getMinX()), fround(rRange.getMinY()),
+ fround(rRange.getMaxX()), fround(rRange.getMaxY()));
+ }
} // end of namespace basegfx
// eof
diff --git a/basegfx/source/range/b3drange.cxx b/basegfx/source/range/b3drange.cxx
index 714efb85a562..edad0bbe0505 100644
--- a/basegfx/source/range/b3drange.cxx
+++ b/basegfx/source/range/b3drange.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b3drange.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: aw $ $Date: 2003-11-28 11:18:11 $
+ * last change: $Author: pjunck $ $Date: 2004-11-03 08:39:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,8 +63,27 @@
#include <basegfx/range/b3drange.hxx>
#endif
+#ifndef _BGFX_RANGE_B3IRANGE_HXX
+#include <basegfx/range/b3irange.hxx>
+#endif
+
+#ifndef _BGFX_NUMERIC_FTOOLS_HXX
+#include <basegfx/numeric/ftools.hxx>
+#endif
+
namespace basegfx
{
+ /** Round double to nearest integer for 3D range
+
+ @return the nearest integer for this range
+ */
+ B3IRange fround(const B3DRange& rRange)
+ {
+ return B3IRange(
+ fround(rRange.getMinX()), fround(rRange.getMinX()),
+ fround(rRange.getMinY()), fround(rRange.getMinY()),
+ fround(rRange.getMinZ()), fround(rRange.getMinZ()));
+ }
} // end of namespace basegfx
// eof