diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-06-24 10:49:29 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-06-24 10:49:29 +0000 |
commit | 483ec7f4b2c39d486e156511cb5c71536da5b3a0 (patch) | |
tree | 936a92759aeb8718affb6148fcf4d096ddc2d488 /cppcanvas | |
parent | 4fb36f910a6c787d875b5a8d32851e4f699e78b2 (diff) |
INTEGRATION: CWS canvas05 (1.12.12); FILE MERGED
2008/04/21 07:50:26 thb 1.12.12.2: RESYNC: (1.12-1.13); FILE MERGED
2007/12/20 16:42:53 thb 1.12.12.1: #i84784# Fixes to polygon output + enhancements for gradients kindly provided by rodo
Diffstat (limited to 'cppcanvas')
-rw-r--r-- | cppcanvas/source/mtfrenderer/polypolyaction.cxx | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/cppcanvas/source/mtfrenderer/polypolyaction.cxx b/cppcanvas/source/mtfrenderer/polypolyaction.cxx index df5551800c30..225f2e318764 100644 --- a/cppcanvas/source/mtfrenderer/polypolyaction.cxx +++ b/cppcanvas/source/mtfrenderer/polypolyaction.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: polypolyaction.cxx,v $ - * $Revision: 1.13 $ + * $Revision: 1.14 $ * * This file is part of OpenOffice.org. * @@ -39,7 +39,7 @@ #include <tools/gen.hxx> #include <vcl/canvastools.hxx> -#include <basegfx/range/b2drange.hxx> +#include <basegfx/range/b2drectangle.hxx> #include <basegfx/tools/canvastools.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> @@ -107,7 +107,7 @@ namespace cppcanvas bool bFill, bool bStroke ) : CachedPrimitiveBase( rCanvas, false ), - mxPolyPoly( ::vcl::unotools::xPolyPolygonFromPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), /*#i76339#*/ ::PolyPolygon(rPolyPoly) ) ), + mxPolyPoly( ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), rPolyPoly) ), maBounds( ::basegfx::tools::getRange(rPolyPoly) ), mpCanvas( rCanvas ), maState(), @@ -129,7 +129,7 @@ namespace cppcanvas bool bStroke, int nTransparency ) : CachedPrimitiveBase( rCanvas, false ), - mxPolyPoly( ::vcl::unotools::xPolyPolygonFromPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), /*#i76339#*/ ::PolyPolygon(rPolyPoly) ) ), + mxPolyPoly( ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), rPolyPoly) ), maBounds( ::basegfx::tools::getRange(rPolyPoly) ), mpCanvas( rCanvas ), maState(), @@ -263,10 +263,10 @@ namespace cppcanvas class TexturedPolyPolyAction : public CachedPrimitiveBase { public: - TexturedPolyPolyAction( const ::PolyPolygon& rPoly, - const CanvasSharedPtr& rCanvas, - const OutDevState& rState, - const rendering::Texture& rTexture ); + TexturedPolyPolyAction( const ::basegfx::B2DPolyPolygon& rPoly, + const CanvasSharedPtr& rCanvas, + const OutDevState& rState, + const rendering::Texture& rTexture ); virtual bool render( const ::basegfx::B2DHomMatrix& rTransformation, const Subset& rSubset ) const; @@ -283,7 +283,7 @@ namespace cppcanvas const ::basegfx::B2DHomMatrix& rTransformation ) const; const uno::Reference< rendering::XPolyPolygon2D > mxPolyPoly; - const ::Rectangle maBounds; + const ::basegfx::B2DRectangle maBounds; const CanvasSharedPtr mpCanvas; // stroke color is now implicit: the maState.DeviceColor member @@ -291,14 +291,13 @@ namespace cppcanvas const rendering::Texture maTexture; }; - TexturedPolyPolyAction::TexturedPolyPolyAction( const ::PolyPolygon& rPolyPoly, - const CanvasSharedPtr& rCanvas, - const OutDevState& rState, - const rendering::Texture& rTexture ) : + TexturedPolyPolyAction::TexturedPolyPolyAction( const ::basegfx::B2DPolyPolygon& rPolyPoly, + const CanvasSharedPtr& rCanvas, + const OutDevState& rState, + const rendering::Texture& rTexture ) : CachedPrimitiveBase( rCanvas, true ), - mxPolyPoly( ::vcl::unotools::xPolyPolygonFromPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), - rPolyPoly ) ), - maBounds( rPolyPoly.GetBoundRect() ), + mxPolyPoly( ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), rPolyPoly) ), + maBounds( ::basegfx::tools::getRange(rPolyPoly) ), mpCanvas( rCanvas ), maState(), maTexture( rTexture ) @@ -346,7 +345,7 @@ namespace cppcanvas ::canvas::tools::prependToRenderState(aLocalState, rTransformation); return tools::calcDevicePixelBounds( - ::vcl::unotools::b2DRectangleFromRectangle( maBounds ), + maBounds, mpCanvas->getViewState(), aLocalState ); } @@ -378,7 +377,7 @@ namespace cppcanvas class StrokedPolyPolyAction : public CachedPrimitiveBase { public: - StrokedPolyPolyAction( const ::PolyPolygon& rPoly, + StrokedPolyPolyAction( const ::basegfx::B2DPolyPolygon& rPoly, const CanvasSharedPtr& rCanvas, const OutDevState& rState, const rendering::StrokeAttributes& rStrokeAttributes ); @@ -398,20 +397,19 @@ namespace cppcanvas const ::basegfx::B2DHomMatrix& rTransformation ) const; const uno::Reference< rendering::XPolyPolygon2D > mxPolyPoly; - const ::Rectangle maBounds; + const ::basegfx::B2DRectangle maBounds; const CanvasSharedPtr mpCanvas; rendering::RenderState maState; const rendering::StrokeAttributes maStrokeAttributes; }; - StrokedPolyPolyAction::StrokedPolyPolyAction( const ::PolyPolygon& rPolyPoly, + StrokedPolyPolyAction::StrokedPolyPolyAction( const ::basegfx::B2DPolyPolygon& rPolyPoly, const CanvasSharedPtr& rCanvas, const OutDevState& rState, const rendering::StrokeAttributes& rStrokeAttributes ) : CachedPrimitiveBase( rCanvas, false ), - mxPolyPoly( ::vcl::unotools::xPolyPolygonFromPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), - rPolyPoly ) ), - maBounds( rPolyPoly.GetBoundRect() ), + mxPolyPoly( ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( rCanvas->getUNOCanvas()->getDevice(), rPolyPoly) ), + maBounds( ::basegfx::tools::getRange(rPolyPoly) ), mpCanvas( rCanvas ), maState(), maStrokeAttributes( rStrokeAttributes ) @@ -457,7 +455,7 @@ namespace cppcanvas ::canvas::tools::prependToRenderState(aLocalState, rTransformation); return tools::calcDevicePixelBounds( - ::vcl::unotools::b2DRectangleFromRectangle( maBounds ), + maBounds, mpCanvas->getViewState(), aLocalState ); } @@ -496,12 +494,12 @@ namespace cppcanvas rState.isLineColorSet ) ); } - ActionSharedPtr PolyPolyActionFactory::createPolyPolyAction( const ::basegfx::B2DPolyPolygon& rPoly, + ActionSharedPtr PolyPolyActionFactory::createPolyPolyAction( const ::basegfx::B2DPolyPolygon& rPoly, const CanvasSharedPtr& rCanvas, const OutDevState& rState, const rendering::Texture& rTexture ) { - return ActionSharedPtr( new TexturedPolyPolyAction( /*#i76339#*/ ::PolyPolygon(rPoly), rCanvas, rState, rTexture ) ); + return ActionSharedPtr( new TexturedPolyPolyAction( rPoly, rCanvas, rState, rTexture ) ); } ActionSharedPtr PolyPolyActionFactory::createLinePolyPolyAction( const ::basegfx::B2DPolyPolygon& rPoly, @@ -523,7 +521,7 @@ namespace cppcanvas { OSL_ENSURE( rState.isLineColorSet, "PolyPolyActionFactory::createPolyPolyAction() for strokes called with empty line color" ); - return ActionSharedPtr( new StrokedPolyPolyAction( /*#i76339#*/ ::PolyPolygon(rPoly), rCanvas, rState, rStrokeAttributes ) ); + return ActionSharedPtr( new StrokedPolyPolyAction( rPoly, rCanvas, rState, rStrokeAttributes ) ); } ActionSharedPtr PolyPolyActionFactory::createPolyPolyAction( const ::basegfx::B2DPolyPolygon& rPoly, |