summaryrefslogtreecommitdiff
path: root/basegfx/inc/basegfx/tools
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/inc/basegfx/tools')
-rw-r--r--basegfx/inc/basegfx/tools/b2dclipstate.hxx94
-rw-r--r--basegfx/inc/basegfx/tools/canvastools.hxx205
-rw-r--r--basegfx/inc/basegfx/tools/gradienttools.hxx405
-rw-r--r--basegfx/inc/basegfx/tools/keystoplerp.hxx92
-rw-r--r--basegfx/inc/basegfx/tools/lerp.hxx51
-rw-r--r--basegfx/inc/basegfx/tools/rectcliptools.hxx96
-rw-r--r--basegfx/inc/basegfx/tools/tools.hxx102
-rw-r--r--basegfx/inc/basegfx/tools/unopolypolygon.hxx110
-rw-r--r--basegfx/inc/basegfx/tools/unotools.hxx40
-rw-r--r--basegfx/inc/basegfx/tools/zoomtools.hxx50
10 files changed, 0 insertions, 1245 deletions
diff --git a/basegfx/inc/basegfx/tools/b2dclipstate.hxx b/basegfx/inc/basegfx/tools/b2dclipstate.hxx
deleted file mode 100644
index f1d750ae636b..000000000000
--- a/basegfx/inc/basegfx/tools/b2dclipstate.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _BGFX_TOOLS_CLIPSTATE_HXX
-#define _BGFX_TOOLS_CLIPSTATE_HXX
-
-#include <sal/types.h>
-#include <o3tl/cow_wrapper.hxx>
-#include <basegfx/basegfxdllapi.h>
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace basegfx
-{
- class B2DRange;
- class B2DPolyRange;
- class B2DPolygon;
- class B2DPolyPolygon;
-
- namespace tools
- {
- class ImplB2DClipState;
-
- /** This class provides an optimized, symbolic clip state for graphical output
-
- Having a current 'clip' state is a common attribute of
- almost all graphic output APIs, most of which internally
- represent it via a list of rectangular bands. In contrast,
- this implementation purely uses symbolic clips, but in a
- quite efficient manner, deferring actual evaluation until
- a clip representation is requested, and using faster code
- paths for common special cases (like all-rectangle clips)
- */
- class BASEGFX_DLLPUBLIC B2DClipState
- {
- public:
- typedef o3tl::cow_wrapper< ImplB2DClipState > ImplType;
-
- private:
- ImplType mpImpl;
-
- public:
- /// Init clip, in 'cleared' state - everything is visible
- B2DClipState();
- ~B2DClipState();
- B2DClipState( const B2DClipState& );
- explicit B2DClipState( const B2DPolyPolygon& );
- B2DClipState& operator=( const B2DClipState& );
-
- /// Set clip to 'null' - nothing is visible
- void makeNull();
-
- /// returns true when clip is 'cleared' - everything is visible
- bool isCleared() const;
-
- bool operator==(const B2DClipState&) const;
- bool operator!=(const B2DClipState&) const;
-
- void unionRange(const B2DRange& );
- void unionPolyPolygon(const B2DPolyPolygon& );
-
- void intersectRange(const B2DRange& );
- void intersectPolyPolygon(const B2DPolyPolygon& );
-
- void subtractRange(const B2DRange& );
- void subtractPolyPolygon(const B2DPolyPolygon& );
-
- void xorRange(const B2DRange& );
- void xorPolyPolygon(const B2DPolyPolygon& );
-
- B2DPolyPolygon getClipPoly() const;
- };
- }
-}
-
-#endif // _BGFX_TOOLS_CLIPSTATE_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/inc/basegfx/tools/canvastools.hxx b/basegfx/inc/basegfx/tools/canvastools.hxx
deleted file mode 100644
index 819a62e47b28..000000000000
--- a/basegfx/inc/basegfx/tools/canvastools.hxx
+++ /dev/null
@@ -1,205 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX
-#define _BGFX_TOOLS_CANVASTOOLS_HXX
-
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <basegfx/basegfxdllapi.h>
-
-
-namespace com { namespace sun { namespace star { namespace geometry
-{
- struct AffineMatrix2D;
- struct AffineMatrix3D;
- struct Matrix2D;
- struct RealPoint2D;
- struct RealSize2D;
- struct RealRectangle2D;
- struct RealRectangle3D;
- struct IntegerPoint2D;
- struct IntegerSize2D;
- struct IntegerRectangle2D;
- struct RealBezierSegment2D;
-} } } }
-
-namespace com { namespace sun { namespace star { namespace rendering
-{
- class XGraphicDevice;
- class XPolyPolygon2D;
-} } } }
-
-namespace com { namespace sun { namespace star { namespace awt
-{
- struct Point;
- struct Size;
- struct Rectangle;
-} } } }
-
-namespace basegfx
-{
- class B2DHomMatrix;
- class B3DHomMatrix;
- class B2DVector;
- class B2DPoint;
- class B2DRange;
- class B3DRange;
- class B2IBox;
- class B2IVector;
- class B2IPoint;
- class B2IRange;
- class B2DPolygon;
- class B2DPolyPolygon;
-
- namespace unotools
- {
- // Polygon conversions
- // ===================================================================
-
- BASEGFX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >
- xPolyPolygonFromB2DPolygon( const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XGraphicDevice >& xGraphicDevice,
- const ::basegfx::B2DPolygon& rPoly );
-
- BASEGFX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >
- xPolyPolygonFromB2DPolyPolygon( const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XGraphicDevice >& xGraphicDevice,
- const ::basegfx::B2DPolyPolygon& rPolyPoly );
-
-
- BASEGFX_DLLPUBLIC ::com::sun::star::uno::Sequence<
- ::com::sun::star::uno::Sequence<
- ::com::sun::star::geometry::RealBezierSegment2D > >
- bezierSequenceSequenceFromB2DPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPoly );
-
- BASEGFX_DLLPUBLIC ::com::sun::star::uno::Sequence<
- ::com::sun::star::uno::Sequence<
- ::com::sun::star::geometry::RealPoint2D > >
- pointSequenceSequenceFromB2DPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPoly );
-
- BASEGFX_DLLPUBLIC ::basegfx::B2DPolygon polygonFromPoint2DSequence(
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::geometry::RealPoint2D >& rPoints );
-
- BASEGFX_DLLPUBLIC ::basegfx::B2DPolyPolygon polyPolygonFromPoint2DSequenceSequence(
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > >& rPoints );
-
- BASEGFX_DLLPUBLIC ::basegfx::B2DPolygon polygonFromBezier2DSequence(
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::geometry::RealBezierSegment2D >& rPoints );
-
- BASEGFX_DLLPUBLIC ::basegfx::B2DPolyPolygon polyPolygonFromBezier2DSequenceSequence(
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealBezierSegment2D > >& rPoints );
-
- BASEGFX_DLLPUBLIC ::basegfx::B2DPolyPolygon b2DPolyPolygonFromXPolyPolygon2D(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& rPoly );
-
- // Matrix conversions
- // ===================================================================
-
- BASEGFX_DLLPUBLIC ::com::sun::star::geometry::AffineMatrix2D&
- affineMatrixFromHomMatrix( ::com::sun::star::geometry::AffineMatrix2D& matrix,
- const ::basegfx::B2DHomMatrix& transform);
-
- BASEGFX_DLLPUBLIC ::com::sun::star::geometry::AffineMatrix3D& affineMatrixFromHomMatrix3D(
- ::com::sun::star::geometry::AffineMatrix3D& matrix,
- const ::basegfx::B3DHomMatrix& transform);
-
- BASEGFX_DLLPUBLIC ::basegfx::B2DHomMatrix&
- homMatrixFromAffineMatrix( ::basegfx::B2DHomMatrix& transform,
- const ::com::sun::star::geometry::AffineMatrix2D& matrix );
-
- BASEGFX_DLLPUBLIC ::basegfx::B3DHomMatrix homMatrixFromAffineMatrix3D( const ::com::sun::star::geometry::AffineMatrix3D& matrix );
-
- BASEGFX_DLLPUBLIC ::com::sun::star::geometry::Matrix2D&
- matrixFromHomMatrix( ::com::sun::star::geometry::Matrix2D& matrix,
- const ::basegfx::B2DHomMatrix& transform);
-
- BASEGFX_DLLPUBLIC ::basegfx::B2DHomMatrix&
- homMatrixFromMatrix( ::basegfx::B2DHomMatrix& transform,
- const ::com::sun::star::geometry::Matrix2D& matrix );
-
- // Geometry conversions
- // ===================================================================
-
- BASEGFX_DLLPUBLIC ::com::sun::star::geometry::RealSize2D size2DFromB2DSize( const ::basegfx::B2DVector& );
- BASEGFX_DLLPUBLIC ::com::sun::star::geometry::RealPoint2D point2DFromB2DPoint( const ::basegfx::B2DPoint& );
- BASEGFX_DLLPUBLIC ::com::sun::star::geometry::RealRectangle2D rectangle2DFromB2DRectangle( const ::basegfx::B2DRange& );
- BASEGFX_DLLPUBLIC ::com::sun::star::geometry::RealRectangle3D rectangle3DFromB3DRectangle( const ::basegfx::B3DRange& );
-
- BASEGFX_DLLPUBLIC ::basegfx::B2DPoint b2DPointFromRealPoint2D( const ::com::sun::star::geometry::RealPoint2D& );
- BASEGFX_DLLPUBLIC ::basegfx::B2DRange b2DRectangleFromRealRectangle2D( const ::com::sun::star::geometry::RealRectangle2D& );
- BASEGFX_DLLPUBLIC ::basegfx::B3DRange b3DRectangleFromRealRectangle3D( const ::com::sun::star::geometry::RealRectangle3D& );
-
- BASEGFX_DLLPUBLIC ::com::sun::star::geometry::IntegerSize2D integerSize2DFromB2ISize( const ::basegfx::B2IVector& );
-
- BASEGFX_DLLPUBLIC ::basegfx::B2IVector b2ISizeFromIntegerSize2D( const ::com::sun::star::geometry::IntegerSize2D& );
- BASEGFX_DLLPUBLIC ::basegfx::B2IRange b2IRectangleFromIntegerRectangle2D( const ::com::sun::star::geometry::IntegerRectangle2D& );
-
- BASEGFX_DLLPUBLIC ::basegfx::B2IRange b2IRectangleFromAwtRectangle( const ::com::sun::star::awt::Rectangle& );
-
- // Geometry comparisons
- // ===================================================================
-
- /** Return smalltest integer range, which completely contains
- given floating point range.
-
- @param rRange
- Input range. Values must be within the representable
- bounds of sal_Int32
-
- @return the closest integer range, which completely
- contains rRange.
- */
- BASEGFX_DLLPUBLIC ::basegfx::B2IRange b2ISurroundingRangeFromB2DRange( const ::basegfx::B2DRange& rRange );
-
- /** Return smalltest integer box, which completely contains
- given floating point range.
-
- @param rRange
- Input range. Values must be within the representable
- bounds of sal_Int32
-
- @return the closest integer box, which completely contains
- rRange. Note that this box will contain all pixel affected
- by a polygon fill operation over the input range.
- */
- BASEGFX_DLLPUBLIC ::basegfx::B2IBox b2ISurroundingBoxFromB2DRange( const ::basegfx::B2DRange& rRange );
-
- /** Return smalltest B2DRange with integer values, which
- completely contains given floating point range.
-
- @param rRange
- Input range.
-
- @return the closest B2DRange with integer coordinates,
- which completely contains rRange.
- */
- BASEGFX_DLLPUBLIC ::basegfx::B2DRange b2DSurroundingIntegerRangeFromB2DRange( const ::basegfx::B2DRange& rRange );
-
- }
-}
-
-#endif /* _BGFX_TOOLS_CANVASTOOLS_HXX */
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/inc/basegfx/tools/gradienttools.hxx b/basegfx/inc/basegfx/tools/gradienttools.hxx
deleted file mode 100644
index aa7479d2c369..000000000000
--- a/basegfx/inc/basegfx/tools/gradienttools.hxx
+++ /dev/null
@@ -1,405 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _BGFX_TOOLS_GRADIENTTOOLS_HXX
-#define _BGFX_TOOLS_GRADIENTTOOLS_HXX
-
-#include <basegfx/point/b2dpoint.hxx>
-#include <basegfx/range/b2drange.hxx>
-#include <basegfx/vector/b2dvector.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/numeric/ftools.hxx>
-#include <basegfx/basegfxdllapi.h>
-
-#include <vector>
-#include <algorithm>
-
-namespace basegfx
-{
- /** Gradient definition as used in ODF 1.2
-
- This struct collects all data necessary for rendering ODF
- 1.2-compatible gradients. Use the createXXXODFGradientInfo()
- methods below for initializing from ODF attributes.
- */
- struct BASEGFX_DLLPUBLIC ODFGradientInfo
- {
- /** transformation mapping from [0,1]^2 texture coordinate
- space to [0,1]^2 shape coordinate space
- */
- B2DHomMatrix maTextureTransform;
-
- /** transformation mapping from [0,1]^2 shape coordinate space
- to [0,1]^2 texture coordinate space. This is the
- transformation commonly used to create gradients from a
- scanline rasterizer (put shape u/v coordinates into it, get
- texture s/t coordinates out of it)
- */
- B2DHomMatrix maBackTextureTransform;
-
- /** Aspect ratio of the gradient. Only used in drawinglayer
- for generating nested gradient polygons currently. Already
- catered for in the transformations above.
- */
- double mfAspectRatio;
-
- /** Requested gradient steps to render. See the
- implementations of the getXXXGradientAlpha() methods below,
- the semantic differs slightly for the different gradient
- types.
- */
- sal_uInt32 mnSteps;
- };
-
- namespace tools
- {
- /** Create matrix for ODF's linear gradient definition
-
- Note that odf linear gradients are varying in y direction.
-
- @param o_rGradientInfo
- Receives the calculated texture transformation matrix (for
- use with standard [0,1]x[0,1] texture coordinates)
-
- @param rTargetArea
- Output area, needed for aspect ratio calculations and
- texture transformation
-
- @param nSteps
- Number of gradient steps (from ODF)
-
- @param fBorder
- Width of gradient border (from ODF)
-
- @param fAngle
- Gradient angle (from ODF)
- */
- BASEGFX_DLLPUBLIC ODFGradientInfo& createLinearODFGradientInfo(ODFGradientInfo& o_rGradientInfo,
- const B2DRange& rTargetArea,
- sal_uInt32 nSteps,
- double fBorder,
- double fAngle);
-
- /** Calculate linear gradient blend value
-
- This method generates you the lerp alpha value for
- blending linearly between gradient start and end color,
- according to the formula (startCol*(1.0-alpha) + endCol*alpha)
-
- @param rUV
- Current uv coordinate. Values outside [0,1] will be
- clamped. Assumes gradient color varies along the y axis.
-
- @param rGradInfo
- Gradient info, for transformation and number of steps
- */
- inline double getLinearGradientAlpha(const B2DPoint& rUV,
- const ODFGradientInfo& rGradInfo )
- {
- const B2DPoint aCoor(rGradInfo.maBackTextureTransform * rUV);
- const double t(clamp(aCoor.getY(), 0.0, 1.0));
- const sal_uInt32 nSteps(rGradInfo.mnSteps);
-
- if(nSteps > 2L && nSteps < 128L)
- return floor(t * nSteps) / double(nSteps + 1L);
-
- return t;
- }
-
- /** Create matrix for ODF's axial gradient definition
-
- Note that odf axial gradients are varying in y
- direction. Note further that you can map the axial
- gradient to a linear gradient (in case you want or need to
- avoid an extra gradient renderer), by using
- createLinearODFGradientInfo() instead, shifting the
- resulting texture transformation by 0.5 to the top and
- appending the same stop colors again, but mirrored.
-
- @param o_rGradientInfo
- Receives the calculated texture transformation matrix (for
- use with standard [0,1]x[0,1] texture coordinates)
-
- @param rTargetArea
- Output area, needed for aspect ratio calculations and
- texture transformation
-
- @param nSteps
- Number of gradient steps (from ODF)
-
- @param fBorder
- Width of gradient border (from ODF)
-
- @param fAngle
- Gradient angle (from ODF)
- */
- BASEGFX_DLLPUBLIC ODFGradientInfo& createAxialODFGradientInfo(ODFGradientInfo& o_rGradientInfo,
- const B2DRange& rTargetArea,
- sal_uInt32 nSteps,
- double fBorder,
- double fAngle);
-
- /** Calculate axial gradient blend value
-
- This method generates you the lerp alpha value for
- blending linearly between gradient start and end color,
- according to the formula (startCol*(1.0-alpha) + endCol*alpha)
-
- @param rUV
- Current uv coordinate. Values outside [0,1] will be
- clamped. Assumes gradient color varies along the y axis.
-
- @param rGradInfo
- Gradient info, for transformation and number of steps
- */
- inline double getAxialGradientAlpha(const B2DPoint& rUV,
- const ODFGradientInfo& rGradInfo )
- {
- const B2DPoint aCoor(rGradInfo.maBackTextureTransform * rUV);
- const double t(clamp(fabs(aCoor.getY()), 0.0, 1.0));
- const sal_uInt32 nSteps(rGradInfo.mnSteps);
- const double fInternalSteps((nSteps * 2L) - 1L);
-
- if(nSteps > 2L && nSteps < 128L)
- return floor(((t * fInternalSteps) + 1.0) / 2.0) / double(nSteps - 1L);
-
- return t;
- }
-
- /** Create matrix for ODF's radial gradient definition
-
- @param o_rGradientInfo
- Receives the calculated texture transformation matrix (for
- use with standard [0,1]x[0,1] texture coordinates)
-
- @param rTargetArea
- Output area, needed for aspect ratio calculations and
- texture transformation
-
- @param rOffset
- Gradient offset value (from ODF)
-
- @param nSteps
- Number of gradient steps (from ODF)
-
- @param fBorder
- Width of gradient border (from ODF)
-
- @param fAngle
- Gradient angle (from ODF)
- */
- BASEGFX_DLLPUBLIC ODFGradientInfo& createRadialODFGradientInfo(ODFGradientInfo& o_rGradientInfo,
- const B2DRange& rTargetArea,
- const B2DVector& rOffset,
- sal_uInt32 nSteps,
- double fBorder);
-
- /** Calculate radial gradient blend value
-
- This method generates you the lerp alpha value for
- blending linearly between gradient start and end color,
- according to the formula (startCol*(1.0-alpha) + endCol*alpha)
-
- @param rUV
- Current uv coordinate. Values outside [0,1] will be
- clamped.
-
- @param rGradInfo
- Gradient info, for transformation and number of steps
- */
- inline double getRadialGradientAlpha(const B2DPoint& rUV,
- const ODFGradientInfo& rGradInfo )
- {
- const B2DPoint aCoor(rGradInfo.maBackTextureTransform * rUV);
- const double fDist(
- clamp(aCoor.getX() * aCoor.getX() + aCoor.getY() * aCoor.getY(),
- 0.0,
- 1.0));
-
- const double t(1.0 - sqrt(fDist));
- const sal_uInt32 nSteps(rGradInfo.mnSteps);
-
- if(nSteps > 2L && nSteps < 128L)
- return floor(t * nSteps) / double(nSteps - 1L);
-
- return t;
- }
-
- /** Create matrix for ODF's elliptical gradient definition
-
- @param o_rGradientInfo
- Receives the calculated texture transformation matrix (for
- use with standard [0,1]x[0,1] texture coordinates)
-
- @param rTargetArea
- Output area, needed for aspect ratio calculations and
- texture transformation
-
- @param rOffset
- Gradient offset value (from ODF)
-
- @param nSteps
- Number of gradient steps (from ODF)
-
- @param fBorder
- Width of gradient border (from ODF)
-
- @param fAngle
- Gradient angle (from ODF)
- */
- BASEGFX_DLLPUBLIC ODFGradientInfo& createEllipticalODFGradientInfo(ODFGradientInfo& o_rGradientInfo,
- const B2DRange& rTargetArea,
- const B2DVector& rOffset,
- sal_uInt32 nSteps,
- double fBorder,
- double fAngle);
-
- /** Calculate elliptical gradient blend value
-
- This method generates you the lerp alpha value for
- blending linearly between gradient start and end color,
- according to the formula (startCol*(1.0-alpha) + endCol*alpha)
-
- @param rUV
- Current uv coordinate. Values outside [0,1] will be
- clamped.
-
- @param rGradInfo
- Gradient info, for transformation and number of steps
- */
- inline double getEllipticalGradientAlpha(const B2DPoint& rUV,
- const ODFGradientInfo& rGradInfo )
- {
- return getRadialGradientAlpha(rUV,rGradInfo); // only matrix setup differs
- }
-
- /** Create matrix for ODF's square gradient definition
-
- @param o_rGradientInfo
- Receives the calculated texture transformation matrix (for
- use with standard [0,1]x[0,1] texture coordinates)
-
- @param rTargetArea
- Output area, needed for aspect ratio calculations and
- texture transformation
-
- @param rOffset
- Gradient offset value (from ODF)
-
- @param nSteps
- Number of gradient steps (from ODF)
-
- @param fBorder
- Width of gradient border (from ODF)
-
- @param fAngle
- Gradient angle (from ODF)
- */
- BASEGFX_DLLPUBLIC ODFGradientInfo& createSquareODFGradientInfo(ODFGradientInfo& o_rGradientInfo,
- const B2DRange& rTargetArea,
- const B2DVector& rOffset,
- sal_uInt32 nSteps,
- double fBorder,
- double fAngle);
-
- /** Calculate square gradient blend value
-
- This method generates you the lerp alpha value for
- blending linearly between gradient start and end color,
- according to the formula (startCol*(1.0-alpha) + endCol*alpha)
-
- @param rUV
- Current uv coordinate. Values outside [0,1] will be
- clamped.
-
- @param rGradInfo
- Gradient info, for transformation and number of steps
- */
- inline double getSquareGradientAlpha(const B2DPoint& rUV,
- const ODFGradientInfo& rGradInfo )
- {
- const B2DPoint aCoor(rGradInfo.maBackTextureTransform * rUV);
- const double fAbsX(fabs(aCoor.getX()));
- const double fAbsY(fabs(aCoor.getY()));
-
- if(fTools::moreOrEqual(fAbsX, 1.0) || fTools::moreOrEqual(fAbsY, 1.0))
- return 0.0;
-
- const double t(1.0 - (fAbsX > fAbsY ? fAbsX : fAbsY));
- const sal_uInt32 nSteps(rGradInfo.mnSteps);
-
- if(nSteps > 2L && nSteps < 128L)
- return floor(t * nSteps) / double(nSteps - 1L);
-
- return t;
- }
-
- /** Create matrix for ODF's rectangular gradient definition
-
- @param o_rGradientInfo
- Receives the calculated texture transformation matrix (for
- use with standard [0,1]x[0,1] texture coordinates)
-
- @param rTargetArea
- Output area, needed for aspect ratio calculations and
- texture transformation
-
- @param rOffset
- Gradient offset value (from ODF)
-
- @param nSteps
- Number of gradient steps (from ODF)
-
- @param fBorder
- Width of gradient border (from ODF)
-
- @param fAngle
- Gradient angle (from ODF)
- */
- BASEGFX_DLLPUBLIC ODFGradientInfo& createRectangularODFGradientInfo(ODFGradientInfo& o_rGradientInfo,
- const B2DRange& rTargetArea,
- const B2DVector& rOffset,
- sal_uInt32 nSteps,
- double fBorder,
- double fAngle);
-
- /** Calculate rectangular gradient blend value
-
- This method generates you the lerp alpha value for
- blending linearly between gradient start and end color,
- according to the formula (startCol*(1.0-alpha) + endCol*alpha)
-
- @param rUV
- Current uv coordinate. Values outside [0,1] will be
- clamped.
-
- @param rGradInfo
- Gradient info, for transformation and number of steps
- */
- inline double getRectangularGradientAlpha(const B2DPoint& rUV,
- const ODFGradientInfo& rGradInfo )
- {
- return getSquareGradientAlpha(rUV, rGradInfo); // only matrix setup differs
- }
- }
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/inc/basegfx/tools/keystoplerp.hxx b/basegfx/inc/basegfx/tools/keystoplerp.hxx
deleted file mode 100644
index 8d6d41af63d9..000000000000
--- a/basegfx/inc/basegfx/tools/keystoplerp.hxx
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _BGFX_TOOLS_KEYSTOPLERP_HXX
-#define _BGFX_TOOLS_KEYSTOPLERP_HXX
-
-#include <basegfx/numeric/ftools.hxx>
-#include <vector>
-#include <basegfx/basegfxdllapi.h>
-
-namespace com{ namespace sun{ namespace star{ namespace uno {
- template<typename T> class Sequence;
-}}}}
-
-namespace basegfx
-{
- namespace tools
- {
- /** Lerp in a vector of key stops
-
- This class holds a key stop vector and provides the
- functionality to lerp inside it. Useful e.g. for
- multi-stop gradients, or the SMIL key time activity.
-
- For those, given a global [0,1] lerp alpha, one need to
- find the suitable bucket index from key stop vector, and
- then calculate the relative alpha between the two buckets
- found.
- */
- class BASEGFX_DLLPUBLIC KeyStopLerp
- {
- public:
- typedef std::pair<std::ptrdiff_t,double> ResultType;
-
- /** Create lerper with given vector of stops
-
- @param rKeyStops
-
- Vector of stops, must contain at least two elements
- (though preferrably more, otherwise you probably don't
- need key stop lerping in the first place). All
- elements must be of monotonically increasing value.
- */
- explicit KeyStopLerp( const std::vector<double>& rKeyStops );
-
- /** Create lerper with given sequence of stops
-
- @param rKeyStops
-
- Sequence of stops, must contain at least two elements
- (though preferrably more, otherwise you probably don't
- need key stop lerping in the first place). All
- elements must be of monotonically increasing value.
- */
- explicit KeyStopLerp( const ::com::sun::star::uno::Sequence<double>& rKeyStops );
-
- /** Find two nearest bucket index & interpolate
-
- @param fAlpha
- Find bucket index i, with keyStops[i] < fAlpha <=
- keyStops[i+1]. Return new alpha value in [0,1),
- proportional to fAlpha's position between keyStops[i]
- and keyStops[i+1]
- */
- ResultType lerp(double fAlpha) const;
-
- private:
- std::vector<double> maKeyStops;
- mutable std::ptrdiff_t mnLastIndex;
- };
- }
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/inc/basegfx/tools/lerp.hxx b/basegfx/inc/basegfx/tools/lerp.hxx
deleted file mode 100644
index a0c0d714a295..000000000000
--- a/basegfx/inc/basegfx/tools/lerp.hxx
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _BGFX_TOOLS_LERP_HXX
-#define _BGFX_TOOLS_LERP_HXX
-
-#include <sal/types.h>
-
-namespace basegfx
-{
- namespace tools
- {
- /** Generic linear interpolator
-
- @tpl ValueType
- Must have operator+ and operator* defined, and should
- have value semantics.
-
- @param t
- As usual, t must be in the [0,1] range
- */
- template< typename ValueType > ValueType lerp( const ValueType& rFrom,
- const ValueType& rTo,
- double t )
- {
- // This is only to suppress a double->int warning. All other
- // types should be okay here.
- return static_cast<ValueType>( (1.0-t)*rFrom + t*rTo );
- }
- }
-}
-
-#endif /* _BGFX_TOOLS_LERP_HXX */
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/inc/basegfx/tools/rectcliptools.hxx b/basegfx/inc/basegfx/tools/rectcliptools.hxx
deleted file mode 100644
index 3d5f77e18e0e..000000000000
--- a/basegfx/inc/basegfx/tools/rectcliptools.hxx
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _BGFX_TOOLS_RECTCLIPTOOLS_HXX
-#define _BGFX_TOOLS_RECTCLIPTOOLS_HXX
-
-#include <sal/types.h>
-#include <basegfx/range/b2ibox.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace basegfx
-{
- namespace tools
- {
- namespace RectClipFlags
- {
- static const sal_uInt32 LEFT = (sal_Int32)0x01;
- static const sal_uInt32 RIGHT = (sal_Int32)0x02;
- static const sal_uInt32 TOP = (sal_Int32)0x04;
- static const sal_uInt32 BOTTOM = (sal_Int32)0x08;
- }
-
- /** Calc clip mask for Cohen-Sutherland rectangle clip
-
- This function returns a clip mask used for the
- Cohen-Sutherland rectangle clip method, where one or more
- of the lower four bits are set, if the given point is
- outside one or more of the four half planes defining the
- rectangle (see RectClipFlags for possible values)
- */
- template< class Point, class Rect > inline
- sal_uInt32 getCohenSutherlandClipFlags( const Point& rP,
- const Rect& rR )
- {
- // maxY | minY | maxX | minX
- sal_uInt32 clip = (rP.getX() < rR.getMinX()) << 0;
- clip |= (rP.getX() > rR.getMaxX()) << 1;
- clip |= (rP.getY() < rR.getMinY()) << 2;
- clip |= (rP.getY() > rR.getMaxY()) << 3;
- return clip;
- }
-
- /// Cohen-Sutherland mask calculation - overload for boxes.
- template< class Point > inline
- sal_uInt32 getCohenSutherlandClipFlags( const Point& rP,
- const B2IBox& rB )
- {
- // maxY | minY | maxX | minX
- sal_uInt32 clip = (rP.getX() < rB.getMinX()) << 0;
- clip |= (rP.getX() >= rB.getMaxX()) << 1;
- clip |= (rP.getY() < rB.getMinY()) << 2;
- clip |= (rP.getY() >= rB.getMaxY()) << 3;
- return clip;
- }
-
- /** Determine number of clip planes hit by given clip mask
-
- This method returns the number of one bits in the four
- least significant bits of the argument, which amounts to
- the number of clip planes hit within the
- getCohenSutherlandClipFlags() method.
- */
- inline sal_uInt32 getNumberOfClipPlanes( sal_uInt32 nFlags )
- {
- // classic bit count algo, see e.g. Reingold, Nievergelt,
- // Deo: Combinatorial Algorithms, Theory and Practice,
- // Prentice-Hall 1977
- nFlags = (nFlags & 0x05) + ((nFlags >> 1) & 0x05);
- nFlags = (nFlags & 0x03) + (nFlags >> 2); // no need for &
- // 0x03, can't
- // overflow
- return nFlags;
- }
- }
-}
-
-#endif // _BGFX_TOOLS_RECTCLIPTOOLS_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/inc/basegfx/tools/tools.hxx b/basegfx/inc/basegfx/tools/tools.hxx
deleted file mode 100644
index c1fa0940ae35..000000000000
--- a/basegfx/inc/basegfx/tools/tools.hxx
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _BGFX_TOOLS_TOOLS_HXX
-#define _BGFX_TOOLS_TOOLS_HXX
-
-#include <sal/types.h>
-#include <basegfx/basegfxdllapi.h>
-
-namespace basegfx
-{
- class B2DPoint;
- class B2DRange;
-
- namespace tools
- {
- /** Expand given parallelogram, such that it extends beyond
- bound rect in a given direction.
-
- This method is useful when e.g. generating one-dimensional
- gradients, such as linear or axial gradients: those
- gradients vary only in one direction, the other has
- constant color. Most of the time, those gradients extends
- infinitely in the direction with the constant color, but
- practically, one always has a limiting bound rect into
- which the gradient is painted. The method at hand now
- extends a given parallelogram (e.g. the transformed
- bounding box of a gradient) virtually into infinity to the
- top and to the bottom (i.e. normal to the line io_rLeftTop
- io_rRightTop), such that the given rectangle is guaranteed
- to be covered in that direction.
-
- @attention There might be some peculiarities with this
- method, that might limit its usage to the described
- gradients. One of them is the fact that when determining
- how far the parallelogram has to be extended to the top or
- the bottom, the upper and lower border are assumed to be
- infinite lines.
-
- @param io_rLeftTop
- Left, top edge of the parallelogramm. Note that this need
- not be the left, top edge geometrically, it's just used
- when determining the extension direction. Thus, it's
- perfectly legal to affine-transform a rectangle, and given
- the transformed point here. On method return, this
- parameter will contain the adapted output.
-
- @param io_rLeftBottom
- Left, bottom edge of the parallelogramm. Note that this need
- not be the left, bottom edge geometrically, it's just used
- when determining the extension direction. Thus, it's
- perfectly legal to affine-transform a rectangle, and given
- the transformed point here. On method return, this
- parameter will contain the adapted output.
-
- @param io_rRightTop
- Right, top edge of the parallelogramm. Note that this need
- not be the right, top edge geometrically, it's just used
- when determining the extension direction. Thus, it's
- perfectly legal to affine-transform a rectangle, and given
- the transformed point here. On method return, this
- parameter will contain the adapted output.
-
- @param io_rRightBottom
- Right, bottom edge of the parallelogramm. Note that this need
- not be the right, bottom edge geometrically, it's just used
- when determining the extension direction. Thus, it's
- perfectly legal to affine-transform a rectangle, and given
- the transformed point here. On method return, this
- parameter will contain the adapted output.
-
- @param rFitTarget
- The rectangle to fit the parallelogram into.
- */
- BASEGFX_DLLPUBLIC void infiniteLineFromParallelogram( ::basegfx::B2DPoint& io_rLeftTop,
- ::basegfx::B2DPoint& io_rLeftBottom,
- ::basegfx::B2DPoint& io_rRightTop,
- ::basegfx::B2DPoint& io_rRightBottom,
- const ::basegfx::B2DRange& rFitTarget );
-
- }
-}
-
-#endif /* _BGFX_TOOLS_TOOLS_HXX */
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/inc/basegfx/tools/unopolypolygon.hxx b/basegfx/inc/basegfx/tools/unopolypolygon.hxx
deleted file mode 100644
index 72ed9418663a..000000000000
--- a/basegfx/inc/basegfx/tools/unopolypolygon.hxx
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_BASEGFX_UNOPOLYPOLYGON_HXX
-#define INCLUDED_BASEGFX_UNOPOLYPOLYGON_HXX
-
-#include <cppuhelper/basemutex.hxx>
-#include <cppuhelper/compbase3.hxx>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/rendering/FillRule.hpp>
-#include <com/sun/star/rendering/XLinePolyPolygon2D.hpp>
-#include <com/sun/star/rendering/XBezierPolyPolygon2D.hpp>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <basegfx/basegfxdllapi.h>
-#include <boost/utility.hpp>
-
-
-namespace basegfx
-{
-namespace unotools
-{
- typedef ::cppu::WeakComponentImplHelper3<
- ::com::sun::star::rendering::XLinePolyPolygon2D,
- ::com::sun::star::rendering::XBezierPolyPolygon2D,
- ::com::sun::star::lang::XServiceInfo > UnoPolyPolygonBase;
-
- class BASEGFX_DLLPUBLIC UnoPolyPolygon
- : private cppu::BaseMutex
- , private boost::noncopyable
- , public UnoPolyPolygonBase
- {
- public:
- explicit UnoPolyPolygon( const B2DPolyPolygon& );
-
- // XPolyPolygon2D
- virtual void SAL_CALL addPolyPolygon( const ::com::sun::star::geometry::RealPoint2D& position, const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& polyPolygon ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getNumberOfPolygons( ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getNumberOfPolygonPoints( ::sal_Int32 polygon ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::rendering::FillRule SAL_CALL getFillRule( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setFillRule( ::com::sun::star::rendering::FillRule fillRule ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Bool SAL_CALL isClosed( ::sal_Int32 index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setClosed( ::sal_Int32 index, ::sal_Bool closedState ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-
- // XLinePolyPolygon2D
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > > SAL_CALL getPoints( ::sal_Int32 nPolygonIndex, ::sal_Int32 nNumberOfPolygons, ::sal_Int32 nPointIndex, ::sal_Int32 nNumberOfPoints ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPoints( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > >& points, ::sal_Int32 nPolygonIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::geometry::RealPoint2D SAL_CALL getPoint( ::sal_Int32 nPolygonIndex, ::sal_Int32 nPointIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPoint( const ::com::sun::star::geometry::RealPoint2D& point, ::sal_Int32 nPolygonIndex, ::sal_Int32 nPointIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-
- // XBezierPolyPolygon2D
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealBezierSegment2D > > SAL_CALL getBezierSegments( ::sal_Int32 nPolygonIndex, ::sal_Int32 nNumberOfPolygons, ::sal_Int32 nPointIndex, ::sal_Int32 nNumberOfPoints ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setBezierSegments( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealBezierSegment2D > >& points, ::sal_Int32 nPolygonIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::geometry::RealBezierSegment2D SAL_CALL getBezierSegment( ::sal_Int32 nPolygonIndex, ::sal_Int32 nPointIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setBezierSegment( const ::com::sun::star::geometry::RealBezierSegment2D& point, ::sal_Int32 nPolygonIndex, ::sal_Int32 nPointIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
-
- B2DPolyPolygon getPolyPolygon() const;
-
- protected:
- /// Check whether index is a valid polygon index
- void checkIndex( sal_Int32 nIndex ) const // throw (::com::sun::star::lang::IndexOutOfBoundsException);
- {
- if( nIndex < 0 || nIndex >= static_cast<sal_Int32>(maPolyPoly.count()) )
- throw ::com::sun::star::lang::IndexOutOfBoundsException();
- }
-
- B2DPolyPolygon getSubsetPolyPolygon( sal_Int32 nPolygonIndex,
- sal_Int32 nNumberOfPolygons,
- sal_Int32 nPointIndex,
- sal_Int32 nNumberOfPoints ) const;
-
- /// Get cow copy of internal polygon. not thread-safe outside this object.
- B2DPolyPolygon getPolyPolygonUnsafe() const
- {
- return maPolyPoly;
- }
-
- /// Called whenever internal polypolygon gets modified
- virtual void modifying() const {}
-
- private:
- B2DPolyPolygon maPolyPoly;
- ::com::sun::star::rendering::FillRule meFillRule;
- };
-}
-}
-
-#endif /* INCLUDED_BASEGFX_UNOPOLYPOLYGON_HXX */
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/inc/basegfx/tools/unotools.hxx b/basegfx/inc/basegfx/tools/unotools.hxx
deleted file mode 100644
index c95eb5361f5c..000000000000
--- a/basegfx/inc/basegfx/tools/unotools.hxx
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef INCLUDED_BASEGFX_UNOTOOLS_HXX
-#define INCLUDED_BASEGFX_UNOTOOLS_HXX
-
-#include <cppuhelper/basemutex.hxx>
-#include <cppuhelper/compbase3.hxx>
-#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/rendering/FillRule.hpp>
-#include <com/sun/star/rendering/XLinePolyPolygon2D.hpp>
-#include <com/sun/star/rendering/XBezierPolyPolygon2D.hpp>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-
-
-namespace basegfx
-{
-class B2DPolyPolygon;
-
-namespace unotools
-{
-
- BASEGFX_DLLPUBLIC B2DPolyPolygon polyPolygonBezierToB2DPolyPolygon(const ::com::sun::star::drawing::PolyPolygonBezierCoords& rSourcePolyPolygon)
- throw( ::com::sun::star::lang::IllegalArgumentException );
-
- BASEGFX_DLLPUBLIC void b2DPolyPolygonToPolyPolygonBezier( const B2DPolyPolygon& rPolyPoly,
- ::com::sun::star::drawing::PolyPolygonBezierCoords& rRetval );
-}
-}
-
-#endif /* INCLUDED_BASEGFX_UNOTOOLS_HXX */
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/inc/basegfx/tools/zoomtools.hxx b/basegfx/inc/basegfx/tools/zoomtools.hxx
deleted file mode 100644
index 44d9052a2552..000000000000
--- a/basegfx/inc/basegfx/tools/zoomtools.hxx
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License or as specified alternatively below. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * Major Contributor(s):
- * Copyright (C) 2012 Tim Hardeck <thardeck@suse.com>
- *
- * All Rights Reserved.
- *
- * For minor contributions see the git repository.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
- * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
- * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
- * instead of those above.
- */
-
-#ifndef _BGFX_TOOLS_ZOOMTOOLS_HXX
-#define _BGFX_TOOLS_ZOOMTOOLS_HXX
-
-#include <sal/types.h>
-#include <basegfx/basegfxdllapi.h>
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace basegfx
-{
- /** This namespace provides functions for optimized geometric zooming
- */
- namespace zoomtools
- {
- BASEGFX_DLLPUBLIC long zoomOut(long nCurrent);
- BASEGFX_DLLPUBLIC long zoomIn(long nCurrent);
- }
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */