diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-11-06 16:39:47 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-11-06 16:41:44 +0200 |
commit | f354ba7a3aba1301f3951fdd9f74a38bd94255af (patch) | |
tree | 1ea81a550bd6ae4a2847b52fe064089fdead51af /vcl/ios | |
parent | b9c98414ec9084cf97b5dcc911fb9941b5e57ebb (diff) |
Unbreak compilation of the iOS vcl code
Note that this is code basically copy-pasted from the MacOSX ("aqua")
back-end with some small edits, and it is not clear at all that it
will eventually be used in this form at all. But until then, let's
keep it compiling.
Change-Id: Ia1bd63f2ecc621cd4ce699ffc754cab423321d42
Diffstat (limited to 'vcl/ios')
-rw-r--r-- | vcl/ios/source/gdi/salgdicommon.cxx | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/vcl/ios/source/gdi/salgdicommon.cxx b/vcl/ios/source/gdi/salgdicommon.cxx index bba57352f799..8642a3504a64 100644 --- a/vcl/ios/source/gdi/salgdicommon.cxx +++ b/vcl/ios/source/gdi/salgdicommon.cxx @@ -662,7 +662,8 @@ void IosSalGraphics::drawPixel( long nX, long nY, SalColor nSalColor ) bool IosSalGraphics::drawPolyLine( const ::basegfx::B2DPolygon& rPolyLine, double fTransparency, const ::basegfx::B2DVector& rLineWidths, - basegfx::B2DLineJoin eLineJoin ) + basegfx::B2DLineJoin eLineJoin, + com::sun::star::drawing::LineCap eLineCap ) { // short circuit if there is nothing to do const int nPointCount = rPolyLine.count(); @@ -694,6 +695,28 @@ bool IosSalGraphics::drawPolyLine( const ::basegfx::B2DPolygon& rPolyLine, case ::basegfx::B2DLINEJOIN_ROUND: aCGLineJoin = kCGLineJoinRound; break; } + // setup cap attribute + CGLineCap aCGLineCap(kCGLineCapButt); + + switch(eLineCap) + { + default: // com::sun::star::drawing::LineCap_BUTT: + { + aCGLineCap = kCGLineCapButt; + break; + } + case com::sun::star::drawing::LineCap_ROUND: + { + aCGLineCap = kCGLineCapRound; + break; + } + case com::sun::star::drawing::LineCap_SQUARE: + { + aCGLineCap = kCGLineCapSquare; + break; + } + } + // setup poly-polygon path CGMutablePathRef xPath = CGPathCreateMutable(); AddPolygonToPath( xPath, rPolyLine, rPolyLine.isClosed(), !getAntiAliasB2DDraw(), true ); @@ -711,6 +734,7 @@ bool IosSalGraphics::drawPolyLine( const ::basegfx::B2DPolygon& rPolyLine, CGContextSetShouldAntialias( mrContext, true ); CGContextSetAlpha( mrContext, 1.0 - fTransparency ); CGContextSetLineJoin( mrContext, aCGLineJoin ); + CGContextSetLineCap( mrContext, aCGLineCap ); CGContextSetLineWidth( mrContext, rLineWidths.getX() ); CGContextDrawPath( mrContext, kCGPathStroke ); CGContextRestoreGState( mrContext ); |