on master help sign in
Fix rendering of lineJoin.
2aeeae7evancz
libraries/Graphics/Collage.elm−1
@@ -2,7 +2,6 @@
2module Graphics.Collage where
2module Graphics.Collage where
3
3
4import Either
4import Either
5−import Graphics.LineStyle as LS
6import Graphics.Geometry
5import Graphics.Geometry
7import Native.Graphics.Matrix as Matrix
6import Native.Graphics.Matrix as Matrix
8import Native.Graphics.Collage as N
7import Native.Graphics.Collage as N
runtime/Render/Collage.js+3−1
@@ -63,7 +63,9 @@ function customLineHelp(ctx, style, path) {
63function drawLine(ctx, style, path) {
63function drawLine(ctx, style, path) {
64 ctx.lineWidth = style.width;
64 ctx.lineWidth = style.width;
65 ctx.lineCap = style.cap.ctor.toLowerCase();
65 ctx.lineCap = style.cap.ctor.toLowerCase();
66+ var join = style.join.ctor;
66− ctx.lineJoin = style.join.ctor.toLowerCase();
67+ ctx.lineJoin = join === 'Smooth' ? 'round' :
68+ join === 'Sharp' ? 'miter' : 'bevel';
67 ctx.miterLimit = style.miterLimit;
69 ctx.miterLimit = style.miterLimit;
68 ctx.strokeStyle = extract(style.color);
70 ctx.strokeStyle = extract(style.color);
69 return line(ctx, style, path);
71 return line(ctx, style, path);