Kaydet (Commit) 16091ff8 authored tarafından Xisco Fauli's avatar Xisco Fauli Kaydeden (comit) Katarina Behrens

tdf#125506 tdf#121241: No need to transform to DeviceCoordinates

Regression from b9fa01a8

Change-Id: Ie4ab65966e274bff4d699b7cd4dc0fd47d26c558
Reviewed-on: https://gerrit.libreoffice.org/73249
Tested-by: Jenkins
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst 3fc9ae8b
...@@ -874,19 +874,17 @@ bool AquaSalGraphics::drawPolyLine( ...@@ -874,19 +874,17 @@ bool AquaSalGraphics::drawPolyLine(
return false; return false;
#endif #endif
// Transform to DeviceCoordinates, get DeviceLineWidth, execute PixelSnapHairline
const basegfx::B2DVector aLineWidths(rObjectToDevice * rLineWidths);
// #i101491# Aqua does not support B2DLineJoin::NONE; return false to use // #i101491# Aqua does not support B2DLineJoin::NONE; return false to use
// the fallback (own geometry preparation) // the fallback (own geometry preparation)
// #i104886# linejoin-mode and thus the above only applies to "fat" lines // #i104886# linejoin-mode and thus the above only applies to "fat" lines
if( (basegfx::B2DLineJoin::NONE == eLineJoin) && (aLineWidths.getX() > 1.3) ) if( (basegfx::B2DLineJoin::NONE == eLineJoin) && (rLineWidths.getX() > 1.3) )
return false; return false;
// Transform to DeviceCoordinates, get DeviceLineWidth, execute PixelSnapHairline // Transform to DeviceCoordinates, get DeviceLineWidth, execute PixelSnapHairline
basegfx::B2DPolygon aPolyLine(rPolyLine); basegfx::B2DPolygon aPolyLine(rPolyLine);
aPolyLine.transform(rObjectToDevice); aPolyLine.transform(rObjectToDevice);
if(bPixelSnapHairline) { aPolyLine = basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(aPolyLine); } if(bPixelSnapHairline)
aPolyLine = basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(aPolyLine);
// setup line attributes // setup line attributes
CGLineJoin aCGLineJoin = kCGLineJoinMiter; CGLineJoin aCGLineJoin = kCGLineJoinMiter;
...@@ -948,7 +946,7 @@ bool AquaSalGraphics::drawPolyLine( ...@@ -948,7 +946,7 @@ bool AquaSalGraphics::drawPolyLine(
CGContextSetAlpha( maContextHolder.get(), 1.0 - fTransparency ); CGContextSetAlpha( maContextHolder.get(), 1.0 - fTransparency );
CGContextSetLineJoin( maContextHolder.get(), aCGLineJoin ); CGContextSetLineJoin( maContextHolder.get(), aCGLineJoin );
CGContextSetLineCap( maContextHolder.get(), aCGLineCap ); CGContextSetLineCap( maContextHolder.get(), aCGLineCap );
CGContextSetLineWidth( maContextHolder.get(), aLineWidths.getX() ); CGContextSetLineWidth( maContextHolder.get(), rLineWidths.getX() );
CGContextSetMiterLimit(maContextHolder.get(), fCGMiterLimit); CGContextSetMiterLimit(maContextHolder.get(), fCGMiterLimit);
SAL_INFO( "vcl.cg", "CGContextDrawPath(" << maContextHolder.get() << ",kCGPathStroke)" ); SAL_INFO( "vcl.cg", "CGContextDrawPath(" << maContextHolder.get() << ",kCGPathStroke)" );
CGContextDrawPath( maContextHolder.get(), kCGPathStroke ); CGContextDrawPath( maContextHolder.get(), kCGPathStroke );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment