INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED

2004/09/06 13:31:24 thb 1.2.2.3: #110496# Added special case to stroke hair lines (by calling XCanvas::drawPolyPolygon())
2004/07/20 19:09:07 thb 1.2.2.2: #110496# Unified include statements; removed external prefix from boost includes
2004/04/05 15:58:54 thb 1.2.2.1: Resync with canvas01 changes
This commit is contained in:
Rüdiger Timm
2004-11-26 20:01:35 +00:00
parent b25f541300
commit c1b8bc3841

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: implpolypolygon.cxx,v $ * $RCSfile: implpolypolygon.cxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: thb $ $Date: 2004-03-18 10:41:12 $ * last change: $Author: rt $ $Date: 2004-11-26 21:01:35 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -59,6 +59,17 @@
* *
************************************************************************/ ************************************************************************/
#ifndef INCLUDED_RTL_MATH_HXX
#include <rtl/math.hxx>
#endif
#ifndef _DRAFTS_COM_SUN_STAR_RENDERING_PATHJOINTYPE_HPP_
#include <drafts/com/sun/star/rendering/PathJoinType.hpp>
#endif
#ifndef _DRAFTS_COM_SUN_STAR_RENDERING_PATHCAPTYPE_HPP_
#include <drafts/com/sun/star/rendering/PathCapType.hpp>
#endif
#ifndef _BGFX_MATRIX_B2DHOMMATRIX_HXX #ifndef _BGFX_MATRIX_B2DHOMMATRIX_HXX
#include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/matrix/b2dhommatrix.hxx>
#endif #endif
@@ -66,8 +77,8 @@
#include <basegfx/tools/canvastools.hxx> #include <basegfx/tools/canvastools.hxx>
#endif #endif
#include "implpolypolygon.hxx" #include <implpolypolygon.hxx>
#include "tools.hxx" #include <tools.hxx>
using namespace ::drafts::com::sun::star; using namespace ::drafts::com::sun::star;
@@ -82,6 +93,13 @@ namespace cppcanvas
const uno::Reference< rendering::XPolyPolygon2D >& rPolyPoly ) : const uno::Reference< rendering::XPolyPolygon2D >& rPolyPoly ) :
CanvasGraphicHelper( rParentCanvas ), CanvasGraphicHelper( rParentCanvas ),
mxPolyPoly( rPolyPoly ), mxPolyPoly( rPolyPoly ),
maStrokeAttributes(1.0,
10.0,
uno::Sequence< double >(),
uno::Sequence< double >(),
rendering::PathCapType::ROUND,
rendering::PathCapType::ROUND,
rendering::PathJoinType::ROUND ),
maFillColor(), maFillColor(),
maStrokeColor(), maStrokeColor(),
mbFillColorSet( false ), mbFillColorSet( false ),
@@ -183,7 +201,7 @@ namespace cppcanvas
"ImplBitmap::draw: invalid canvas" ); "ImplBitmap::draw: invalid canvas" );
if( pCanvas.get() == NULL || if( pCanvas.get() == NULL ||
pCanvas->getUNOCanvas().is() ) !pCanvas->getUNOCanvas().is() )
return false; return false;
if( mbFillColorSet ) if( mbFillColorSet )
@@ -199,10 +217,15 @@ namespace cppcanvas
{ {
maRenderState.DeviceColor = maStrokeColor; maRenderState.DeviceColor = maStrokeColor;
pCanvas->getUNOCanvas()->strokePolyPolygon( mxPolyPoly, if( ::rtl::math::approxEqual(maStrokeAttributes.StrokeWidth, 1.0) )
pCanvas->getViewState(), pCanvas->getUNOCanvas()->drawPolyPolygon( mxPolyPoly,
maRenderState, pCanvas->getViewState(),
maStrokeAttributes ); maRenderState );
else
pCanvas->getUNOCanvas()->strokePolyPolygon( mxPolyPoly,
pCanvas->getViewState(),
maRenderState,
maStrokeAttributes );
} }
return true; return true;