on master help sign in
Fix rendering of lineJoin.
commit2aeeae7239ed2d7d1eb197b66c072165e8895d7d authorevancz <info@elm-lang.org> dateTue 26 Mar 2013, 19:31 (14 years ago) parentaf64fc1
2 files changed+3−2
libraries/Graphics/Collage.elm−1 runtime/Render/Collage.js+3−1
libraries/Graphics/Collage.elm−1
@@ -2,7 +2,6 @@
22module Graphics.Collage where
33
44import Either
5−import Graphics.LineStyle as LS
65import Graphics.Geometry
76import Native.Graphics.Matrix as Matrix
87import Native.Graphics.Collage as N
runtime/Render/Collage.js+3−1
@@ -63,7 +63,9 @@ function customLineHelp(ctx, style, path) {
6363function drawLine(ctx, style, path) {
6464 ctx.lineWidth = style.width;
6565 ctx.lineCap = style.cap.ctor.toLowerCase();
66− ctx.lineJoin = style.join.ctor.toLowerCase();
66+ var join = style.join.ctor;
67+ ctx.lineJoin = join === 'Smooth' ? 'round' :
68+ join === 'Sharp' ? 'miter' : 'bevel';
6769 ctx.miterLimit = style.miterLimit;
6870 ctx.strokeStyle = extract(style.color);
6971 return line(ctx, style, path);