salgdi.cxx (5aaf853b) | salgdi.cxx (3324c5be) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 999 unchanged lines hidden (view full) --- 1008 switch( eLineJoin ) { 1009 case ::basegfx::B2DLINEJOIN_NONE: aCGLineJoin = /*TODO?*/kCGLineJoinMiter; break; 1010 case ::basegfx::B2DLINEJOIN_MIDDLE: aCGLineJoin = /*TODO?*/kCGLineJoinMiter; break; 1011 case ::basegfx::B2DLINEJOIN_BEVEL: aCGLineJoin = kCGLineJoinBevel; break; 1012 case ::basegfx::B2DLINEJOIN_MITER: aCGLineJoin = kCGLineJoinMiter; break; 1013 case ::basegfx::B2DLINEJOIN_ROUND: aCGLineJoin = kCGLineJoinRound; break; 1014 } 1015 | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 999 unchanged lines hidden (view full) --- 1008 switch( eLineJoin ) { 1009 case ::basegfx::B2DLINEJOIN_NONE: aCGLineJoin = /*TODO?*/kCGLineJoinMiter; break; 1010 case ::basegfx::B2DLINEJOIN_MIDDLE: aCGLineJoin = /*TODO?*/kCGLineJoinMiter; break; 1011 case ::basegfx::B2DLINEJOIN_BEVEL: aCGLineJoin = kCGLineJoinBevel; break; 1012 case ::basegfx::B2DLINEJOIN_MITER: aCGLineJoin = kCGLineJoinMiter; break; 1013 case ::basegfx::B2DLINEJOIN_ROUND: aCGLineJoin = kCGLineJoinRound; break; 1014 } 1015 |
1016 // setup cap attribute 1017 CGLineCap aCGLineCap(kCGLineCapButt); 1018 1019 switch(eLineCap) 1020 { 1021 default: // com::sun::star::drawing::LineCap_BUTT: 1022 { 1023 aCGLineCap = kCGLineCapButt; 1024 break; 1025 } 1026 case com::sun::star::drawing::LineCap_ROUND: 1027 { 1028 aCGLineCap = kCGLineCapRound; 1029 break; 1030 } 1031 case com::sun::star::drawing::LineCap_SQUARE: 1032 { 1033 aCGLineCap = kCGLineCapSquare; 1034 break; 1035 } 1036 } 1037 |
|
1016 // setup poly-polygon path 1017 CGMutablePathRef xPath = CGPathCreateMutable(); 1018 AddPolygonToPath( xPath, rPolyLine, rPolyLine.isClosed(), !getAntiAliasB2DDraw(), true ); 1019 1020 const CGRect aRefreshRect = CGPathGetBoundingBox( xPath ); 1021#ifndef NO_I97317_WORKAROUND 1022 // #i97317# workaround for Quartz having problems with drawing small polygons 1023 if( ! ((aRefreshRect.size.width <= 0.125) && (aRefreshRect.size.height <= 0.125)) ) 1024#endif 1025 { 1026 // use the path to prepare the graphics context 1027 CGContextSaveGState( mrContext ); 1028 CGContextAddPath( mrContext, xPath ); 1029 // draw path with antialiased line 1030 CGContextSetShouldAntialias( mrContext, true ); 1031 CGContextSetAlpha( mrContext, 1.0 - fTransparency ); 1032 CGContextSetLineJoin( mrContext, aCGLineJoin ); | 1038 // setup poly-polygon path 1039 CGMutablePathRef xPath = CGPathCreateMutable(); 1040 AddPolygonToPath( xPath, rPolyLine, rPolyLine.isClosed(), !getAntiAliasB2DDraw(), true ); 1041 1042 const CGRect aRefreshRect = CGPathGetBoundingBox( xPath ); 1043#ifndef NO_I97317_WORKAROUND 1044 // #i97317# workaround for Quartz having problems with drawing small polygons 1045 if( ! ((aRefreshRect.size.width <= 0.125) && (aRefreshRect.size.height <= 0.125)) ) 1046#endif 1047 { 1048 // use the path to prepare the graphics context 1049 CGContextSaveGState( mrContext ); 1050 CGContextAddPath( mrContext, xPath ); 1051 // draw path with antialiased line 1052 CGContextSetShouldAntialias( mrContext, true ); 1053 CGContextSetAlpha( mrContext, 1.0 - fTransparency ); 1054 CGContextSetLineJoin( mrContext, aCGLineJoin ); |
1055 CGContextSetLineCap( mrContext, aCGLineCap ); |
|
1033 CGContextSetLineWidth( mrContext, rLineWidths.getX() ); 1034 CGContextDrawPath( mrContext, kCGPathStroke ); 1035 CGContextRestoreGState( mrContext ); 1036 1037 // mark modified rectangle as updated 1038 RefreshRect( aRefreshRect ); 1039 } 1040 --- 1642 unchanged lines hidden --- | 1056 CGContextSetLineWidth( mrContext, rLineWidths.getX() ); 1057 CGContextDrawPath( mrContext, kCGPathStroke ); 1058 CGContextRestoreGState( mrContext ); 1059 1060 // mark modified rectangle as updated 1061 RefreshRect( aRefreshRect ); 1062 } 1063 --- 1642 unchanged lines hidden --- |