summaryrefslogtreecommitdiff
path: root/cppcanvas/source
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-06-11 11:21:56 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-06-11 11:41:23 +0200
commiteb0a738d1b3f1a9df41d55a1defd349264486920 (patch)
treec0c89aa4eea72b4631bdefb352d666ad72849100 /cppcanvas/source
parent2933de9ce0f820e59ac4eef796fdde2566e38d42 (diff)
Refactor a bit the code while reading it
Change-Id: I58693bb4ffe0f59365069a87fc30081ddf226eaa
Diffstat (limited to 'cppcanvas/source')
-rw-r--r--cppcanvas/source/mtfrenderer/emfplus.cxx32
1 files changed, 2 insertions, 30 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 7b740478f6e2..7817a79a3df2 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1474,50 +1474,22 @@ namespace cppcanvas
EMFPPath path (points, true);
path.Read (rMF, flags, *this);
-
EMFPPlusFillPolygon (path.GetPolygon (*this), rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor);
break;
}
case EmfPlusRecordTypeDrawLines:
{
- sal_uInt32 index = flags & 0xff;
sal_uInt32 points;
rMF >> points;
- SAL_INFO("cppcanvas.emf", "EMF+ DrawLines in slot: " << index << " points: " << points);
+ SAL_INFO("cppcanvas.emf", "EMF+ DrawLines in slot: " << (flags && 0xff) << " points: " << points);
EMFPPath path (points, true);
path.Read (rMF, flags, *this);
- EMFPPen* pen = (EMFPPen*) aObjects [index];
-
- rState.isFillColorSet = false;
- rState.isLineColorSet = true;
- rState.lineColor = ::vcl::unotools::colorToDoubleSequence (pen->GetColor (),
- rCanvas->getUNOCanvas ()->getDevice()->getDeviceColorSpace() );
- ::basegfx::B2DPolyPolygon& polygon (path.GetPolygon (*this));
-
- polygon.transform( rState.mapModeTransform );
-
- rendering::StrokeAttributes aStrokeAttributes;
-
- pen->SetStrokeAttributes (aStrokeAttributes, *this, rState);
-
- ActionSharedPtr pPolyAction(
- internal::PolyPolyActionFactory::createPolyPolyAction(
- polygon, rFactoryParms.mrCanvas, rState, aStrokeAttributes ) );
-
- if( pPolyAction )
- {
- maActions.push_back(
- MtfAction(
- pPolyAction,
- rFactoryParms.mrCurrActionIndex ) );
-
- rFactoryParms.mrCurrActionIndex += pPolyAction->getActionCount()-1;
- }
+ EMFPPlusDrawPolygon (path.GetPolygon (*this), rFactoryParms, rState, rCanvas, flags);
break;
}