diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-09-22 14:12:07 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2017-09-26 14:18:41 +0200 |
commit | 8e7897588d7185ef1964e8120669c1de3d1ce734 (patch) | |
tree | 8f48598670a5dc22703371943c05789d60b9a07d /slideshow | |
parent | 0b4135ec9945ea627318ecf5fccc4b7d0940ff0d (diff) |
Rename the basegfx::tools namespace to basegfx::utils
Reduce potential confusion with the global tools namespace. Will
hopefully make it possible to remove the annoying initial :: when
referring to the global tools namespace. Unless we have even more
tools subnamespaces somewhere.
Thorsten said it was OK.
Change-Id: Id088dfe8f4244cb79df9aa988995b31a1758c996
Reviewed-on: https://gerrit.libreoffice.org/42644
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'slideshow')
34 files changed, 91 insertions, 91 deletions
diff --git a/slideshow/inc/pch/precompiled_slideshow.hxx b/slideshow/inc/pch/precompiled_slideshow.hxx index bea7b8f63a5c..a906763d239d 100644 --- a/slideshow/inc/pch/precompiled_slideshow.hxx +++ b/slideshow/inc/pch/precompiled_slideshow.hxx @@ -159,11 +159,11 @@ #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/range/b2drange.hxx> #include <basegfx/range/basicrange.hxx> -#include <basegfx/tools/canvastools.hxx> #include <basegfx/tuple/b2dtuple.hxx> #include <basegfx/tuple/b2i64tuple.hxx> #include <basegfx/tuple/b2ituple.hxx> #include <basegfx/tuple/b3dtuple.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/vector/b2dsize.hxx> #include <basegfx/vector/b2dvector.hxx> #include <basegfx/vector/b2enums.hxx> diff --git a/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx b/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx index 66271718f36e..abf943ce4597 100644 --- a/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx +++ b/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx @@ -22,7 +22,7 @@ #include "simplecontinuousactivitybase.hxx" -#include <basegfx/tools/keystoplerp.hxx> +#include <basegfx/utils/keystoplerp.hxx> #include <vector> @@ -67,7 +67,7 @@ namespace slideshow sal_uInt32 nRepeatCount ) const override; private: - const ::basegfx::tools::KeyStopLerp maLerper; + const ::basegfx::utils::KeyStopLerp maLerper; }; } } diff --git a/slideshow/source/engine/activities/interpolation.hxx b/slideshow/source/engine/activities/interpolation.hxx index 2418f59c6d10..6da629695eed 100644 --- a/slideshow/source/engine/activities/interpolation.hxx +++ b/slideshow/source/engine/activities/interpolation.hxx @@ -20,11 +20,11 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_ACTIVITIES_INTERPOLATION_HXX #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_ACTIVITIES_INTERPOLATION_HXX -#include <basegfx/tools/lerp.hxx> +#include <basegfx/utils/lerp.hxx> namespace basegfx { - namespace tools + namespace utils { // Interpolator specializations // ============================ @@ -81,7 +81,7 @@ namespace slideshow const ValueType& rTo, double t ) const { - return basegfx::tools::lerp( rFrom, rTo, t ); + return basegfx::utils::lerp( rFrom, rTo, t ); } }; diff --git a/slideshow/source/engine/animationfactory.cxx b/slideshow/source/engine/animationfactory.cxx index 607e79b973af..1d666629302c 100644 --- a/slideshow/source/engine/animationfactory.cxx +++ b/slideshow/source/engine/animationfactory.cxx @@ -223,7 +223,7 @@ namespace slideshow ::basegfx::B2DPolyPolygon aPolyPoly; - ENSURE_OR_THROW( ::basegfx::tools::importFromSvgD( aPolyPoly, rSVGDPath, false, nullptr ), + ENSURE_OR_THROW( ::basegfx::utils::importFromSvgD( aPolyPoly, rSVGDPath, false, nullptr ), "PathAnimation::PathAnimation(): failed to parse SVG:d path" ); ENSURE_OR_THROW( aPolyPoly.count() == 1, "PathAnimation::PathAnimation(): motion path consists of multiple/zero polygon(s)" ); @@ -231,7 +231,7 @@ namespace slideshow // TODO(F2): Since getPositionRelative() currently // cannot handle beziers, have to subdivide. // AW: Should be no longer necessary; getPositionRelative is now bezier-safe - maPathPoly = ::basegfx::tools::adaptiveSubdivideByAngle(aPolyPoly.getB2DPolygon(0) ); + maPathPoly = ::basegfx::utils::adaptiveSubdivideByAngle(aPolyPoly.getB2DPolygon(0) ); } virtual ~PathAnimation() override @@ -302,7 +302,7 @@ namespace slideshow ENSURE_OR_RETURN_FALSE( mpAttrLayer && mpShape, "PathAnimation::operator(): Invalid ShapeAttributeLayer" ); - ::basegfx::B2DPoint rOutPos = ::basegfx::tools::getPositionRelative( maPathPoly, + ::basegfx::B2DPoint rOutPos = ::basegfx::utils::getPositionRelative( maPathPoly, nValue ); // TODO(F1): Determine whether the path is diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx index 00d6925becc1..bff671de8804 100644 --- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx +++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx @@ -639,7 +639,7 @@ void ActivityImpl::updateShapeAttributes( } basegfx::B2DPolygon clipPoly( - basegfx::tools::createPolygonFromRect( + basegfx::utils::createPolygonFromRect( basegfx::B2DRectangle( clipPos.getX(), clipPos.getY(), clipPos.getX() + fScrollWidth, diff --git a/slideshow/source/engine/shapes/viewappletshape.cxx b/slideshow/source/engine/shapes/viewappletshape.cxx index d7a9b8a41644..58ef4c8cdff2 100644 --- a/slideshow/source/engine/shapes/viewappletshape.cxx +++ b/slideshow/source/engine/shapes/viewappletshape.cxx @@ -25,7 +25,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/range/b2irange.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <cppcanvas/spritecanvas.hxx> #include <canvas/canvastools.hxx> diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.cxx b/slideshow/source/engine/shapes/viewbackgroundshape.cxx index c2a3d533b18c..10e5d2c4eb6a 100644 --- a/slideshow/source/engine/shapes/viewbackgroundshape.cxx +++ b/slideshow/source/engine/shapes/viewbackgroundshape.cxx @@ -105,7 +105,7 @@ namespace slideshow aLinearTransform.set( 1, 2, 0.0 ); pBitmapCanvas->setTransformation( aLinearTransform ); - const basegfx::B2DHomMatrix aShapeTransform(basegfx::tools::createScaleTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aShapeTransform(basegfx::utils::createScaleTranslateB2DHomMatrix( maBounds.getWidth(), maBounds.getHeight(), maBounds.getMinX(), maBounds.getMinY())); diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index d08933acc0e1..a518fdae5780 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -32,7 +32,7 @@ #include <vcl/window.hxx> #include <vcl/graph.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/polygon/b2dpolygon.hxx> @@ -198,7 +198,7 @@ namespace slideshow const ::basegfx::B2DVector aScale( rBounds.getWidth() / aBmpSize.Width(), rBounds.getHeight() / aBmpSize.Height() ); - const basegfx::B2DHomMatrix aTranslation(basegfx::tools::createScaleTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aTranslation(basegfx::utils::createScaleTranslateB2DHomMatrix( aScale, rBounds.getMinimum())); ::canvas::tools::setRenderStateTransform( aRenderState, aTranslation ); diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx index c88d4e85617f..05f9fb534e7e 100644 --- a/slideshow/source/engine/shapes/viewshape.cxx +++ b/slideshow/source/engine/shapes/viewshape.cxx @@ -683,7 +683,7 @@ namespace slideshow aBitmapTransform.invert(); - const basegfx::B2DHomMatrix aTranslation(basegfx::tools::createTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aTranslation(basegfx::utils::createTranslateB2DHomMatrix( aTmpRect.getMinX(), aTmpRect.getMinY())); aBitmapTransform = aBitmapTransform * aTranslation; diff --git a/slideshow/source/engine/slide/layer.cxx b/slideshow/source/engine/slide/layer.cxx index dd2da81ba1e0..5e5008f942ec 100644 --- a/slideshow/source/engine/slide/layer.cxx +++ b/slideshow/source/engine/slide/layer.cxx @@ -215,8 +215,8 @@ namespace slideshow // clipping, and render each shape that intersects with // the calculated update area ::basegfx::B2DPolyPolygon aClip( maUpdateAreas.solveCrossovers() ); - aClip = ::basegfx::tools::stripNeutralPolygons(aClip); - aClip = ::basegfx::tools::stripDispensablePolygons(aClip); + aClip = ::basegfx::utils::stripNeutralPolygons(aClip); + aClip = ::basegfx::utils::stripDispensablePolygons(aClip); // actually, if there happen to be shapes with zero // update area in the maUpdateAreas vector, the diff --git a/slideshow/source/engine/slidebitmap.cxx b/slideshow/source/engine/slidebitmap.cxx index 3dd5a329b022..2accdd74dcb2 100644 --- a/slideshow/source/engine/slidebitmap.cxx +++ b/slideshow/source/engine/slidebitmap.cxx @@ -30,7 +30,7 @@ #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <canvas/canvastools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> using namespace ::com::sun::star; @@ -64,7 +64,7 @@ namespace slideshow rendering::RenderState aRenderState; ::canvas::tools::initRenderState( aRenderState ); - const basegfx::B2DHomMatrix aTranslation(basegfx::tools::createTranslateB2DHomMatrix(maOutputPos)); + const basegfx::B2DHomMatrix aTranslation(basegfx::utils::createTranslateB2DHomMatrix(maOutputPos)); ::canvas::tools::setRenderStateTransform( aRenderState, aTranslation ); try diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 2aa66dc29c1d..fc54b5eecce2 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -44,7 +44,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <vcl/font.hxx> #include "rtl/ref.hxx" diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx index 703c1a5d92a7..6ebe350b9c9c 100644 --- a/slideshow/source/engine/slideview.cxx +++ b/slideshow/source/engine/slideview.cxx @@ -45,7 +45,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b2dpolygonclipper.hxx> #include <basegfx/polygon/b2dpolypolygoncutter.hxx> @@ -117,11 +117,11 @@ basegfx::B2DPolyPolygon createClipPolygon( const basegfx::B2DPolyPolygon& rCl if(rClip.count()) { - return basegfx::tools::clipPolyPolygonOnRange(rClip, aClipRange, true, false); + return basegfx::utils::clipPolyPolygonOnRange(rClip, aClipRange, true, false); } else { - return basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(aClipRange)); + return basegfx::B2DPolyPolygon(basegfx::utils::createPolygonFromRect(aClipRange)); } } @@ -139,14 +139,14 @@ basegfx::B2DPolyPolygon prepareClip( const basegfx::B2DPolyPolygon& rClip ) // TODO(P2): unnecessary, once XCanvas is correctly handling this // AW: Should be no longer necessary; tools are now bezier-safe if( aClip.areControlPointsUsed() ) - aClip = basegfx::tools::adaptiveSubdivideByAngle( aClip ); + aClip = basegfx::utils::adaptiveSubdivideByAngle( aClip ); // normalize polygon, preparation for clipping // in updateCanvas() - aClip = basegfx::tools::correctOrientations(aClip); - aClip = basegfx::tools::solveCrossovers(aClip); - aClip = basegfx::tools::stripNeutralPolygons(aClip); - aClip = basegfx::tools::stripDispensablePolygons(aClip); + aClip = basegfx::utils::correctOrientations(aClip); + aClip = basegfx::utils::solveCrossovers(aClip); + aClip = basegfx::utils::stripNeutralPolygons(aClip); + aClip = basegfx::utils::stripDispensablePolygons(aClip); return aClip; } @@ -173,7 +173,7 @@ void clearRect( ::cppcanvas::CanvasSharedPtr const& pCanvas, // depending on the slide content a one pixel wide // line will show to the bottom and the right. const ::basegfx::B2DPolygon aPoly( - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( basegfx::B2DRange(rArea))); ::cppcanvas::PolyPolygonSharedPtr pPolyPoly( diff --git a/slideshow/source/engine/tools.cxx b/slideshow/source/engine/tools.cxx index 3061dc485ef7..eaac078f459e 100644 --- a/slideshow/source/engine/tools.cxx +++ b/slideshow/source/engine/tools.cxx @@ -37,7 +37,7 @@ #include <basegfx/vector/b2ivector.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/numeric/ftools.hxx> -#include <basegfx/tools/lerp.hxx> +#include <basegfx/utils/lerp.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <cppcanvas/basegfxfactory.hxx> @@ -464,7 +464,7 @@ namespace slideshow { if( !pAttr ) { - const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix aTransform(basegfx::utils::createScaleTranslateB2DHomMatrix( rShapeBounds.getWidth(), rShapeBounds.getHeight(), rShapeBounds.getMinX(), rShapeBounds.getMinY())); @@ -580,16 +580,16 @@ namespace slideshow const ::basegfx::B2DRange& rShapeBounds ) { return ::basegfx::B2DRectangle( - basegfx::tools::lerp( rShapeBounds.getMinX(), + basegfx::utils::lerp( rShapeBounds.getMinX(), rShapeBounds.getMaxX(), rUnitBounds.getMinX() ), - basegfx::tools::lerp( rShapeBounds.getMinY(), + basegfx::utils::lerp( rShapeBounds.getMinY(), rShapeBounds.getMaxY(), rUnitBounds.getMinY() ), - basegfx::tools::lerp( rShapeBounds.getMinX(), + basegfx::utils::lerp( rShapeBounds.getMinX(), rShapeBounds.getMaxX(), rUnitBounds.getMaxX() ), - basegfx::tools::lerp( rShapeBounds.getMinY(), + basegfx::utils::lerp( rShapeBounds.getMinY(), rShapeBounds.getMaxY(), rUnitBounds.getMaxY() ) ); } @@ -665,7 +665,7 @@ namespace slideshow ::cppcanvas::Color::IntSRGBA aFillColor ) { const ::basegfx::B2DPolygon aPoly( - ::basegfx::tools::createPolygonFromRect( rRect )); + ::basegfx::utils::createPolygonFromRect( rRect )); ::cppcanvas::PolyPolygonSharedPtr pPolyPoly( ::cppcanvas::BaseGfxFactory::createPolyPolygon( rCanvas, aPoly ) ); diff --git a/slideshow/source/engine/transitions/barndoorwipe.cxx b/slideshow/source/engine/transitions/barndoorwipe.cxx index a2896b3b59a5..ffe799dd1bb3 100644 --- a/slideshow/source/engine/transitions/barndoorwipe.cxx +++ b/slideshow/source/engine/transitions/barndoorwipe.cxx @@ -32,7 +32,7 @@ namespace internal { if (m_doubled) t /= 2.0; - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); + basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5)); aTransform.scale( ::basegfx::pruneScaleValue(t), 1.0 ); aTransform.translate( 0.5, 0.5 ); ::basegfx::B2DPolygon poly( m_unitRect ); @@ -40,7 +40,7 @@ namespace internal { ::basegfx::B2DPolyPolygon res(poly); if (m_doubled) { - aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); + aTransform = basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5); aTransform.rotate( M_PI_2 ); aTransform.translate( 0.5, 0.5 ); poly.transform( aTransform ); diff --git a/slideshow/source/engine/transitions/clippingfunctor.cxx b/slideshow/source/engine/transitions/clippingfunctor.cxx index b7e9384a56a4..57fcc38a207e 100644 --- a/slideshow/source/engine/transitions/clippingfunctor.cxx +++ b/slideshow/source/engine/transitions/clippingfunctor.cxx @@ -110,18 +110,18 @@ namespace slideshow break; case TransitionInfo::ReverseMethod::Rotate180: - maStaticTransformation = basegfx::tools::createRotateAroundPoint(0.5, 0.5, M_PI) + maStaticTransformation = basegfx::utils::createRotateAroundPoint(0.5, 0.5, M_PI) * maStaticTransformation; break; case TransitionInfo::ReverseMethod::FlipX: - maStaticTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix(-1.0, 1.0, 1.0, 0.0) + maStaticTransformation = basegfx::utils::createScaleTranslateB2DHomMatrix(-1.0, 1.0, 1.0, 0.0) * maStaticTransformation; mbFlip = true; break; case TransitionInfo::ReverseMethod::FlipY: - maStaticTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix(1.0, -1.0, 0.0, 1.0) + maStaticTransformation = basegfx::utils::createScaleTranslateB2DHomMatrix(1.0, -1.0, 0.0, 1.0) * maStaticTransformation; mbFlip = true; break; @@ -160,7 +160,7 @@ namespace slideshow // currently, clipper cannot cope with curves. Subdivide first // AW: Should be no longer necessary; clipping tools are now bezier-safe // if( aClipPoly.areControlPointsUsed() ) - // aClipPoly = ::basegfx::tools::adaptiveSubdivideByAngle(aClipPoly); + // aClipPoly = ::basegfx::utils::adaptiveSubdivideByAngle(aClipPoly); if( mbSubtractPolygon ) { @@ -178,16 +178,16 @@ namespace slideshow if(aBackgroundRange.isInside(aClipPolyRange)) { // combine polygons; make the clip polygon the hole - aClipPoly = ::basegfx::tools::correctOrientations(aClipPoly); + aClipPoly = ::basegfx::utils::correctOrientations(aClipPoly); aClipPoly.flip(); - aClipPoly.insert(0, basegfx::tools::createPolygonFromRect(aBackgroundRange)); + aClipPoly.insert(0, basegfx::utils::createPolygonFromRect(aBackgroundRange)); } else { // when not completely inside aBackgroundRange clipping is needed // subtract aClipPoly from aBackgroundRange - const basegfx::B2DPolyPolygon aBackgroundPolyPoly(basegfx::tools::createPolygonFromRect(aBackgroundRange)); - aClipPoly = basegfx::tools::solvePolygonOperationDiff(aBackgroundPolyPoly, aClipPoly); + const basegfx::B2DPolyPolygon aBackgroundPolyPoly(basegfx::utils::createPolygonFromRect(aBackgroundRange)); + aClipPoly = basegfx::utils::solvePolygonOperationDiff(aBackgroundPolyPoly, aClipPoly); } } diff --git a/slideshow/source/engine/transitions/clockwipe.cxx b/slideshow/source/engine/transitions/clockwipe.cxx index 647367a5ee57..d274d582856c 100644 --- a/slideshow/source/engine/transitions/clockwipe.cxx +++ b/slideshow/source/engine/transitions/clockwipe.cxx @@ -53,7 +53,7 @@ namespace internal { ::basegfx::B2DPolyPolygon ClockWipe::operator () ( double t ) { - const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); + const basegfx::B2DHomMatrix aTransform(basegfx::utils::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); ::basegfx::B2DPolygon poly( calcCenteredClock(t) ); poly.transform( aTransform ); return ::basegfx::B2DPolyPolygon(poly); diff --git a/slideshow/source/engine/transitions/combtransition.cxx b/slideshow/source/engine/transitions/combtransition.cxx index c553256bf89b..4185b5033752 100644 --- a/slideshow/source/engine/transitions/combtransition.cxx +++ b/slideshow/source/engine/transitions/combtransition.cxx @@ -45,7 +45,7 @@ basegfx::B2DPolyPolygon createClipPolygon( for( int i=nOffset; i<nNumStrips; i+=2 ) { aClipPoly.append( - ::basegfx::tools::createPolygonFromRect( + ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle( double(i)/nNumStrips, 0.0, double(i+1)/nNumStrips, 1.0) ) ); @@ -54,7 +54,7 @@ basegfx::B2DPolyPolygon createClipPolygon( // rotate polygons, such that the strips are parallel to // the given direction vector const ::basegfx::B2DVector aUpVec(0.0, 1.0); - basegfx::B2DHomMatrix aMatrix(basegfx::tools::createRotateAroundPoint(0.5, 0.5, aUpVec.angle( rDirection ))); + basegfx::B2DHomMatrix aMatrix(basegfx::utils::createRotateAroundPoint(0.5, 0.5, aUpVec.angle( rDirection ))); // blow up clip polygon to slide size aMatrix.scale( rSlideSize.getX(), @@ -135,14 +135,14 @@ void CombTransition::renderComb( double t, pLeavingBitmap->clip( aClipPolygon1 ); // don't modify bitmap object (no move!): p = basegfx::B2DPoint( pageOrigin + (t * aPushDirection) ); - pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); + pCanvas->setTransformation(basegfx::utils::createTranslateB2DHomMatrix(p.getX(), p.getY())); pLeavingBitmap->draw( pCanvas ); // render even strips: pLeavingBitmap->clip( aClipPolygon2 ); // don't modify bitmap object (no move!): p = basegfx::B2DPoint( pageOrigin - (t * aPushDirection) ); - pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); + pCanvas->setTransformation(basegfx::utils::createTranslateB2DHomMatrix(p.getX(), p.getY())); pLeavingBitmap->draw( pCanvas ); } @@ -153,14 +153,14 @@ void CombTransition::renderComb( double t, pEnteringBitmap->clip( aClipPolygon1 ); // don't modify bitmap object (no move!): p = basegfx::B2DPoint( pageOrigin + ((t - 1.0) * aPushDirection) ); - pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); + pCanvas->setTransformation(basegfx::utils::createTranslateB2DHomMatrix(p.getX(), p.getY())); pEnteringBitmap->draw( pCanvas ); // render even strips: pEnteringBitmap->clip( aClipPolygon2 ); // don't modify bitmap object (no move!): p = basegfx::B2DPoint( pageOrigin + ((1.0 - t) * aPushDirection) ); - pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); + pCanvas->setTransformation(basegfx::utils::createTranslateB2DHomMatrix(p.getX(), p.getY())); pEnteringBitmap->draw( pCanvas ); } diff --git a/slideshow/source/engine/transitions/ellipsewipe.cxx b/slideshow/source/engine/transitions/ellipsewipe.cxx index d6f968fc1ffc..9cf694683adb 100644 --- a/slideshow/source/engine/transitions/ellipsewipe.cxx +++ b/slideshow/source/engine/transitions/ellipsewipe.cxx @@ -36,14 +36,14 @@ namespace internal { { // oval: ::basegfx::B2DPolygon poly ( - ::basegfx::tools::createPolygonFromEllipse( rCenter, fRadius*2, fRadius ) ); //Horizontal Ellipse is rotated by 90 degress + ::basegfx::utils::createPolygonFromEllipse( rCenter, fRadius*2, fRadius ) ); //Horizontal Ellipse is rotated by 90 degress return ::basegfx::B2DPolyPolygon( poly ); } else { // circle: ::basegfx::B2DPolygon poly( - ::basegfx::tools::createPolygonFromCircle( rCenter, fRadius ) ); + ::basegfx::utils::createPolygonFromCircle( rCenter, fRadius ) ); return ::basegfx::B2DPolyPolygon( poly ); } } diff --git a/slideshow/source/engine/transitions/fanwipe.cxx b/slideshow/source/engine/transitions/fanwipe.cxx index 5071dd62aaa1..2ddca66b0647 100644 --- a/slideshow/source/engine/transitions/fanwipe.cxx +++ b/slideshow/source/engine/transitions/fanwipe.cxx @@ -37,13 +37,13 @@ namespace internal { res.append( poly ); // flip on y-axis: - poly.transform(basegfx::tools::createScaleB2DHomMatrix(-1.0, 1.0)); + poly.transform(basegfx::utils::createScaleB2DHomMatrix(-1.0, 1.0)); poly.flip(); res.append( poly ); if (m_center) { - res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); + res.transform(basegfx::utils::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); if (! m_single) res.append( flipOnXAxis(res) ); @@ -51,7 +51,7 @@ namespace internal { else { SAL_WARN_IF( m_fanIn, "slideshow.opengl", "FanWipe: m_fanIn is true ?" ); - res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 1.0, 0.5, 1.0)); + res.transform(basegfx::utils::createScaleTranslateB2DHomMatrix(0.5, 1.0, 0.5, 1.0)); } return res; } diff --git a/slideshow/source/engine/transitions/figurewipe.cxx b/slideshow/source/engine/transitions/figurewipe.cxx index cc9a2baa0014..a2f3d525c32a 100644 --- a/slideshow/source/engine/transitions/figurewipe.cxx +++ b/slideshow/source/engine/transitions/figurewipe.cxx @@ -32,7 +32,7 @@ namespace internal { ::basegfx::B2DPolyPolygon FigureWipe::operator () ( double t ) { ::basegfx::B2DPolyPolygon res(m_figure); - res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(t, t, 0.5, 0.5)); + res.transform(basegfx::utils::createScaleTranslateB2DHomMatrix(t, t, 0.5, 0.5)); return res; } diff --git a/slideshow/source/engine/transitions/fourboxwipe.cxx b/slideshow/source/engine/transitions/fourboxwipe.cxx index 4df6d8199a7d..49106916950a 100644 --- a/slideshow/source/engine/transitions/fourboxwipe.cxx +++ b/slideshow/source/engine/transitions/fourboxwipe.cxx @@ -34,13 +34,13 @@ namespace internal { const double d = ::basegfx::pruneScaleValue( t / 2.0 ); if (m_cornersOut) { - aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); - aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(d, d, -0.25, -0.25) + aTransform = basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5); + aTransform = basegfx::utils::createScaleTranslateB2DHomMatrix(d, d, -0.25, -0.25) * aTransform; } else { - aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(d, d, -0.5, -0.5); + aTransform = basegfx::utils::createScaleTranslateB2DHomMatrix(d, d, -0.5, -0.5); } // top left: @@ -65,7 +65,7 @@ namespace internal { square4.flip(); // flip direction res.append( square4 ); - aTransform = basegfx::tools::createTranslateB2DHomMatrix(0.5, 0.5); + aTransform = basegfx::utils::createTranslateB2DHomMatrix(0.5, 0.5); res.transform( aTransform ); return res; } diff --git a/slideshow/source/engine/transitions/iriswipe.cxx b/slideshow/source/engine/transitions/iriswipe.cxx index b14c9236331f..02a9cd333161 100644 --- a/slideshow/source/engine/transitions/iriswipe.cxx +++ b/slideshow/source/engine/transitions/iriswipe.cxx @@ -29,8 +29,8 @@ namespace internal { ::basegfx::B2DPolyPolygon IrisWipe::operator () ( double t ) { const double d = ::basegfx::pruneScaleValue(t); - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); - aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(d, d, 0.5, 0.5) * aTransform; + basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5)); + aTransform = basegfx::utils::createScaleTranslateB2DHomMatrix(d, d, 0.5, 0.5) * aTransform; ::basegfx::B2DPolyPolygon res( m_unitRect ); res.transform( aTransform ); diff --git a/slideshow/source/engine/transitions/pinwheelwipe.cxx b/slideshow/source/engine/transitions/pinwheelwipe.cxx index 1ee179868049..f529a778cfd1 100644 --- a/slideshow/source/engine/transitions/pinwheelwipe.cxx +++ b/slideshow/source/engine/transitions/pinwheelwipe.cxx @@ -37,10 +37,10 @@ namespace internal { for ( sal_Int32 i = m_blades; i--; ) { ::basegfx::B2DPolygon p(poly); - p.transform(basegfx::tools::createRotateB2DHomMatrix((i * 2.0 * M_PI) / m_blades)); + p.transform(basegfx::utils::createRotateB2DHomMatrix((i * 2.0 * M_PI) / m_blades)); res.append( p ); } - res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); + res.transform(basegfx::utils::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); return res; } diff --git a/slideshow/source/engine/transitions/randomwipe.cxx b/slideshow/source/engine/transitions/randomwipe.cxx index 985f4209f12b..421e1f32c186 100644 --- a/slideshow/source/engine/transitions/randomwipe.cxx +++ b/slideshow/source/engine/transitions/randomwipe.cxx @@ -71,7 +71,7 @@ RandomWipe::RandomWipe( sal_Int32 nElements, bool randomBars ) { ::basegfx::B2DPoint const & point = m_positions[ pos ]; ::basegfx::B2DPolygon poly( m_rect ); - poly.transform(basegfx::tools::createTranslateB2DHomMatrix(point.getX(), point.getY())); + poly.transform(basegfx::utils::createTranslateB2DHomMatrix(point.getX(), point.getY())); res.append( poly ); } return res; diff --git a/slideshow/source/engine/transitions/slidechangebase.cxx b/slideshow/source/engine/transitions/slidechangebase.cxx index 6a84032408f6..fd9ba2f09abd 100644 --- a/slideshow/source/engine/transitions/slidechangebase.cxx +++ b/slideshow/source/engine/transitions/slidechangebase.cxx @@ -160,7 +160,7 @@ void SlideChangeBase::renderBitmap( pCanvas->clone() ); // render at output position, don't modify bitmap object (no move!): - const basegfx::B2DHomMatrix transform(basegfx::tools::createTranslateB2DHomMatrix( + const basegfx::B2DHomMatrix transform(basegfx::utils::createTranslateB2DHomMatrix( pageOrigin.getX(), pageOrigin.getY())); pDevicePixelCanvas->setTransformation( transform ); diff --git a/slideshow/source/engine/transitions/slidetransitionfactory.cxx b/slideshow/source/engine/transitions/slidetransitionfactory.cxx index 339ce818c519..b673b4912acb 100644 --- a/slideshow/source/engine/transitions/slidetransitionfactory.cxx +++ b/slideshow/source/engine/transitions/slidetransitionfactory.cxx @@ -20,7 +20,7 @@ #include <tools/diagnose_ex.h> #include <basegfx/matrix/b2dhommatrix.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> diff --git a/slideshow/source/engine/transitions/snakewipe.cxx b/slideshow/source/engine/transitions/snakewipe.cxx index 99b34d5d3af6..dd15d1238deb 100644 --- a/slideshow/source/engine/transitions/snakewipe.cxx +++ b/slideshow/source/engine/transitions/snakewipe.cxx @@ -113,12 +113,12 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) if ((static_cast<sal_Int32>(sqrtArea2) & 1) == 1) { // odd line - aTransform = basegfx::tools::createRotateB2DHomMatrix(M_PI_2 + M_PI_4); + aTransform = basegfx::utils::createRotateB2DHomMatrix(M_PI_2 + M_PI_4); aTransform.translate(edge + m_elementEdge, 0.0); } else { - aTransform = basegfx::tools::createTranslateB2DHomMatrix(-a, 0.0); + aTransform = basegfx::utils::createTranslateB2DHomMatrix(-a, 0.0); aTransform.rotate( -M_PI_4 ); aTransform.translate( 0.0, edge ); } @@ -157,13 +157,13 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) if ((static_cast<sal_Int32>(sqrtArea2) & 1) == 1) { // odd line - aTransform = basegfx::tools::createTranslateB2DHomMatrix(0.0, -height); + aTransform = basegfx::utils::createTranslateB2DHomMatrix(0.0, -height); aTransform.rotate( M_PI_2 + M_PI_4 ); aTransform.translate( 1.0, edge ); } else { - aTransform = basegfx::tools::createRotateB2DHomMatrix(-M_PI_4); + aTransform = basegfx::utils::createRotateB2DHomMatrix(-M_PI_4); aTransform.translate( edge, 1.0 ); } poly.transform( aTransform ); @@ -200,7 +200,7 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) ::basegfx::B2DPolyPolygon half( calcHalfDiagonalSnake( t, false /* out */ ) ); // flip on x axis and rotate 90 degrees: - basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleB2DHomMatrix(1.0, -1.0)); + basegfx::B2DHomMatrix aTransform(basegfx::utils::createScaleB2DHomMatrix(1.0, -1.0)); aTransform.translate( -0.5, 0.5 ); aTransform.rotate( M_PI_2 ); aTransform.translate( 0.5, 0.5 ); @@ -209,7 +209,7 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) res.append( half ); // rotate 180 degrees: - aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); + aTransform = basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5); aTransform.rotate( M_PI ); aTransform.translate( 0.5, 0.5 ); half.transform( aTransform ); @@ -219,7 +219,7 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) { ::basegfx::B2DPolyPolygon half( calcSnake( t / 2.0 ) ); // rotate 90 degrees: - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); + basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5)); aTransform.rotate( M_PI_2 ); aTransform.translate( 0.5, 0.5 ); half.transform( aTransform ); diff --git a/slideshow/source/engine/transitions/spiralwipe.cxx b/slideshow/source/engine/transitions/spiralwipe.cxx index f89ef9fabaff..216c513ff470 100644 --- a/slideshow/source/engine/transitions/spiralwipe.cxx +++ b/slideshow/source/engine/transitions/spiralwipe.cxx @@ -44,7 +44,7 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis ) const double e = (sqrt(area) / 2.0); const sal_Int32 edge = (static_cast<sal_Int32>(e) * 2); - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); + basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5)); const double edge_ = ::basegfx::pruneScaleValue( static_cast<double>(edge) / m_sqrtElements ); aTransform.scale( edge_, edge_ ); @@ -61,7 +61,7 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis ) const sal_Int32 alen = (len > edge1 ? edge1 : len); len -= alen; poly = createUnitRect(); - aTransform = basegfx::tools::createScaleB2DHomMatrix( + aTransform = basegfx::utils::createScaleB2DHomMatrix( ::basegfx::pruneScaleValue( static_cast<double>(alen) / m_sqrtElements ), ::basegfx::pruneScaleValue( 1.0 / m_sqrtElements ) ); aTransform.translate( diff --git a/slideshow/source/engine/transitions/sweepwipe.cxx b/slideshow/source/engine/transitions/sweepwipe.cxx index bfb4580d6736..bf7d9292e05f 100644 --- a/slideshow/source/engine/transitions/sweepwipe.cxx +++ b/slideshow/source/engine/transitions/sweepwipe.cxx @@ -42,7 +42,7 @@ namespace internal { if (m_center) { - aTransform = basegfx::tools::createTranslateB2DHomMatrix(0.5, 0.0); + aTransform = basegfx::utils::createTranslateB2DHomMatrix(0.5, 0.0); poly.transform( aTransform ); } ::basegfx::B2DPolyPolygon res(poly); @@ -51,14 +51,14 @@ namespace internal { { if (m_oppositeVertical) { - aTransform = basegfx::tools::createScaleB2DHomMatrix(1.0, -1.0); + aTransform = basegfx::utils::createScaleB2DHomMatrix(1.0, -1.0); aTransform.translate( 0.0, 1.0 ); poly.transform( aTransform ); poly.flip(); } else { - aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); + aTransform = basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5); aTransform.rotate( M_PI ); aTransform.translate( 0.5, 0.5 ); poly.transform( aTransform ); diff --git a/slideshow/source/engine/transitions/transitiontools.cxx b/slideshow/source/engine/transitions/transitiontools.cxx index cba22b23f77e..d05b28bf9c0b 100644 --- a/slideshow/source/engine/transitions/transitiontools.cxx +++ b/slideshow/source/engine/transitions/transitiontools.cxx @@ -32,7 +32,7 @@ namespace internal { // TODO(Q2): Move this to basegfx ::basegfx::B2DPolygon createUnitRect() { - return ::basegfx::tools::createPolygonFromRect( + return ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle(0.0,0.0, 1.0,1.0 ) ); } @@ -41,7 +41,7 @@ namespace internal { ::basegfx::B2DPolyPolygon const & polypoly ) { ::basegfx::B2DPolyPolygon res(polypoly); - res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(-1.0, 1.0, 1.0, 0.0)); + res.transform(basegfx::utils::createScaleTranslateB2DHomMatrix(-1.0, 1.0, 1.0, 0.0)); res.flip(); return res; } @@ -50,7 +50,7 @@ namespace internal { ::basegfx::B2DPolyPolygon const & polypoly ) { ::basegfx::B2DPolyPolygon res(polypoly); - res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(1.0, -1.0, 0.0, 1.0)); + res.transform(basegfx::utils::createScaleTranslateB2DHomMatrix(1.0, -1.0, 0.0, 1.0)); res.flip(); return res; } diff --git a/slideshow/source/engine/transitions/waterfallwipe.cxx b/slideshow/source/engine/transitions/waterfallwipe.cxx index 5c5286f47acb..eb0ead303c62 100644 --- a/slideshow/source/engine/transitions/waterfallwipe.cxx +++ b/slideshow/source/engine/transitions/waterfallwipe.cxx @@ -54,7 +54,7 @@ WaterfallWipe::WaterfallWipe( sal_Int32 nElements, bool flipOnYAxis ) ::basegfx::B2DPolyPolygon WaterfallWipe::operator () ( double t ) { ::basegfx::B2DPolygon poly( m_waterfall ); - poly.transform(basegfx::tools::createTranslateB2DHomMatrix(0.0, ::basegfx::pruneScaleValue(2.0 * t))); + poly.transform(basegfx::utils::createTranslateB2DHomMatrix(0.0, ::basegfx::pruneScaleValue(2.0 * t))); poly.setB2DPoint( 0, ::basegfx::B2DPoint( 0.0, -1.0 ) ); poly.setB2DPoint( poly.count()-1, ::basegfx::B2DPoint( 1.0, -1.0 ) ); diff --git a/slideshow/source/engine/transitions/zigzagwipe.cxx b/slideshow/source/engine/transitions/zigzagwipe.cxx index 489d11d12938..adfc85c1d224 100644 --- a/slideshow/source/engine/transitions/zigzagwipe.cxx +++ b/slideshow/source/engine/transitions/zigzagwipe.cxx @@ -46,7 +46,7 @@ ZigZagWipe::ZigZagWipe( sal_Int32 nZigs ) : m_zigEdge( 1.0 / nZigs ) ::basegfx::B2DPolyPolygon ZigZagWipe::operator () ( double t ) { ::basegfx::B2DPolyPolygon res(m_stdZigZag); - res.transform(basegfx::tools::createTranslateB2DHomMatrix((1.0 + m_zigEdge) * t, 0.0)); + res.transform(basegfx::utils::createTranslateB2DHomMatrix((1.0 + m_zigEdge) * t, 0.0)); return res; } @@ -55,7 +55,7 @@ ZigZagWipe::ZigZagWipe( sal_Int32 nZigs ) : m_zigEdge( 1.0 / nZigs ) ::basegfx::B2DPolyPolygon res( createUnitRect() ); ::basegfx::B2DPolygon poly( m_stdZigZag ); poly.flip(); - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix( (1.0 + m_zigEdge) * (1.0 - t) / 2.0, 0.0)); poly.transform( aTransform ); res.append( poly ); diff --git a/slideshow/test/demoshow.cxx b/slideshow/test/demoshow.cxx index d1e2c6005326..a5bd530a04af 100644 --- a/slideshow/test/demoshow.cxx +++ b/slideshow/test/demoshow.cxx @@ -41,7 +41,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> -#include <basegfx/tools/canvastools.hxx> +#include <basegfx/utils/canvastools.hxx> #include <basegfx/range/b2drectangle.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> @@ -86,7 +86,7 @@ public: { maSize = rNewSize; const sal_Int32 nSize( std::min( rNewSize.Width(), rNewSize.Height() ) - 10); - maTransform = basegfx::tools::createScaleTranslateB2DHomMatrix( + maTransform = basegfx::utils::createScaleTranslateB2DHomMatrix( nSize, nSize, (rNewSize.Width() - nSize) / 2, (rNewSize.Height() - nSize) / 2); lang::EventObject aEvent( *this ); @@ -113,7 +113,7 @@ private: virtual void SAL_CALL clear( ) throw (uno::RuntimeException) { - ::basegfx::B2DPolygon aPoly( ::basegfx::tools::createPolygonFromRect( + ::basegfx::B2DPolygon aPoly( ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle(0.0,0.0, maSize.Width(), maSize.Height() ))); |