summaryrefslogtreecommitdiff
path: root/basegfx/inc/basegfx/range/b3ibox.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/inc/basegfx/range/b3ibox.hxx')
-rw-r--r--basegfx/inc/basegfx/range/b3ibox.hxx86
1 files changed, 43 insertions, 43 deletions
diff --git a/basegfx/inc/basegfx/range/b3ibox.hxx b/basegfx/inc/basegfx/range/b3ibox.hxx
index 7c349becd43c..a219ef41181b 100644
--- a/basegfx/inc/basegfx/range/b3ibox.hxx
+++ b/basegfx/inc/basegfx/range/b3ibox.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
@@ -39,22 +39,22 @@ namespace basegfx
{
class B3IBox
{
- BasicBox maRangeX;
- BasicBox maRangeY;
- BasicBox maRangeZ;
+ BasicBox maRangeX;
+ BasicBox maRangeY;
+ BasicBox maRangeZ;
- public:
- B3IBox()
+ public:
+ B3IBox()
{
}
-
+
explicit B3IBox(const B3ITuple& rTuple) :
maRangeX(rTuple.getX()),
maRangeY(rTuple.getY()),
maRangeZ(rTuple.getZ())
{
}
-
+
B3IBox(sal_Int32 x1,
sal_Int32 y1,
sal_Int32 z1,
@@ -86,37 +86,37 @@ namespace basegfx
{
}
- bool isEmpty() const
+ bool isEmpty() const
{
return maRangeX.isEmpty() || maRangeY.isEmpty() || maRangeZ.isEmpty();
}
- void reset()
- {
- maRangeX.reset();
- maRangeY.reset();
- maRangeZ.reset();
+ void reset()
+ {
+ maRangeX.reset();
+ maRangeY.reset();
+ maRangeZ.reset();
}
-
- bool operator==( const B3IBox& rBox ) const
- {
- return (maRangeX == rBox.maRangeX
+
+ bool operator==( const B3IBox& rBox ) const
+ {
+ return (maRangeX == rBox.maRangeX
&& maRangeY == rBox.maRangeY
- && maRangeZ == rBox.maRangeZ);
+ && maRangeZ == rBox.maRangeZ);
}
- bool operator!=( const B3IBox& rBox ) const
- {
- return (maRangeX != rBox.maRangeX
+ bool operator!=( const B3IBox& rBox ) const
+ {
+ return (maRangeX != rBox.maRangeX
|| maRangeY != rBox.maRangeY
- || maRangeZ != rBox.maRangeZ);
+ || maRangeZ != rBox.maRangeZ);
}
- void operator=(const B3IBox& rBox)
- {
- maRangeX = rBox.maRangeX;
- maRangeY = rBox.maRangeY;
- maRangeZ = rBox.maRangeZ;
+ void operator=(const B3IBox& rBox)
+ {
+ maRangeX = rBox.maRangeX;
+ maRangeY = rBox.maRangeY;
+ maRangeZ = rBox.maRangeZ;
}
sal_Int32 getMinX() const
@@ -172,7 +172,7 @@ namespace basegfx
maRangeZ.getMinimum()
);
}
-
+
B3IPoint getMaximum() const
{
return B3IPoint(
@@ -190,7 +190,7 @@ namespace basegfx
maRangeZ.getRange()
);
}
-
+
B3DPoint getCenter() const
{
return B3DPoint(
@@ -199,11 +199,11 @@ namespace basegfx
maRangeZ.getCenter()
);
}
-
+
bool isInside(const B3ITuple& rTuple) const
{
return (
- maRangeX.isInside(rTuple.getX())
+ maRangeX.isInside(rTuple.getX())
&& maRangeY.isInside(rTuple.getY())
&& maRangeZ.isInside(rTuple.getZ())
);
@@ -212,7 +212,7 @@ namespace basegfx
bool isInside(const B3IBox& rBox) const
{
return (
- maRangeX.isInside(rBox.maRangeX)
+ maRangeX.isInside(rBox.maRangeX)
&& maRangeY.isInside(rBox.maRangeY)
&& maRangeZ.isInside(rBox.maRangeZ)
);
@@ -221,7 +221,7 @@ namespace basegfx
bool overlaps(const B3IBox& rBox) const
{
return (
- maRangeX.overlaps(rBox.maRangeX)
+ maRangeX.overlaps(rBox.maRangeX)
&& maRangeY.overlaps(rBox.maRangeY)
&& maRangeZ.overlaps(rBox.maRangeZ)
);
@@ -236,23 +236,23 @@ namespace basegfx
void expand(const B3IBox& rBox)
{
- maRangeX.expand(rBox.maRangeX);
- maRangeY.expand(rBox.maRangeY);
- maRangeZ.expand(rBox.maRangeZ);
+ maRangeX.expand(rBox.maRangeX);
+ maRangeY.expand(rBox.maRangeY);
+ maRangeZ.expand(rBox.maRangeZ);
}
void intersect(const B3IBox& rBox)
{
- maRangeX.intersect(rBox.maRangeX);
- maRangeY.intersect(rBox.maRangeY);
- maRangeZ.intersect(rBox.maRangeZ);
+ maRangeX.intersect(rBox.maRangeX);
+ maRangeY.intersect(rBox.maRangeY);
+ maRangeZ.intersect(rBox.maRangeZ);
}
void grow(sal_Int32 nValue)
{
- maRangeX.grow(nValue);
- maRangeY.grow(nValue);
- maRangeZ.grow(nValue);
+ maRangeX.grow(nValue);
+ maRangeY.grow(nValue);
+ maRangeZ.grow(nValue);
}
};
} // end of namespace basegfx