incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1232793 - in /incubator/ooo/trunk/main: svx/source/xoutdev/xattr2.cxx vcl/aqua/source/gdi/salgdi.cxx
Date Wed, 18 Jan 2012 09:05:29 GMT
Author: alg
Date: Wed Jan 18 09:05:28 2012
New Revision: 1232793

URL: http://svn.apache.org/viewvc?rev=1232793&view=rev
Log:
linecap: correctons for WaE and mac drawing

Modified:
    incubator/ooo/trunk/main/svx/source/xoutdev/xattr2.cxx
    incubator/ooo/trunk/main/vcl/aqua/source/gdi/salgdi.cxx

Modified: incubator/ooo/trunk/main/svx/source/xoutdev/xattr2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/xoutdev/xattr2.cxx?rev=1232793&r1=1232792&r2=1232793&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/xoutdev/xattr2.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/xoutdev/xattr2.cxx Wed Jan 18 09:05:28 2012
@@ -451,7 +451,7 @@ com::sun::star::drawing::LineCap XLineCa
         || com::sun::star::drawing::LineCap_ROUND == eRetval
         || com::sun::star::drawing::LineCap_SQUARE == eRetval, "Unknown enum value in XATTR_LINECAP
(!)");
 
-    return (com::sun::star::drawing::LineCap)SfxEnumItem::GetValue(); 
+    return eRetval; 
 }
 
 //------------------------------

Modified: incubator/ooo/trunk/main/vcl/aqua/source/gdi/salgdi.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/aqua/source/gdi/salgdi.cxx?rev=1232793&r1=1232792&r2=1232793&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/aqua/source/gdi/salgdi.cxx (original)
+++ incubator/ooo/trunk/main/vcl/aqua/source/gdi/salgdi.cxx Wed Jan 18 09:05:28 2012
@@ -1013,6 +1013,28 @@ bool AquaSalGraphics::drawPolyLine( 
 		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 );
@@ -1030,6 +1052,7 @@ bool AquaSalGraphics::drawPolyLine( 
         CGContextSetShouldAntialias( mrContext, true );
         CGContextSetAlpha( mrContext, 1.0 - fTransparency ); 
         CGContextSetLineJoin( mrContext, aCGLineJoin );
+        CGContextSetLineCap( mrContext, aCGLineCap );
         CGContextSetLineWidth( mrContext, rLineWidths.getX() );
         CGContextDrawPath( mrContext, kCGPathStroke );
         CGContextRestoreGState( mrContext );



Mime
View raw message