summaryrefslogtreecommitdiff
path: root/canvas/source/vcl/canvashelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'canvas/source/vcl/canvashelper.cxx')
-rw-r--r--canvas/source/vcl/canvashelper.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index a62057ce4a30..5cc5f3c42b73 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -266,7 +266,7 @@ namespace vclcanvas
const ::basegfx::B2DPolyPolygon& rPolyPoly(
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon) );
- const ::basegfx::B2DPolyPolygon aPolyPoly( tools::mapPolyPolygon( rPolyPoly, viewState, renderState ) );
+ const ::tools::PolyPolygon aPolyPoly( tools::mapPolyPolygon( rPolyPoly, viewState, renderState ) );
if( rPolyPoly.isClosed() )
{
@@ -284,9 +284,9 @@ namespace vclcanvas
// DrawPolygon(), and open ones via DrawPolyLine():
// closed polygons will simply already contain the
// closing segment.
- sal_uInt32 nSize( aPolyPoly.count() );
+ sal_uInt16 nSize( aPolyPoly.Count() );
- for( sal_uInt32 i=0; i<nSize; ++i )
+ for( sal_uInt16 i=0; i<nSize; ++i )
{
mpOutDevProvider->getOutDev().DrawPolyLine( aPolyPoly[i] );
@@ -476,7 +476,7 @@ namespace vclcanvas
::basegfx::B2DPolyPolygon aB2DPolyPoly(
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon));
aB2DPolyPoly.setClosed(true); // ensure closed poly, otherwise VCL does not fill
- const ::basegfx::B2DPolyPolygon aPolyPoly( tools::mapPolyPolygon(
+ const ::tools::PolyPolygon aPolyPoly( tools::mapPolyPolygon(
aB2DPolyPoly,
viewState, renderState ) );
const bool bSourceAlpha( renderState.CompositeOperation == rendering::CompositeOperation::SOURCE );
@@ -486,10 +486,8 @@ namespace vclcanvas
}
else
{
- const double dTransparency( (nTransparency + 128) / 255.0 );
- basegfx::B2DHomMatrix aIdentityMatrix;
- aIdentityMatrix.identity();
- mpOutDevProvider->getOutDev().DrawTransparent( aIdentityMatrix, aPolyPoly, dTransparency );
+ const int nTransPercent( (nTransparency * 100 + 128) / 255 ); // normal rounding, no truncation here
+ mpOutDevProvider->getOutDev().DrawTransparent( aPolyPoly, static_cast<sal_uInt16>(nTransPercent) );
}
if( mp2ndOutDevProvider )