diff options
Diffstat (limited to 'basegfx/inc/basegfx/range/b2ibox.hxx')
-rw-r--r-- | basegfx/inc/basegfx/range/b2ibox.hxx | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/basegfx/inc/basegfx/range/b2ibox.hxx b/basegfx/inc/basegfx/range/b2ibox.hxx index 1e2c790dc51d..38e664d4faeb 100644 --- a/basegfx/inc/basegfx/range/b2ibox.hxx +++ b/basegfx/inc/basegfx/range/b2ibox.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -41,20 +41,20 @@ namespace basegfx { class B2IBox { - public: - typedef sal_Int32 ValueType; - typedef Int32Traits TraitsType; + public: + typedef sal_Int32 ValueType; + typedef Int32Traits TraitsType; - B2IBox() + B2IBox() { } - + explicit B2IBox(const B2ITuple& rTuple) - : maRangeX(rTuple.getX()), + : maRangeX(rTuple.getX()), maRangeY(rTuple.getY()) { } - + B2IBox(sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, @@ -65,7 +65,7 @@ namespace basegfx maRangeX.expand(x2); maRangeY.expand(y2); } - + B2IBox(const B2ITuple& rTuple1, const B2ITuple& rTuple2) : maRangeX(rTuple1.getX()), @@ -73,40 +73,40 @@ namespace basegfx { expand( rTuple2 ); } - + B2IBox(const B2IBox& rBox) : maRangeX(rBox.maRangeX), maRangeY(rBox.maRangeY) { } - bool isEmpty() const + bool isEmpty() const { return maRangeX.isEmpty() || maRangeY.isEmpty(); } - void reset() - { - maRangeX.reset(); - maRangeY.reset(); + void reset() + { + maRangeX.reset(); + maRangeY.reset(); } - bool operator==( const B2IBox& rBox ) const - { - return (maRangeX == rBox.maRangeX - && maRangeY == rBox.maRangeY); + bool operator==( const B2IBox& rBox ) const + { + return (maRangeX == rBox.maRangeX + && maRangeY == rBox.maRangeY); } - bool operator!=( const B2IBox& rBox ) const - { - return (maRangeX != rBox.maRangeX - || maRangeY != rBox.maRangeY); + bool operator!=( const B2IBox& rBox ) const + { + return (maRangeX != rBox.maRangeX + || maRangeY != rBox.maRangeY); } - void operator=(const B2IBox& rBox) - { - maRangeX = rBox.maRangeX; - maRangeY = rBox.maRangeY; + void operator=(const B2IBox& rBox) + { + maRangeX = rBox.maRangeX; + maRangeY = rBox.maRangeY; } sal_Int32 getMinX() const @@ -146,7 +146,7 @@ namespace basegfx maRangeY.getMinimum() ); } - + B2IPoint getMaximum() const { return B2IPoint( @@ -162,7 +162,7 @@ namespace basegfx maRangeY.getRange() ); } - + B2DPoint getCenter() const { return B2DPoint( @@ -170,11 +170,11 @@ namespace basegfx maRangeY.getCenter() ); } - + bool isInside(const B2ITuple& rTuple) const { return ( - maRangeX.isInside(rTuple.getX()) + maRangeX.isInside(rTuple.getX()) && maRangeY.isInside(rTuple.getY()) ); } @@ -182,7 +182,7 @@ namespace basegfx bool isInside(const B2IBox& rBox) const { return ( - maRangeX.isInside(rBox.maRangeX) + maRangeX.isInside(rBox.maRangeX) && maRangeY.isInside(rBox.maRangeY) ); } @@ -190,7 +190,7 @@ namespace basegfx bool overlaps(const B2IBox& rBox) const { return ( - maRangeX.overlaps(rBox.maRangeX) + maRangeX.overlaps(rBox.maRangeX) && maRangeY.overlaps(rBox.maRangeY) ); } @@ -203,25 +203,25 @@ namespace basegfx void expand(const B2IBox& rBox) { - maRangeX.expand(rBox.maRangeX); - maRangeY.expand(rBox.maRangeY); + maRangeX.expand(rBox.maRangeX); + maRangeY.expand(rBox.maRangeY); } void intersect(const B2IBox& rBox) { - maRangeX.intersect(rBox.maRangeX); - maRangeY.intersect(rBox.maRangeY); + maRangeX.intersect(rBox.maRangeX); + maRangeY.intersect(rBox.maRangeY); } void grow(sal_Int32 nValue) { - maRangeX.grow(nValue); - maRangeY.grow(nValue); + maRangeX.grow(nValue); + maRangeY.grow(nValue); } private: - BasicBox maRangeX; - BasicBox maRangeY; + BasicBox maRangeX; + BasicBox maRangeY; }; /** Compute the set difference of the two given boxes @@ -243,9 +243,9 @@ namespace basegfx @return the input vector */ - ::std::vector< B2IBox >& computeSetDifference( ::std::vector< B2IBox >& o_rResult, - const B2IBox& rFirst, - const B2IBox& rSecond ); + ::std::vector< B2IBox >& computeSetDifference( ::std::vector< B2IBox >& o_rResult, + const B2IBox& rFirst, + const B2IBox& rSecond ); } // end of namespace basegfx |