diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-27 01:59:25 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2015-10-27 02:33:18 +0000 |
commit | 3ce9af420afafa1a81de646220706fcdc8d84b55 (patch) | |
tree | fc73bb3f66a8bd7973cff8615de7feaa61c5a49d /include | |
parent | 64de38cf8eec4c0ff21fa886b616182acd8600a2 (diff) |
loplugin:unusedmethods
Change-Id: I73180266c0af98dbd8d29bd3b11850996b94def9
Reviewed-on: https://gerrit.libreoffice.org/19195
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/basegfx/matrix/b2dhommatrix.hxx | 30 | ||||
-rw-r--r-- | include/basegfx/matrix/b3dhommatrix.hxx | 30 | ||||
-rw-r--r-- | include/basegfx/pixel/bpixel.hxx | 64 | ||||
-rw-r--r-- | include/basegfx/polygon/b2dpolygontools.hxx | 5 | ||||
-rw-r--r-- | include/basegfx/polygon/b2dpolypolygontools.hxx | 5 | ||||
-rw-r--r-- | include/basegfx/polygon/b3dpolygontools.hxx | 3 | ||||
-rw-r--r-- | include/basegfx/range/b2dconnectedranges.hxx | 9 | ||||
-rw-r--r-- | include/basegfx/raster/bpixelraster.hxx | 3 | ||||
-rw-r--r-- | include/basegfx/raster/bzpixelraster.hxx | 7 | ||||
-rw-r--r-- | include/basegfx/tools/canvastools.hxx | 4 | ||||
-rw-r--r-- | include/basegfx/tuple/b2dtuple.hxx | 29 | ||||
-rw-r--r-- | include/basegfx/tuple/b2i64tuple.hxx | 117 | ||||
-rw-r--r-- | include/basegfx/tuple/b2ituple.hxx | 36 | ||||
-rw-r--r-- | include/basegfx/tuple/b3dtuple.hxx | 54 | ||||
-rw-r--r-- | include/basegfx/tuple/b3ituple.hxx | 129 | ||||
-rw-r--r-- | include/basegfx/vector/b2ivector.hxx | 7 | ||||
-rw-r--r-- | include/basegfx/vector/b3dvector.hxx | 17 |
17 files changed, 0 insertions, 549 deletions
diff --git a/include/basegfx/matrix/b2dhommatrix.hxx b/include/basegfx/matrix/b2dhommatrix.hxx index 68c119c929c6..a3e6fcde97cf 100644 --- a/include/basegfx/matrix/b2dhommatrix.hxx +++ b/include/basegfx/matrix/b2dhommatrix.hxx @@ -96,36 +96,6 @@ namespace basegfx bool decompose(B2DTuple& rScale, B2DTuple& rTranslate, double& rRotate, double& rShearX) const; }; - // addition, subtraction - inline B2DHomMatrix operator+(const B2DHomMatrix& rMatA, const B2DHomMatrix& rMatB) - { - B2DHomMatrix aSum(rMatA); - aSum += rMatB; - return aSum; - } - - inline B2DHomMatrix operator-(const B2DHomMatrix& rMatA, const B2DHomMatrix& rMatB) - { - B2DHomMatrix aDiv(rMatA); - aDiv -= rMatB; - return aDiv; - } - - // multiplication, division by a constant - inline B2DHomMatrix operator*(const B2DHomMatrix& rMat, double fValue) - { - B2DHomMatrix aNew(rMat); - aNew *= fValue; - return aNew; - } - - inline B2DHomMatrix operator/(const B2DHomMatrix& rMat, double fValue) - { - B2DHomMatrix aNew(rMat); - aNew *= 1.0 / fValue; - return aNew; - } - inline B2DHomMatrix operator*(const B2DHomMatrix& rMatA, const B2DHomMatrix& rMatB) { B2DHomMatrix aMul(rMatB); diff --git a/include/basegfx/matrix/b3dhommatrix.hxx b/include/basegfx/matrix/b3dhommatrix.hxx index 0ffd911b5bf6..b8e1c5b26c9c 100644 --- a/include/basegfx/matrix/b3dhommatrix.hxx +++ b/include/basegfx/matrix/b3dhommatrix.hxx @@ -112,36 +112,6 @@ namespace basegfx bool decompose(B3DTuple& rScale, B3DTuple& rTranslate, B3DTuple& rRotate, B3DTuple& rShear) const; }; - // addition, subtraction - inline B3DHomMatrix operator+(const B3DHomMatrix& rMatA, const B3DHomMatrix& rMatB) - { - B3DHomMatrix aSum(rMatA); - aSum += rMatB; - return aSum; - } - - inline B3DHomMatrix operator-(const B3DHomMatrix& rMatA, const B3DHomMatrix& rMatB) - { - B3DHomMatrix aDiv(rMatA); - aDiv -= rMatB; - return aDiv; - } - - // multiplication, division by constant value - inline B3DHomMatrix operator*(const B3DHomMatrix& rMat, double fValue) - { - B3DHomMatrix aNew(rMat); - aNew *= fValue; - return aNew; - } - - inline B3DHomMatrix operator/(const B3DHomMatrix& rMat, double fValue) - { - B3DHomMatrix aNew(rMat); - aNew *= 1.0 / fValue; - return aNew; - } - inline B3DHomMatrix operator*(const B3DHomMatrix& rMatA, const B3DHomMatrix& rMatB) { B3DHomMatrix aMul(rMatB); diff --git a/include/basegfx/pixel/bpixel.hxx b/include/basegfx/pixel/bpixel.hxx index f42e75706202..a9fea5b6dbde 100644 --- a/include/basegfx/pixel/bpixel.hxx +++ b/include/basegfx/pixel/bpixel.hxx @@ -115,70 +115,6 @@ namespace basegfx }; - // external operators - - inline BPixel minimum(const BPixel& rTupA, const BPixel& rTupB) - { - return BPixel( - std::min(rTupB.getRed(), rTupA.getRed()), - std::min(rTupB.getGreen(), rTupA.getGreen()), - std::min(rTupB.getBlue(), rTupA.getBlue()), - std::min(rTupB.getOpacity(), rTupA.getOpacity())); - } - - inline BPixel maximum(const BPixel& rTupA, const BPixel& rTupB) - { - return BPixel( - std::max(rTupB.getRed(), rTupA.getRed()), - std::max(rTupB.getGreen(), rTupA.getGreen()), - std::max(rTupB.getBlue(), rTupA.getBlue()), - std::max(rTupB.getOpacity(), rTupA.getOpacity())); - } - - inline BPixel interpolate(const BPixel& rOld1, const BPixel& rOld2, double t) - { - if(rOld1 == rOld2) - { - return rOld1; - } - else if(0.0 >= t) - { - return rOld1; - } - else if(1.0 <= t) - { - return rOld2; - } - else - { - const sal_uInt32 nFactor(fround(256.0 * t)); - const sal_uInt32 nNegFac(256L - nFactor); - - return BPixel( - (sal_uInt8)(((sal_uInt32)rOld1.getRed() * nNegFac + (sal_uInt32)rOld2.getRed() * nFactor) >> 8L), - (sal_uInt8)(((sal_uInt32)rOld1.getGreen() * nNegFac + (sal_uInt32)rOld2.getGreen() * nFactor) >> 8L), - (sal_uInt8)(((sal_uInt32)rOld1.getBlue() * nNegFac + (sal_uInt32)rOld2.getBlue() * nFactor) >> 8L), - (sal_uInt8)(((sal_uInt32)rOld1.getOpacity() * nNegFac + (sal_uInt32)rOld2.getOpacity() * nFactor) >> 8L)); - } - } - - inline BPixel average(const BPixel& rOld1, const BPixel& rOld2) - { - return BPixel( - rOld1.getRed() == rOld2.getRed() ? rOld1.getRed() : (sal_uInt8)(((sal_uInt32)rOld1.getRed() + (sal_uInt32)rOld2.getRed()) >> 1L), - rOld1.getGreen() == rOld2.getGreen() ? rOld1.getGreen() : (sal_uInt8)(((sal_uInt32)rOld1.getGreen() + (sal_uInt32)rOld2.getGreen()) >> 1L), - rOld1.getBlue() == rOld2.getBlue() ? rOld1.getBlue() : (sal_uInt8)(((sal_uInt32)rOld1.getBlue() + (sal_uInt32)rOld2.getBlue()) >> 1L), - rOld1.getOpacity() == rOld2.getOpacity() ? rOld1.getOpacity() : (sal_uInt8)(((sal_uInt32)rOld1.getOpacity() + (sal_uInt32)rOld2.getOpacity()) >> 1L)); - } - - inline BPixel average(const BPixel& rOld1, const BPixel& rOld2, const BPixel& rOld3) - { - return BPixel( - (rOld1.getRed() == rOld2.getRed() && rOld2.getRed() == rOld3.getRed()) ? rOld1.getRed() : (sal_uInt8)(((sal_uInt32)rOld1.getRed() + (sal_uInt32)rOld2.getRed() + (sal_uInt32)rOld3.getRed()) / 3L), - (rOld1.getGreen() == rOld2.getGreen() && rOld2.getGreen() == rOld3.getGreen()) ? rOld1.getGreen() : (sal_uInt8)(((sal_uInt32)rOld1.getGreen() + (sal_uInt32)rOld2.getGreen() + (sal_uInt32)rOld3.getGreen()) / 3L), - (rOld1.getBlue() == rOld2.getBlue() && rOld2.getBlue() == rOld3.getBlue()) ? rOld1.getBlue() : (sal_uInt8)(((sal_uInt32)rOld1.getBlue() + (sal_uInt32)rOld2.getBlue() + (sal_uInt32)rOld3.getBlue()) / 3L), - (rOld1.getOpacity() == rOld2.getOpacity() && rOld2.getOpacity() == rOld3.getOpacity()) ? rOld1.getOpacity() : (sal_uInt8)(((sal_uInt32)rOld1.getOpacity() + (sal_uInt32)rOld2.getOpacity() + (sal_uInt32)rOld3.getOpacity()) / 3L)); - } } // end of namespace basegfx #endif // INCLUDED_BASEGFX_PIXEL_BPIXEL_HXX diff --git a/include/basegfx/polygon/b2dpolygontools.hxx b/include/basegfx/polygon/b2dpolygontools.hxx index e963fa04cff7..3edf22e1a100 100644 --- a/include/basegfx/polygon/b2dpolygontools.hxx +++ b/include/basegfx/polygon/b2dpolygontools.hxx @@ -442,11 +442,6 @@ namespace basegfx */ BASEGFX_DLLPUBLIC B2DPolygon snapPointsOfHorizontalOrVerticalEdges(const B2DPolygon& rCandidate); - /** returns true if the Polygon only contains horizontal or vertical edges - so that it could be represented by RegionBands - */ - bool containsOnlyHorizontalAndVerticalEdges(const B2DPolygon& rCandidate); - /// get the tangent with which the given point is entered seen from the previous /// polygon path data. Take into account all stuff like closed state, zero-length edges and others. BASEGFX_DLLPUBLIC B2DVector getTangentEnteringPoint(const B2DPolygon& rCandidate, sal_uInt32 nIndex); diff --git a/include/basegfx/polygon/b2dpolypolygontools.hxx b/include/basegfx/polygon/b2dpolypolygontools.hxx index 2c84287dfbd9..4059e22e35bb 100644 --- a/include/basegfx/polygon/b2dpolypolygontools.hxx +++ b/include/basegfx/polygon/b2dpolypolygontools.hxx @@ -287,11 +287,6 @@ namespace basegfx */ BASEGFX_DLLPUBLIC B2DPolyPolygon snapPointsOfHorizontalOrVerticalEdges(const B2DPolyPolygon& rCandidate); - /** returns true if the Polygon only contains horizontal or vertical edges - so that it could be represented by RegionBands - */ - BASEGFX_DLLPUBLIC bool containsOnlyHorizontalAndVerticalEdges(const B2DPolyPolygon& rCandidate); - /// converters for css::drawing::PointSequence BASEGFX_DLLPUBLIC B2DPolyPolygon UnoPointSequenceSequenceToB2DPolyPolygon( const css::drawing::PointSequenceSequence& rPointSequenceSequenceSource, diff --git a/include/basegfx/polygon/b3dpolygontools.hxx b/include/basegfx/polygon/b3dpolygontools.hxx index bcee8be3b90b..49ba730555e1 100644 --- a/include/basegfx/polygon/b3dpolygontools.hxx +++ b/include/basegfx/polygon/b3dpolygontools.hxx @@ -55,9 +55,6 @@ namespace basegfx // get size of polygon. Control vectors are included in that ranges. BASEGFX_DLLPUBLIC B3DRange getRange(const B3DPolygon& rCandidate); - // get area of polygon - BASEGFX_DLLPUBLIC double getArea(const ::basegfx::B3DPolygon& rCandidate); - // get length of polygon BASEGFX_DLLPUBLIC double getLength(const B3DPolygon& rCandidate); diff --git a/include/basegfx/range/b2dconnectedranges.hxx b/include/basegfx/range/b2dconnectedranges.hxx index 6feb867f1311..7679f5a932dc 100644 --- a/include/basegfx/range/b2dconnectedranges.hxx +++ b/include/basegfx/range/b2dconnectedranges.hxx @@ -83,15 +83,6 @@ namespace basegfx { } - /** Query total bounds of all added ranges. - - @return the union bound rect over all added ranges. - */ - B2DRange getBounds() const - { - return maTotalBounds; - } - /** Add an additional range. This method integrates a new range into the connected diff --git a/include/basegfx/raster/bpixelraster.hxx b/include/basegfx/raster/bpixelraster.hxx index 67eea7d31b15..f85c0af28310 100644 --- a/include/basegfx/raster/bpixelraster.hxx +++ b/include/basegfx/raster/bpixelraster.hxx @@ -64,13 +64,10 @@ namespace basegfx // coordinate calcs between X/Y and span sal_uInt32 getIndexFromXY(sal_uInt32 nX, sal_uInt32 nY) const { return (nX + (nY * mnWidth)); } - sal_uInt32 getXFromIndex(sal_uInt32 nIndex) const { return (nIndex % mnWidth); } - sal_uInt32 getYFromIndex(sal_uInt32 nIndex) const { return (nIndex / mnWidth); } // data access read sal_uInt32 getWidth() const { return mnWidth; } sal_uInt32 getHeight() const { return mnHeight; } - sal_uInt32 getCount() const { return mnCount; } // data access read only const BPixel& getBPixel(sal_uInt32 nIndex) const diff --git a/include/basegfx/raster/bzpixelraster.hxx b/include/basegfx/raster/bzpixelraster.hxx index f11dcf26a9f9..722abdee89bb 100644 --- a/include/basegfx/raster/bzpixelraster.hxx +++ b/include/basegfx/raster/bzpixelraster.hxx @@ -33,13 +33,6 @@ namespace basegfx sal_uInt16* mpZBuffer; public: - // reset - void resetZ() - { - reset(); - memset(mpZBuffer, 0, sizeof(sal_uInt16) * mnCount); - } - // constructor/destructor BZPixelRaster(sal_uInt32 nWidth, sal_uInt32 nHeight) : BPixelRaster(nWidth, nHeight), diff --git a/include/basegfx/tools/canvastools.hxx b/include/basegfx/tools/canvastools.hxx index 7e2c0c06b1b7..79b72f2bf674 100644 --- a/include/basegfx/tools/canvastools.hxx +++ b/include/basegfx/tools/canvastools.hxx @@ -122,10 +122,6 @@ namespace basegfx BASEGFX_DLLPUBLIC ::basegfx::B3DHomMatrix homMatrixFromAffineMatrix3D( const css::geometry::AffineMatrix3D& matrix ); - BASEGFX_DLLPUBLIC css::geometry::Matrix2D& - matrixFromHomMatrix( css::geometry::Matrix2D& matrix, - const ::basegfx::B2DHomMatrix& transform); - // Geometry conversions diff --git a/include/basegfx/tuple/b2dtuple.hxx b/include/basegfx/tuple/b2dtuple.hxx index 5659c7bf8a9a..3819a5b1a24a 100644 --- a/include/basegfx/tuple/b2dtuple.hxx +++ b/include/basegfx/tuple/b2dtuple.hxx @@ -221,20 +221,6 @@ namespace basegfx // external operators - inline B2DTuple minimum(const B2DTuple& rTupA, const B2DTuple& rTupB) - { - return B2DTuple( - std::min(rTupB.getX(), rTupA.getX()), - std::min(rTupB.getY(), rTupA.getY())); - } - - inline B2DTuple maximum(const B2DTuple& rTupA, const B2DTuple& rTupB) - { - return B2DTuple( - std::max(rTupB.getX(), rTupA.getX()), - std::max(rTupB.getY(), rTupA.getY())); - } - inline B2DTuple absolute(const B2DTuple& rTup) { B2DTuple aAbs( @@ -272,13 +258,6 @@ namespace basegfx rOld1.getY() == rOld2.getY() ? rOld1.getY() : (rOld1.getY() + rOld2.getY()) * 0.5); } - inline B2DTuple average(const B2DTuple& rOld1, const B2DTuple& rOld2, const B2DTuple& rOld3) - { - return B2DTuple( - (rOld1.getX() == rOld2.getX() && rOld2.getX() == rOld3.getX()) ? rOld1.getX() : (rOld1.getX() + rOld2.getX() + rOld3.getX()) * (1.0 / 3.0), - (rOld1.getY() == rOld2.getY() && rOld2.getY() == rOld3.getY()) ? rOld1.getY() : (rOld1.getY() + rOld2.getY() + rOld3.getY()) * (1.0 / 3.0)); - } - inline B2DTuple operator+(const B2DTuple& rTupA, const B2DTuple& rTupB) { B2DTuple aSum(rTupA); @@ -328,14 +307,6 @@ namespace basegfx return aNew; } - inline B2DTuple operator/(double t, const B2DTuple& rTup) - { - B2DTuple aNew(t, t); - B2DTuple aTmp(rTup); - aNew /= aTmp; - return aNew; - } - /** Round double to nearest integer for 2D tuple @return the nearest integer for this tuple diff --git a/include/basegfx/tuple/b2i64tuple.hxx b/include/basegfx/tuple/b2i64tuple.hxx index e4b40acff289..5c5aac7cdbaa 100644 --- a/include/basegfx/tuple/b2i64tuple.hxx +++ b/include/basegfx/tuple/b2i64tuple.hxx @@ -177,123 +177,6 @@ namespace basegfx } }; - // external operators - - - inline B2I64Tuple minimum(const B2I64Tuple& rTupA, const B2I64Tuple& rTupB) - { - return B2I64Tuple( - std::min(rTupB.getX(), rTupA.getX()), - std::min(rTupB.getY(), rTupA.getY())); - } - - inline B2I64Tuple maximum(const B2I64Tuple& rTupA, const B2I64Tuple& rTupB) - { - return B2I64Tuple( - std::max(rTupB.getX(), rTupA.getX()), - std::max(rTupB.getY(), rTupA.getY())); - } - - inline B2I64Tuple absolute(const B2I64Tuple& rTup) - { - B2I64Tuple aAbs( - (0 > rTup.getX()) ? -rTup.getX() : rTup.getX(), - (0 > rTup.getY()) ? -rTup.getY() : rTup.getY()); - return aAbs; - } - - inline B2I64Tuple interpolate(const B2I64Tuple& rOld1, const B2I64Tuple& rOld2, double t) - { - if(rOld1 == rOld2) - { - return rOld1; - } - else if(0.0 >= t) - { - return rOld1; - } - else if(1.0 <= t) - { - return rOld2; - } - else - { - return B2I64Tuple( - basegfx::fround64(((rOld2.getX() - rOld1.getX()) * t) + rOld1.getX()), - basegfx::fround64(((rOld2.getY() - rOld1.getY()) * t) + rOld1.getY())); - } - } - - inline B2I64Tuple average(const B2I64Tuple& rOld1, const B2I64Tuple& rOld2) - { - return B2I64Tuple( - rOld1.getX() == rOld2.getX() ? rOld1.getX() : basegfx::fround64((rOld1.getX() + rOld2.getX()) * 0.5), - rOld1.getY() == rOld2.getY() ? rOld1.getY() : basegfx::fround64((rOld1.getY() + rOld2.getY()) * 0.5)); - } - - inline B2I64Tuple average(const B2I64Tuple& rOld1, const B2I64Tuple& rOld2, const B2I64Tuple& rOld3) - { - return B2I64Tuple( - (rOld1.getX() == rOld2.getX() && rOld2.getX() == rOld3.getX()) ? rOld1.getX() : basegfx::fround64((rOld1.getX() + rOld2.getX() + rOld3.getX()) * (1.0 / 3.0)), - (rOld1.getY() == rOld2.getY() && rOld2.getY() == rOld3.getY()) ? rOld1.getY() : basegfx::fround64((rOld1.getY() + rOld2.getY() + rOld3.getY()) * (1.0 / 3.0))); - } - - inline B2I64Tuple operator+(const B2I64Tuple& rTupA, const B2I64Tuple& rTupB) - { - B2I64Tuple aSum(rTupA); - aSum += rTupB; - return aSum; - } - - inline B2I64Tuple operator-(const B2I64Tuple& rTupA, const B2I64Tuple& rTupB) - { - B2I64Tuple aSub(rTupA); - aSub -= rTupB; - return aSub; - } - - inline B2I64Tuple operator/(const B2I64Tuple& rTupA, const B2I64Tuple& rTupB) - { - B2I64Tuple aDiv(rTupA); - aDiv /= rTupB; - return aDiv; - } - - inline B2I64Tuple operator*(const B2I64Tuple& rTupA, const B2I64Tuple& rTupB) - { - B2I64Tuple aMul(rTupA); - aMul *= rTupB; - return aMul; - } - - inline B2I64Tuple operator*(const B2I64Tuple& rTup, sal_Int64 t) - { - B2I64Tuple aNew(rTup); - aNew *= t; - return aNew; - } - - inline B2I64Tuple operator*(sal_Int64 t, const B2I64Tuple& rTup) - { - B2I64Tuple aNew(rTup); - aNew *= t; - return aNew; - } - - inline B2I64Tuple operator/(const B2I64Tuple& rTup, sal_Int64 t) - { - B2I64Tuple aNew(rTup); - aNew /= t; - return aNew; - } - - inline B2I64Tuple operator/(sal_Int64 t, const B2I64Tuple& rTup) - { - B2I64Tuple aNew(t, t); - B2I64Tuple aTmp(rTup); - aNew /= aTmp; - return aNew; - } } // end of namespace basegfx #endif // INCLUDED_BASEGFX_TUPLE_B2I64TUPLE_HXX diff --git a/include/basegfx/tuple/b2ituple.hxx b/include/basegfx/tuple/b2ituple.hxx index d75e41cc504a..e7a4c0f1fc8c 100644 --- a/include/basegfx/tuple/b2ituple.hxx +++ b/include/basegfx/tuple/b2ituple.hxx @@ -212,27 +212,6 @@ namespace basegfx return aSub; } - inline B2ITuple operator/(const B2ITuple& rTupA, const B2ITuple& rTupB) - { - B2ITuple aDiv(rTupA); - aDiv /= rTupB; - return aDiv; - } - - inline B2ITuple operator*(const B2ITuple& rTupA, const B2ITuple& rTupB) - { - B2ITuple aMul(rTupA); - aMul *= rTupB; - return aMul; - } - - inline B2ITuple operator*(const B2ITuple& rTup, sal_Int32 t) - { - B2ITuple aNew(rTup); - aNew *= t; - return aNew; - } - inline B2ITuple operator*(sal_Int32 t, const B2ITuple& rTup) { B2ITuple aNew(rTup); @@ -240,21 +219,6 @@ namespace basegfx return aNew; } - inline B2ITuple operator/(const B2ITuple& rTup, sal_Int32 t) - { - B2ITuple aNew(rTup); - aNew /= t; - return aNew; - } - - inline B2ITuple operator/(sal_Int32 t, const B2ITuple& rTup) - { - B2ITuple aNew(t, t); - B2ITuple aTmp(rTup); - aNew /= aTmp; - return aNew; - } - } // end of namespace basegfx #endif // INCLUDED_BASEGFX_TUPLE_B2ITUPLE_HXX diff --git a/include/basegfx/tuple/b3dtuple.hxx b/include/basegfx/tuple/b3dtuple.hxx index 5bd5cc950c89..a1d4addcfe2b 100644 --- a/include/basegfx/tuple/b3dtuple.hxx +++ b/include/basegfx/tuple/b3dtuple.hxx @@ -282,31 +282,6 @@ namespace basegfx // external operators - inline B3DTuple minimum(const B3DTuple& rTupA, const B3DTuple& rTupB) - { - return B3DTuple( - std::min(rTupB.getX(), rTupA.getX()), - std::min(rTupB.getY(), rTupA.getY()), - std::min(rTupB.getZ(), rTupA.getZ())); - } - - inline B3DTuple maximum(const B3DTuple& rTupA, const B3DTuple& rTupB) - { - return B3DTuple( - std::max(rTupB.getX(), rTupA.getX()), - std::max(rTupB.getY(), rTupA.getY()), - std::max(rTupB.getZ(), rTupA.getZ())); - } - - inline B3DTuple absolute(const B3DTuple& rTup) - { - B3DTuple aAbs( - fabs(rTup.getX()), - fabs(rTup.getY()), - fabs(rTup.getZ())); - return aAbs; - } - inline B3DTuple interpolate(const B3DTuple& rOld1, const B3DTuple& rOld2, double t) { if(rOld1 == rOld2) @@ -338,14 +313,6 @@ namespace basegfx rOld1.getZ() == rOld2.getZ() ? rOld1.getZ() : (rOld1.getZ() + rOld2.getZ()) * 0.5); } - inline B3DTuple average(const B3DTuple& rOld1, const B3DTuple& rOld2, const B3DTuple& rOld3) - { - return B3DTuple( - (rOld1.getX() == rOld2.getX() && rOld2.getX() == rOld3.getX()) ? rOld1.getX() : (rOld1.getX() + rOld2.getX() + rOld3.getX()) * (1.0 / 3.0), - (rOld1.getY() == rOld2.getY() && rOld2.getY() == rOld3.getY()) ? rOld1.getY() : (rOld1.getY() + rOld2.getY() + rOld3.getY()) * (1.0 / 3.0), - (rOld1.getZ() == rOld2.getZ() && rOld2.getZ() == rOld3.getZ()) ? rOld1.getZ() : (rOld1.getZ() + rOld2.getZ() + rOld3.getZ()) * (1.0 / 3.0)); - } - inline B3DTuple operator+(const B3DTuple& rTupA, const B3DTuple& rTupB) { B3DTuple aSum(rTupA); @@ -360,13 +327,6 @@ namespace basegfx return aSub; } - inline B3DTuple operator/(const B3DTuple& rTupA, const B3DTuple& rTupB) - { - B3DTuple aDiv(rTupA); - aDiv /= rTupB; - return aDiv; - } - inline B3DTuple operator*(const B3DTuple& rTupA, const B3DTuple& rTupB) { B3DTuple aMul(rTupA); @@ -381,13 +341,6 @@ namespace basegfx return aNew; } - inline B3DTuple operator*(double t, const B3DTuple& rTup) - { - B3DTuple aNew(rTup); - aNew *= t; - return aNew; - } - inline B3DTuple operator/(const B3DTuple& rTup, double t) { B3DTuple aNew(rTup); @@ -395,13 +348,6 @@ namespace basegfx return aNew; } - inline B3DTuple operator/(double t, const B3DTuple& rTup) - { - B3DTuple aNew(rTup); - aNew /= t; - return aNew; - } - /** Round double to nearest integer for 3D tuple @return the nearest integer for this tuple diff --git a/include/basegfx/tuple/b3ituple.hxx b/include/basegfx/tuple/b3ituple.hxx index 7802101ece74..69a2ccaf6441 100644 --- a/include/basegfx/tuple/b3ituple.hxx +++ b/include/basegfx/tuple/b3ituple.hxx @@ -98,12 +98,6 @@ namespace basegfx return mnY; } - /// get Z-Coordinate of 3D Tuple - sal_Int32 getZ() const - { - return mnZ; - } - /// Array-access to 3D Tuple const sal_Int32& operator[] (int nPos) const { @@ -197,129 +191,6 @@ namespace basegfx } }; - // external operators - - - inline B3ITuple minimum(const B3ITuple& rTupA, const B3ITuple& rTupB) - { - return B3ITuple( - std::min(rTupB.getX(), rTupA.getX()), - std::min(rTupB.getY(), rTupA.getY()), - std::min(rTupB.getZ(), rTupA.getZ())); - } - - inline B3ITuple maximum(const B3ITuple& rTupA, const B3ITuple& rTupB) - { - return B3ITuple( - std::max(rTupB.getX(), rTupA.getX()), - std::max(rTupB.getY(), rTupA.getY()), - std::max(rTupB.getZ(), rTupA.getZ())); - } - - inline B3ITuple absolute(const B3ITuple& rTup) - { - B3ITuple aAbs( - (0 > rTup.getX()) ? -rTup.getX() : rTup.getX(), - (0 > rTup.getY()) ? -rTup.getY() : rTup.getY(), - (0 > rTup.getZ()) ? -rTup.getZ() : rTup.getZ()); - return aAbs; - } - - inline B3ITuple interpolate(const B3ITuple& rOld1, const B3ITuple& rOld2, double t) - { - if(rOld1 == rOld2) - { - return rOld1; - } - else if(0.0 >= t) - { - return rOld1; - } - else if(1.0 <= t) - { - return rOld2; - } - else - { - return B3ITuple( - basegfx::fround(((rOld2.getX() - rOld1.getX()) * t) + rOld1.getX()), - basegfx::fround(((rOld2.getY() - rOld1.getY()) * t) + rOld1.getY()), - basegfx::fround(((rOld2.getZ() - rOld1.getZ()) * t) + rOld1.getZ())); - } - } - - inline B3ITuple average(const B3ITuple& rOld1, const B3ITuple& rOld2) - { - return B3ITuple( - rOld1.getX() == rOld2.getX() ? rOld1.getX() : basegfx::fround((rOld1.getX() + rOld2.getX()) * 0.5), - rOld1.getY() == rOld2.getY() ? rOld1.getY() : basegfx::fround((rOld1.getY() + rOld2.getY()) * 0.5), - rOld1.getZ() == rOld2.getZ() ? rOld1.getZ() : basegfx::fround((rOld1.getZ() + rOld2.getZ()) * 0.5)); - } - - inline B3ITuple average(const B3ITuple& rOld1, const B3ITuple& rOld2, const B3ITuple& rOld3) - { - return B3ITuple( - (rOld1.getX() == rOld2.getX() && rOld2.getX() == rOld3.getX()) ? rOld1.getX() : basegfx::fround((rOld1.getX() + rOld2.getX() + rOld3.getX()) * (1.0 / 3.0)), - (rOld1.getY() == rOld2.getY() && rOld2.getY() == rOld3.getY()) ? rOld1.getX() : basegfx::fround((rOld1.getY() + rOld2.getY() + rOld3.getY()) * (1.0 / 3.0)), - (rOld1.getZ() == rOld2.getZ() && rOld2.getZ() == rOld3.getZ()) ? rOld1.getX() : basegfx::fround((rOld1.getZ() + rOld2.getZ() + rOld3.getZ()) * (1.0 / 3.0))); - } - - inline B3ITuple operator+(const B3ITuple& rTupA, const B3ITuple& rTupB) - { - B3ITuple aSum(rTupA); - aSum += rTupB; - return aSum; - } - - inline B3ITuple operator-(const B3ITuple& rTupA, const B3ITuple& rTupB) - { - B3ITuple aSub(rTupA); - aSub -= rTupB; - return aSub; - } - - inline B3ITuple operator/(const B3ITuple& rTupA, const B3ITuple& rTupB) - { - B3ITuple aDiv(rTupA); - aDiv /= rTupB; - return aDiv; - } - - inline B3ITuple operator*(const B3ITuple& rTupA, const B3ITuple& rTupB) - { - B3ITuple aMul(rTupA); - aMul *= rTupB; - return aMul; - } - - inline B3ITuple operator*(const B3ITuple& rTup, sal_Int32 t) - { - B3ITuple aNew(rTup); - aNew *= t; - return aNew; - } - - inline B3ITuple operator*(sal_Int32 t, const B3ITuple& rTup) - { - B3ITuple aNew(rTup); - aNew *= t; - return aNew; - } - - inline B3ITuple operator/(const B3ITuple& rTup, sal_Int32 t) - { - B3ITuple aNew(rTup); - aNew /= t; - return aNew; - } - - inline B3ITuple operator/(sal_Int32 t, const B3ITuple& rTup) - { - B3ITuple aNew(t, t, t); - B3ITuple aTmp(rTup); - aNew /= aTmp; - return aNew; - } } // end of namespace basegfx #endif // INCLUDED_BASEGFX_TUPLE_B3ITUPLE_HXX diff --git a/include/basegfx/vector/b2ivector.hxx b/include/basegfx/vector/b2ivector.hxx index e8fac19d81cf..3896852a3a8e 100644 --- a/include/basegfx/vector/b2ivector.hxx +++ b/include/basegfx/vector/b2ivector.hxx @@ -132,13 +132,6 @@ namespace basegfx // external operators - /** Transform vector by given transformation matrix. - - Since this is a vector, translational components of the - matrix are disregarded. - */ - BASEGFX_DLLPUBLIC B2IVector operator*( const B2DHomMatrix& rMat, const B2IVector& rVec ); - template< typename charT, typename traits > inline std::basic_ostream<charT, traits> & operator <<( std::basic_ostream<charT, traits> & stream, const basegfx::B2IVector& vector ) diff --git a/include/basegfx/vector/b3dvector.hxx b/include/basegfx/vector/b3dvector.hxx index 1e8572e12266..cf4b1b24983d 100644 --- a/include/basegfx/vector/b3dvector.hxx +++ b/include/basegfx/vector/b3dvector.hxx @@ -227,23 +227,6 @@ namespace basegfx // external operators - /** get a 3D Vector which is in 2D (ignoring - the Z-Coordinate) perpendicular to a given 3D Vector - - @attention This only works if the given 3D Vector is normalized. - - @param rNormalizedVec - A normalized 3D Vector. - - @return - A 3D Vector perpendicular to the given one in X,Y (2D). - */ - inline B3DVector getPerpendicular2D( const B3DVector& rNormalizedVec ) - { - B3DVector aPerpendicular(-rNormalizedVec.getY(), rNormalizedVec.getX(), rNormalizedVec.getZ()); - return aPerpendicular; - } - /** Test two vectors which need not to be normalized for parallelism @param rVecA |