summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2012-01-17 16:54:04 +0000
committerArmin Le Grand <alg@apache.org>2012-01-17 16:54:04 +0000
commit2a0cd925bebb0c7d3513db311b185a04f259b68d (patch)
tree8d1ed154b241a9823c54b76ed091ecb6b6935a9d /vcl/win
parent63480c993d8e2fb0929d3c39f621aae9443faa04 (diff)
linecap: Reintegrating finished LineCap feature, kudos to Regina Henschel for doing the basic implementation and offering it under apache license
Notes
Notes: merged as: 44cfc7cb6533d827fd2d6e586d92c61d7d7f7a70
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/source/gdi/salgdi_gdiplus.cxx28
1 files changed, 27 insertions, 1 deletions
diff --git a/vcl/win/source/gdi/salgdi_gdiplus.cxx b/vcl/win/source/gdi/salgdi_gdiplus.cxx
index f8430d25bc5d..6fc73b86d02c 100644
--- a/vcl/win/source/gdi/salgdi_gdiplus.cxx
+++ b/vcl/win/source/gdi/salgdi_gdiplus.cxx
@@ -187,7 +187,12 @@ bool WinSalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPoly
return true;
}
-bool WinSalGraphics::drawPolyLine( const basegfx::B2DPolygon& rPolygon, double fTransparency, const basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin eLineJoin )
+bool WinSalGraphics::drawPolyLine(
+ const basegfx::B2DPolygon& rPolygon,
+ double fTransparency,
+ const basegfx::B2DVector& rLineWidths,
+ basegfx::B2DLineJoin eLineJoin,
+ com::sun::star::drawing::LineCap eLineCap)
{
const sal_uInt32 nCount(rPolygon.count());
@@ -230,6 +235,27 @@ bool WinSalGraphics::drawPolyLine( const basegfx::B2DPolygon& rPolygon, double f
}
}
+ switch(eLineCap)
+ {
+ default: /*com::sun::star::drawing::LineCap_BUTT*/
+ {
+ // nothing to do
+ break;
+ }
+ case com::sun::star::drawing::LineCap_ROUND:
+ {
+ aTestPen.SetStartCap(Gdiplus::LineCapRound);
+ aTestPen.SetEndCap(Gdiplus::LineCapRound);
+ break;
+ }
+ case com::sun::star::drawing::LineCap_SQUARE:
+ {
+ aTestPen.SetStartCap(Gdiplus::LineCapSquare);
+ aTestPen.SetEndCap(Gdiplus::LineCapSquare);
+ break;
+ }
+ }
+
if(nCount > 250 && basegfx::fTools::more(rLineWidths.getX(), 1.5))
{
impAddB2DPolygonToGDIPlusGraphicsPathInteger(aPath, rPolygon, bNoLineJoin);