diff options
Diffstat (limited to 'drawinglayer/source/processor2d')
22 files changed, 27 insertions, 22 deletions
diff --git a/drawinglayer/source/processor2d/baseprocessor2d.cxx b/drawinglayer/source/processor2d/baseprocessor2d.cxx index 71c46039ca26..71c46039ca26 100644..100755 --- a/drawinglayer/source/processor2d/baseprocessor2d.cxx +++ b/drawinglayer/source/processor2d/baseprocessor2d.cxx diff --git a/drawinglayer/source/processor2d/canvasprocessor.cxx b/drawinglayer/source/processor2d/canvasprocessor.cxx index dce0b8533e68..dce0b8533e68 100644..100755 --- a/drawinglayer/source/processor2d/canvasprocessor.cxx +++ b/drawinglayer/source/processor2d/canvasprocessor.cxx diff --git a/drawinglayer/source/processor2d/contourextractor2d.cxx b/drawinglayer/source/processor2d/contourextractor2d.cxx index 11eb9ac310a4..11eb9ac310a4 100644..100755 --- a/drawinglayer/source/processor2d/contourextractor2d.cxx +++ b/drawinglayer/source/processor2d/contourextractor2d.cxx diff --git a/drawinglayer/source/processor2d/helperchartrenderer.cxx b/drawinglayer/source/processor2d/helperchartrenderer.cxx index 163fc9a8a17f..163fc9a8a17f 100644..100755 --- a/drawinglayer/source/processor2d/helperchartrenderer.cxx +++ b/drawinglayer/source/processor2d/helperchartrenderer.cxx diff --git a/drawinglayer/source/processor2d/helperchartrenderer.hxx b/drawinglayer/source/processor2d/helperchartrenderer.hxx index e6dce19355c6..e6dce19355c6 100644..100755 --- a/drawinglayer/source/processor2d/helperchartrenderer.hxx +++ b/drawinglayer/source/processor2d/helperchartrenderer.hxx diff --git a/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx b/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx index a1d886790c47..a1d886790c47 100644..100755 --- a/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx +++ b/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx diff --git a/drawinglayer/source/processor2d/helperwrongspellrenderer.hxx b/drawinglayer/source/processor2d/helperwrongspellrenderer.hxx index 476ea4b5692c..476ea4b5692c 100644..100755 --- a/drawinglayer/source/processor2d/helperwrongspellrenderer.hxx +++ b/drawinglayer/source/processor2d/helperwrongspellrenderer.hxx diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx index 387bdfbf6814..387bdfbf6814 100644..100755 --- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx +++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx diff --git a/drawinglayer/source/processor2d/linegeometryextractor2d.cxx b/drawinglayer/source/processor2d/linegeometryextractor2d.cxx index 8a2461010b4a..8a2461010b4a 100644..100755 --- a/drawinglayer/source/processor2d/linegeometryextractor2d.cxx +++ b/drawinglayer/source/processor2d/linegeometryextractor2d.cxx diff --git a/drawinglayer/source/processor2d/makefile.mk b/drawinglayer/source/processor2d/makefile.mk index ec7b8aef647b..ec7b8aef647b 100644..100755 --- a/drawinglayer/source/processor2d/makefile.mk +++ b/drawinglayer/source/processor2d/makefile.mk diff --git a/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx b/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx index ec31aa97d8de..ec31aa97d8de 100644..100755 --- a/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx +++ b/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx diff --git a/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx b/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx index 711f2a1b60cb..3ea20b94f7e6 100644..100755 --- a/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx +++ b/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx @@ -85,15 +85,18 @@ namespace drawinglayer aOutlineRange.transform(aSimpleObjectMatrix); } - // prepare dest coor - const Rectangle aDestRectPixel( - basegfx::fround(aOutlineRange.getMinX()), basegfx::fround(aOutlineRange.getMinY()), - basegfx::fround(aOutlineRange.getMaxX()), basegfx::fround(aOutlineRange.getMaxY())); + // prepare dest coordinates + const Point aPoint( + basegfx::fround(aOutlineRange.getMinX()), + basegfx::fround(aOutlineRange.getMinY())); + const Size aSize( + basegfx::fround(aOutlineRange.getWidth()), + basegfx::fround(aOutlineRange.getHeight())); // paint it using GraphicManager Graphic aGraphic(rBitmapEx); GraphicObject aGraphicObject(aGraphic); - aGraphicObject.Draw(&rOutDev, aDestRectPixel.TopLeft(), aDestRectPixel.GetSize(), &aAttributes); + aGraphicObject.Draw(&rOutDev, aPoint, aSize, &aAttributes); } void RenderBitmapPrimitive2D_BitmapEx( @@ -107,9 +110,13 @@ namespace drawinglayer // prepare dest coor. Necessary to expand since vcl's DrawBitmapEx draws one pix less basegfx::B2DRange aOutlineRange(0.0, 0.0, 1.0, 1.0); aOutlineRange.transform(rTransform); - const Rectangle aDestRectPixel( - basegfx::fround(aOutlineRange.getMinX()), basegfx::fround(aOutlineRange.getMinY()), - basegfx::fround(aOutlineRange.getMaxX()), basegfx::fround(aOutlineRange.getMaxY())); + // prepare dest coordinates + const Point aPoint( + basegfx::fround(aOutlineRange.getMinX()), + basegfx::fround(aOutlineRange.getMinY())); + const Size aSize( + basegfx::fround(aOutlineRange.getWidth()), + basegfx::fround(aOutlineRange.getHeight())); // decompose matrix to check for shear, rotate and mirroring basegfx::B2DVector aScale, aTranslate; @@ -135,7 +142,7 @@ namespace drawinglayer } // draw bitmap - rOutDev.DrawBitmapEx(aDestRectPixel.TopLeft(), aDestRectPixel.GetSize(), aContent); + rOutDev.DrawBitmapEx(aPoint, aSize, aContent); } void RenderBitmapPrimitive2D_self( @@ -147,8 +154,10 @@ namespace drawinglayer basegfx::B2DRange aOutlineRange(0.0, 0.0, 1.0, 1.0); aOutlineRange.transform(rTransform); const Rectangle aDestRectLogic( - basegfx::fround(aOutlineRange.getMinX()), basegfx::fround(aOutlineRange.getMinY()), - basegfx::fround(aOutlineRange.getMaxX()), basegfx::fround(aOutlineRange.getMaxY())); + basegfx::fround(aOutlineRange.getMinX()), + basegfx::fround(aOutlineRange.getMinY()), + basegfx::fround(aOutlineRange.getMaxX()), + basegfx::fround(aOutlineRange.getMaxY())); const Rectangle aDestRectPixel(rOutDev.LogicToPixel(aDestRectLogic)); // #i96708# check if Metafile is recorded @@ -162,18 +171,19 @@ namespace drawinglayer if(!aCroppedRectPixel.IsEmpty()) { - // as maximum for destination, orientate at SourceSizePixel, but + // as maximum for destination, orientate at aOutputRectPixel, but // take a rotation of 45 degrees (sqrt(2)) as maximum expansion into account const Size aSourceSizePixel(rBitmapEx.GetSizePixel()); const double fMaximumArea( - (double)aSourceSizePixel.getWidth() * - (double)aSourceSizePixel.getHeight() * + (double)aOutputRectPixel.getWidth() * + (double)aOutputRectPixel.getHeight() * 1.4142136); // 1.4142136 taken as sqrt(2.0) // test if discrete view size (pixel) maybe too big and limit it const double fArea(aCroppedRectPixel.getWidth() * aCroppedRectPixel.getHeight()); const bool bNeedToReduce(fArea > fMaximumArea); double fReduceFactor(1.0); + const Size aDestSizePixel(aCroppedRectPixel.GetSize()); if(bNeedToReduce) { @@ -220,11 +230,6 @@ namespace drawinglayer if(bNeedToReduce) { // paint in target size - const double fFactor(1.0 / fReduceFactor); - const Size aDestSizePixel( - basegfx::fround(aCroppedRectPixel.getWidth() * fFactor), - basegfx::fround(aCroppedRectPixel.getHeight() * fFactor)); - if(bRecordToMetaFile) { rOutDev.DrawBitmapEx( diff --git a/drawinglayer/source/processor2d/vclhelperbitmaprender.hxx b/drawinglayer/source/processor2d/vclhelperbitmaprender.hxx index cca5d19f72f0..cca5d19f72f0 100644..100755 --- a/drawinglayer/source/processor2d/vclhelperbitmaprender.hxx +++ b/drawinglayer/source/processor2d/vclhelperbitmaprender.hxx diff --git a/drawinglayer/source/processor2d/vclhelperbitmaptransform.cxx b/drawinglayer/source/processor2d/vclhelperbitmaptransform.cxx index 3e4b98655f18..3e4b98655f18 100644..100755 --- a/drawinglayer/source/processor2d/vclhelperbitmaptransform.cxx +++ b/drawinglayer/source/processor2d/vclhelperbitmaptransform.cxx diff --git a/drawinglayer/source/processor2d/vclhelperbitmaptransform.hxx b/drawinglayer/source/processor2d/vclhelperbitmaptransform.hxx index d1529aee6acf..d1529aee6acf 100644..100755 --- a/drawinglayer/source/processor2d/vclhelperbitmaptransform.hxx +++ b/drawinglayer/source/processor2d/vclhelperbitmaptransform.hxx diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx index 317170fbb66d..317170fbb66d 100644..100755 --- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx +++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx index adf54a42671e..adf54a42671e 100644..100755 --- a/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx +++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx diff --git a/drawinglayer/source/processor2d/vclhelpergradient.cxx b/drawinglayer/source/processor2d/vclhelpergradient.cxx index 15475db15746..15475db15746 100644..100755 --- a/drawinglayer/source/processor2d/vclhelpergradient.cxx +++ b/drawinglayer/source/processor2d/vclhelpergradient.cxx diff --git a/drawinglayer/source/processor2d/vclhelpergradient.hxx b/drawinglayer/source/processor2d/vclhelpergradient.hxx index 562eb7e53865..562eb7e53865 100644..100755 --- a/drawinglayer/source/processor2d/vclhelpergradient.hxx +++ b/drawinglayer/source/processor2d/vclhelpergradient.hxx diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index ceb8e8d5dd47..c0cc47c4a41e 100644..100755 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -356,7 +356,7 @@ namespace drawinglayer SvMemoryStream aMemStm; aMemStm << *pSvtGraphicFill; - mpMetaFile->AddAction(new MetaCommentAction("XPATHFILL_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); + mpMetaFile->AddAction(new MetaCommentAction("XPATHFILL_SEQ_BEGIN", 0, static_cast< const sal_uInt8* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); mnSvtGraphicFillCount++; } } @@ -509,7 +509,7 @@ namespace drawinglayer SvMemoryStream aMemStm; aMemStm << *pSvtGraphicStroke; - mpMetaFile->AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); + mpMetaFile->AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_BEGIN", 0, static_cast< const sal_uInt8* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); mnSvtGraphicStrokeCount++; } } @@ -965,7 +965,7 @@ namespace drawinglayer { const rtl::OUString& rURL = rFieldPrimitive.getString(); const String aOldString(rURL); - mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const BYTE* >(aOldString.GetBuffer()), 2 * aOldString.Len())); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const sal_uInt8* >(aOldString.GetBuffer()), 2 * aOldString.Len())); break; } } diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 6b7e977f4f98..6b7e977f4f98 100644..100755 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 3968caa287c0..3968caa287c0 100644..100755 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx |