diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-11-26 17:40:31 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-11-26 17:40:31 +0000 |
commit | 5340541d1ba93d519f13d1378cba9c4286697178 (patch) | |
tree | ea0dfdb3fea3c77fa96533bbd7523083ba4dbf28 /basegfx | |
parent | b48865cf30d85392bf88f88df70b914afab7b690 (diff) |
INTEGRATION: CWS presentationengine01 (1.4.2); FILE MERGED
2004/11/20 00:00:23 thb 1.4.2.2: #110496# After-merge cleanups, finished BxD<->BxI conversions for range and tuples
2004/11/17 20:20:09 thb 1.4.2.1: #110496# Unified integer constructors/fround converters
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/range/b2drange.cxx | 17 | ||||
-rw-r--r-- | basegfx/source/range/b3drange.cxx | 29 |
2 files changed, 31 insertions, 15 deletions
diff --git a/basegfx/source/range/b2drange.cxx b/basegfx/source/range/b2drange.cxx index 8a0ff5fbde1a..021b2e3af228 100644 --- a/basegfx/source/range/b2drange.cxx +++ b/basegfx/source/range/b2drange.cxx @@ -2,9 +2,9 @@ * * $RCSfile: b2drange.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: pjunck $ $Date: 2004-11-03 08:39:03 $ + * last change: $Author: rt $ $Date: 2004-11-26 18:40:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -73,12 +73,19 @@ namespace basegfx { + B2DRange::B2DRange( const B2IRange& rRange ) : + maRangeX(rRange.getMinX()), + maRangeY(rRange.getMinY()) + { + maRangeX.expand(rRange.getMaxX()); + maRangeY.expand(rRange.getMaxY()); + } + B2IRange fround(const B2DRange& rRange) { - return B2IRange( - fround(rRange.getMinX()), fround(rRange.getMinY()), - fround(rRange.getMaxX()), fround(rRange.getMaxY())); + return B2IRange(fround(rRange.getMinimum()), fround(rRange.getMaximum())); } + } // end of namespace basegfx // eof diff --git a/basegfx/source/range/b3drange.cxx b/basegfx/source/range/b3drange.cxx index edad0bbe0505..feb38a44783e 100644 --- a/basegfx/source/range/b3drange.cxx +++ b/basegfx/source/range/b3drange.cxx @@ -2,9 +2,9 @@ * * $RCSfile: b3drange.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: pjunck $ $Date: 2004-11-03 08:39:15 $ + * last change: $Author: rt $ $Date: 2004-11-26 18:40:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -73,17 +73,26 @@ namespace basegfx { - /** Round double to nearest integer for 3D range + B3DRange::B3DRange(const B3IRange& rRange) : + maRangeX( rRange.getMinX() ), + maRangeY( rRange.getMinY() ), + maRangeZ( rRange.getMinZ() ) + { + maRangeX.expand( rRange.getMaxX() ); + maRangeY.expand( rRange.getMaxY() ); + maRangeZ.expand( rRange.getMaxZ() ); + } - @return the nearest integer for this range - */ - B3IRange fround(const B3DRange& rRange) + 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())); + return B3IRange(fround(rRange.getMinX()), + fround(rRange.getMinY()), + fround(rRange.getMinZ()), + fround(rRange.getMaxX()), + fround(rRange.getMaxY()), + fround(rRange.getMaxZ())); } + } // end of namespace basegfx // eof |