eraser01: merge with DEV300 m70
This commit is contained in:
@@ -35,25 +35,21 @@
|
||||
#include <com/sun/star/rendering/XBitmap.hpp>
|
||||
#include <com/sun/star/rendering/RepaintResult.hpp>
|
||||
#include <com/sun/star/rendering/XCachedPrimitive.hpp>
|
||||
|
||||
#include <vcl/bitmapex.hxx>
|
||||
#include <tools/gen.hxx>
|
||||
#include <vcl/canvastools.hxx>
|
||||
|
||||
#include <canvas/canvastools.hxx>
|
||||
|
||||
#include <basegfx/matrix/b2dhommatrix.hxx>
|
||||
#include <basegfx/vector/b2dsize.hxx>
|
||||
#include <basegfx/point/b2dpoint.hxx>
|
||||
#include <basegfx/range/b2drange.hxx>
|
||||
#include <basegfx/tools/canvastools.hxx>
|
||||
|
||||
#include <boost/utility.hpp>
|
||||
|
||||
#include "cachedprimitivebase.hxx"
|
||||
#include "bitmapaction.hxx"
|
||||
#include "outdevstate.hxx"
|
||||
#include "mtftools.hxx"
|
||||
#include <basegfx/matrix/b2dhommatrixtools.hxx>
|
||||
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
@@ -112,9 +108,7 @@ namespace cppcanvas
|
||||
|
||||
// Setup transformation such that the next render call is
|
||||
// moved rPoint away.
|
||||
::basegfx::B2DHomMatrix aLocalTransformation;
|
||||
aLocalTransformation.translate( rDstPoint.getX(),
|
||||
rDstPoint.getY() );
|
||||
const basegfx::B2DHomMatrix aLocalTransformation(basegfx::tools::createTranslateB2DHomMatrix(rDstPoint));
|
||||
::canvas::tools::appendToRenderState( maState,
|
||||
aLocalTransformation );
|
||||
|
||||
@@ -144,15 +138,12 @@ namespace cppcanvas
|
||||
// moved rPoint away, and scaled according to the ratio
|
||||
// given by src and dst size.
|
||||
const ::Size aBmpSize( rBmpEx.GetSizePixel() );
|
||||
::basegfx::B2DHomMatrix aLocalTransformation;
|
||||
|
||||
const ::basegfx::B2DVector aScale( rDstSize.getX() / aBmpSize.Width(),
|
||||
rDstSize.getY() / aBmpSize.Height() );
|
||||
aLocalTransformation.scale( aScale.getX(), aScale.getY() );
|
||||
aLocalTransformation.translate( rDstPoint.getX(),
|
||||
rDstPoint.getY() );
|
||||
::canvas::tools::appendToRenderState( maState,
|
||||
aLocalTransformation );
|
||||
const basegfx::B2DHomMatrix aLocalTransformation(basegfx::tools::createScaleTranslateB2DHomMatrix(
|
||||
aScale, rDstPoint));
|
||||
::canvas::tools::appendToRenderState( maState, aLocalTransformation );
|
||||
|
||||
// correct clip (which is relative to original transform)
|
||||
tools::modifyClip( maState,
|
||||
|
@@ -34,19 +34,14 @@
|
||||
#include <canvas/debug.hxx>
|
||||
#include <tools/diagnose_ex.h>
|
||||
#include <canvas/verbosetrace.hxx>
|
||||
|
||||
#include <osl/mutex.hxx>
|
||||
#include <vos/mutex.hxx>
|
||||
#include <vcl/svapp.hxx>
|
||||
|
||||
#include <rtl/logfile.hxx>
|
||||
|
||||
#include <comphelper/sequence.hxx>
|
||||
#include <comphelper/anytostring.hxx>
|
||||
#include <cppuhelper/exc_hlp.hxx>
|
||||
|
||||
#include <cppcanvas/canvas.hxx>
|
||||
|
||||
#include <com/sun/star/rendering/XGraphicDevice.hpp>
|
||||
#include <com/sun/star/rendering/TexturingMode.hpp>
|
||||
#include <com/sun/star/rendering/XParametricPolyPolygon2DFactory.hpp>
|
||||
@@ -59,7 +54,6 @@
|
||||
#include <com/sun/star/rendering/XCanvas.hpp>
|
||||
#include <com/sun/star/rendering/PathCapType.hpp>
|
||||
#include <com/sun/star/rendering/PathJoinType.hpp>
|
||||
|
||||
#include <basegfx/tools/canvastools.hxx>
|
||||
#include <basegfx/numeric/ftools.hxx>
|
||||
#include <basegfx/polygon/b2dpolypolygontools.hxx>
|
||||
@@ -73,7 +67,6 @@
|
||||
#include <basegfx/tuple/b2dtuple.hxx>
|
||||
#include <basegfx/polygon/b2dpolygonclipper.hxx>
|
||||
#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
|
||||
|
||||
#include <canvas/canvastools.hxx>
|
||||
#include <vcl/canvastools.hxx>
|
||||
#include <vcl/salbtype.hxx>
|
||||
@@ -84,11 +77,9 @@
|
||||
#include <vcl/graphictools.hxx>
|
||||
#include <tools/poly.hxx>
|
||||
#include <i18npool/mslangid.hxx>
|
||||
|
||||
#include <implrenderer.hxx>
|
||||
#include <tools.hxx>
|
||||
#include <outdevstate.hxx>
|
||||
|
||||
#include <action.hxx>
|
||||
#include <bitmapaction.hxx>
|
||||
#include <lineaction.hxx>
|
||||
@@ -96,15 +87,13 @@
|
||||
#include <polypolyaction.hxx>
|
||||
#include <textaction.hxx>
|
||||
#include <transparencygroupaction.hxx>
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
|
||||
#include <boost/scoped_array.hpp>
|
||||
|
||||
#include "mtftools.hxx"
|
||||
#include "outdevstate.hxx"
|
||||
#include <basegfx/matrix/b2dhommatrixtools.hxx>
|
||||
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
@@ -286,10 +275,25 @@ namespace
|
||||
(getState( rParms.mrStates ).mapModeTransform * aWidth).getX();
|
||||
|
||||
// setup reasonable defaults
|
||||
o_rStrokeAttributes.MiterLimit = 1.0;
|
||||
o_rStrokeAttributes.MiterLimit = 15.0; // 1.0 was no good default; GDI+'s limit is 10.0, our's is 15.0
|
||||
o_rStrokeAttributes.StartCapType = rendering::PathCapType::BUTT;
|
||||
o_rStrokeAttributes.EndCapType = rendering::PathCapType::BUTT;
|
||||
o_rStrokeAttributes.JoinType = rendering::PathJoinType::MITER;
|
||||
|
||||
switch(rLineInfo.GetLineJoin())
|
||||
{
|
||||
default: // B2DLINEJOIN_NONE, B2DLINEJOIN_MIDDLE
|
||||
o_rStrokeAttributes.JoinType = rendering::PathJoinType::NONE;
|
||||
break;
|
||||
case basegfx::B2DLINEJOIN_BEVEL:
|
||||
o_rStrokeAttributes.JoinType = rendering::PathJoinType::BEVEL;
|
||||
break;
|
||||
case basegfx::B2DLINEJOIN_MITER:
|
||||
o_rStrokeAttributes.JoinType = rendering::PathJoinType::MITER;
|
||||
break;
|
||||
case basegfx::B2DLINEJOIN_ROUND:
|
||||
o_rStrokeAttributes.JoinType = rendering::PathJoinType::ROUND;
|
||||
break;
|
||||
}
|
||||
|
||||
if( LINE_DASH == rLineInfo.GetStyle() )
|
||||
{
|
||||
@@ -729,12 +733,11 @@ namespace cppcanvas
|
||||
fabs( aBounds.getHeight()*sin(nRotation) ) +
|
||||
fabs( aBounds.getWidth()*cos(nRotation) )));
|
||||
|
||||
aTextureTransformation.scale( nScale, nScale );
|
||||
|
||||
// translate back origin to center of
|
||||
// scale and translate back origin to center of
|
||||
// primitive
|
||||
aTextureTransformation.translate( 0.5*aBounds.getWidth(),
|
||||
0.5*aBounds.getHeight() );
|
||||
aTextureTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix(
|
||||
nScale, nScale, 0.5*aBounds.getWidth(), 0.5*aBounds.getHeight())
|
||||
* aTextureTransformation;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -856,9 +859,8 @@ namespace cppcanvas
|
||||
aTextureTransformation.scale( nScaleX, nScaleY );
|
||||
|
||||
// rotate texture according to gradient rotation
|
||||
aTextureTransformation.translate( -0.5*nScaleX, -0.5*nScaleY );
|
||||
aTextureTransformation.rotate( nRotation );
|
||||
aTextureTransformation.translate( 0.5*nScaleX, 0.5*nScaleY );
|
||||
aTextureTransformation = basegfx::tools::createRotateAroundPoint(0.5*nScaleX, 0.5*nScaleY, nRotation)
|
||||
* aTextureTransformation;
|
||||
|
||||
aTextureTransformation.translate( nOffsetX, nOffsetY );
|
||||
}
|
||||
|
@@ -34,10 +34,8 @@
|
||||
#include <canvas/debug.hxx>
|
||||
#include <tools/diagnose_ex.h>
|
||||
#include <canvas/verbosetrace.hxx>
|
||||
|
||||
#include <com/sun/star/rendering/RenderState.hpp>
|
||||
#include <com/sun/star/rendering/XCanvas.hpp>
|
||||
|
||||
#include <basegfx/numeric/ftools.hxx>
|
||||
#include <basegfx/tools/canvastools.hxx>
|
||||
#include <basegfx/polygon/b2dpolygontools.hxx>
|
||||
@@ -45,16 +43,15 @@
|
||||
#include <basegfx/range/b2drectangle.hxx>
|
||||
#include <basegfx/vector/b2dvector.hxx>
|
||||
#include <canvas/canvastools.hxx>
|
||||
|
||||
#include <vcl/gdimtf.hxx>
|
||||
#include <vcl/metaact.hxx>
|
||||
#include <vcl/virdev.hxx>
|
||||
#include <vcl/metric.hxx>
|
||||
#include <tools/poly.hxx>
|
||||
|
||||
#include "mtftools.hxx"
|
||||
#include "outdevstate.hxx"
|
||||
#include "polypolyaction.hxx"
|
||||
#include <basegfx/matrix/b2dhommatrixtools.hxx>
|
||||
|
||||
|
||||
|
||||
@@ -111,9 +108,9 @@ namespace cppcanvas
|
||||
|
||||
const ::Size aSizePixel( rVDev.LogicToPixel( aSizeLogic ) );
|
||||
|
||||
o_rMatrix.identity();
|
||||
o_rMatrix.scale( aSizePixel.Width() / (double)aSizeLogic.Width(),
|
||||
aSizePixel.Height() / (double)aSizeLogic.Height() );
|
||||
o_rMatrix = basegfx::tools::createScaleB2DHomMatrix(
|
||||
aSizePixel.Width() / (double)aSizeLogic.Width(),
|
||||
aSizePixel.Height() / (double)aSizeLogic.Height() );
|
||||
|
||||
return o_rMatrix;
|
||||
}
|
||||
|
@@ -48,6 +48,7 @@
|
||||
#include <basegfx/vector/b2dsize.hxx>
|
||||
#include <basegfx/polygon/b2dpolypolygontools.hxx>
|
||||
#include <basegfx/polygon/b2dpolygontools.hxx>
|
||||
#include <basegfx/matrix/b2dhommatrixtools.hxx>
|
||||
|
||||
#include <tools/gen.hxx>
|
||||
#include <vcl/canvastools.hxx>
|
||||
@@ -93,9 +94,7 @@ namespace cppcanvas
|
||||
NULL,
|
||||
&rState.fontRotation );
|
||||
|
||||
::basegfx::B2DHomMatrix aLocalTransformation;
|
||||
|
||||
aLocalTransformation.rotate( rState.fontRotation );
|
||||
basegfx::B2DHomMatrix aLocalTransformation(basegfx::tools::createRotateB2DHomMatrix(rState.fontRotation));
|
||||
aLocalTransformation.translate( rStartPoint.getX(),
|
||||
rStartPoint.getY() );
|
||||
::canvas::tools::appendToRenderState( o_rRenderState,
|
||||
|
Reference in New Issue
Block a user