INTEGRATION: CWS canvas02 (1.8.2); FILE MERGED
2005/10/17 15:49:20 thb 1.8.2.5: #i54035# Corrected emboss/relief mode (reversed semantics of emboss and relief, and painted relief shadow behing normal text now) 2005/10/09 09:14:47 thb 1.8.2.4: RESYNC: (1.8-1.9); FILE MERGED 2005/10/04 13:32:43 thb 1.8.2.3: #i55166# Correctly handling NULL dx array (fetching the char positions manually in this case). 2005/08/30 11:34:01 thb 1.8.2.2: #i53964# Added optional rotation angle parameter to modifyClip (and changed all call sites); passing the font rotation as an additional parameter, when calling modifyClip for TextActions. 2005/08/24 23:02:58 thb 1.8.2.1: #i52876# Added CachedPrimitiveBase base class for common XCachedPrimitive handling; removed external header guards from cxx files
This commit is contained in:
@@ -4,9 +4,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: textaction.cxx,v $
|
* $RCSfile: textaction.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.9 $
|
* $Revision: 1.10 $
|
||||||
*
|
*
|
||||||
* last change: $Author: rt $ $Date: 2005-09-08 08:22:10 $
|
* last change: $Author: kz $ $Date: 2005-11-02 13:42:02 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to
|
* The Contents of this file are made available subject to
|
||||||
* the terms of GNU Lesser General Public License Version 2.1.
|
* the terms of GNU Lesser General Public License Version 2.1.
|
||||||
@@ -36,67 +36,34 @@
|
|||||||
#include <canvas/debug.hxx>
|
#include <canvas/debug.hxx>
|
||||||
#include <canvas/verbosetrace.hxx>
|
#include <canvas/verbosetrace.hxx>
|
||||||
|
|
||||||
#include <textaction.hxx>
|
|
||||||
#include <outdevstate.hxx>
|
|
||||||
|
|
||||||
#ifndef _RTL_LOGFILE_HXX_
|
|
||||||
#include <rtl/logfile.hxx>
|
#include <rtl/logfile.hxx>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _COM_SUN_STAR_RENDERING_PATHCAPTYPE_HPP__
|
|
||||||
#include <com/sun/star/rendering/PathCapType.hpp>
|
#include <com/sun/star/rendering/PathCapType.hpp>
|
||||||
#endif
|
|
||||||
#ifndef _COM_SUN_STAR_RENDERING_PATHJOINTYPE_HPP__
|
|
||||||
#include <com/sun/star/rendering/PathJoinType.hpp>
|
#include <com/sun/star/rendering/PathJoinType.hpp>
|
||||||
#endif
|
|
||||||
#ifndef _COM_SUN_STAR_RENDERING_XCANVAS_HPP_
|
|
||||||
#include <com/sun/star/rendering/XCanvas.hpp>
|
#include <com/sun/star/rendering/XCanvas.hpp>
|
||||||
#endif
|
|
||||||
#ifndef _COM_SUN_STAR_RENDERING_XCANVASFONT_HPP_
|
|
||||||
#include <com/sun/star/rendering/XCanvasFont.hpp>
|
#include <com/sun/star/rendering/XCanvasFont.hpp>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _BGFX_NUMERIC_FTOOLS_HXX
|
|
||||||
#include <basegfx/numeric/ftools.hxx>
|
#include <basegfx/numeric/ftools.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _BGFX_MATRIX_B2DHOMMATRIX_HXX
|
|
||||||
#include <basegfx/matrix/b2dhommatrix.hxx>
|
#include <basegfx/matrix/b2dhommatrix.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _BGFX_RANGE_B2DRECTANGLE_HXX
|
|
||||||
#include <basegfx/range/b2drectangle.hxx>
|
#include <basegfx/range/b2drectangle.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _BGFX_VECTOR_B2DSIZE_HXX
|
|
||||||
#include <basegfx/vector/b2dsize.hxx>
|
#include <basegfx/vector/b2dsize.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _BGFX_POLYGON_B2DPOLYPOLYGONTOOLS_HXX
|
|
||||||
#include <basegfx/polygon/b2dpolypolygontools.hxx>
|
#include <basegfx/polygon/b2dpolypolygontools.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _BGFX_POLYGON_B2DPOLYGONTOOLS_HXX
|
|
||||||
#include <basegfx/polygon/b2dpolygontools.hxx>
|
#include <basegfx/polygon/b2dpolygontools.hxx>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _SV_GEN_HXX
|
|
||||||
#include <tools/gen.hxx>
|
#include <tools/gen.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _VCL_CANVASTOOLS_HXX
|
|
||||||
#include <vcl/canvastools.hxx>
|
#include <vcl/canvastools.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _SV_VIRDEV_HXX
|
|
||||||
#include <vcl/virdev.hxx>
|
#include <vcl/virdev.hxx>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX
|
|
||||||
#include <basegfx/tools/canvastools.hxx>
|
#include <basegfx/tools/canvastools.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _CANVAS_CANVASTOOLS_HXX
|
|
||||||
#include <canvas/canvastools.hxx>
|
#include <canvas/canvastools.hxx>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <boost/scoped_array.hpp>
|
#include <boost/scoped_array.hpp>
|
||||||
#include <boost/bind.hpp>
|
#include <boost/bind.hpp>
|
||||||
#include <boost/utility.hpp>
|
#include <boost/utility.hpp>
|
||||||
|
|
||||||
#include <mtftools.hxx>
|
#include "textaction.hxx"
|
||||||
|
#include "outdevstate.hxx"
|
||||||
|
#include "mtftools.hxx"
|
||||||
|
|
||||||
|
|
||||||
using namespace ::com::sun::star;
|
using namespace ::com::sun::star;
|
||||||
@@ -115,8 +82,17 @@ namespace cppcanvas
|
|||||||
tools::initRenderState(o_rRenderState,rState);
|
tools::initRenderState(o_rRenderState,rState);
|
||||||
|
|
||||||
// #i36950# Offset clip back to origin (as it's also moved
|
// #i36950# Offset clip back to origin (as it's also moved
|
||||||
// by rStartPoint!)
|
// by rStartPoint)
|
||||||
tools::modifyClip( o_rRenderState, rState, rCanvas, rStartPoint, NULL );
|
// #i53964# Also take VCL font rotation into account,
|
||||||
|
// since this, opposed to the FontMatrix rotation
|
||||||
|
// elsewhere, _does_ get incorporated into the render
|
||||||
|
// state transform.
|
||||||
|
tools::modifyClip( o_rRenderState,
|
||||||
|
rState,
|
||||||
|
rCanvas,
|
||||||
|
rStartPoint,
|
||||||
|
NULL,
|
||||||
|
&rState.fontRotation );
|
||||||
|
|
||||||
::basegfx::B2DHomMatrix aLocalTransformation;
|
::basegfx::B2DHomMatrix aLocalTransformation;
|
||||||
|
|
||||||
@@ -554,9 +530,6 @@ namespace cppcanvas
|
|||||||
rRenderer( aShadowState );
|
rRenderer( aShadowState );
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw normal text
|
|
||||||
rRenderer( rRenderState );
|
|
||||||
|
|
||||||
// draw relief text, if enabled
|
// draw relief text, if enabled
|
||||||
if( rReliefColor != aEmptyColor )
|
if( rReliefColor != aEmptyColor )
|
||||||
{
|
{
|
||||||
@@ -575,6 +548,9 @@ namespace cppcanvas
|
|||||||
rRenderer( aReliefState );
|
rRenderer( aReliefState );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// draw normal text
|
||||||
|
rRenderer( rRenderState );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1157,7 +1133,7 @@ namespace cppcanvas
|
|||||||
::Color( 0x80FF0000 ) );
|
::Color( 0x80FF0000 ) );
|
||||||
|
|
||||||
if( maState.Clip.is() )
|
if( maState.Clip.is() )
|
||||||
mpCanvas->getUNOCanvas()->fillPolyPolygon( maState.Clip,
|
mpCanvas->getUNOCanvas()->drawPolyPolygon( maState.Clip,
|
||||||
mpCanvas->getViewState(),
|
mpCanvas->getViewState(),
|
||||||
aLocalState );
|
aLocalState );
|
||||||
|
|
||||||
@@ -2086,7 +2062,12 @@ namespace cppcanvas
|
|||||||
rVDev.SetMapMode( aOldMapMode );
|
rVDev.SetMapMode( aOldMapMode );
|
||||||
|
|
||||||
const uno::Sequence< double > aCharWidthSeq(
|
const uno::Sequence< double > aCharWidthSeq(
|
||||||
setupDXArray( pDXArray, nLen, rVDev ) );
|
pDXArray ?
|
||||||
|
setupDXArray( pDXArray, nLen, rVDev ) :
|
||||||
|
setupDXArray( rText,
|
||||||
|
nStartPos,
|
||||||
|
nLen,
|
||||||
|
rVDev ) );
|
||||||
const uno::Reference< rendering::XPolyPolygon2D > xTextPoly(
|
const uno::Reference< rendering::XPolyPolygon2D > xTextPoly(
|
||||||
::vcl::unotools::xPolyPolygonFromPolyPolygon(
|
::vcl::unotools::xPolyPolygonFromPolyPolygon(
|
||||||
rCanvas->getUNOCanvas()->getDevice(),
|
rCanvas->getUNOCanvas()->getDevice(),
|
||||||
|
Reference in New Issue
Block a user