svgcanvas/test/tests/scaledLine.js
k1w1 87d8a34ed6 Apply to scale to lineWidth.
This will only work if scaling is proportional, i.e. X and Y axes are scaled the same.
2022-07-17 11:08:10 -07:00

10 lines
231 B
JavaScript

export default function scaledLine(ctx) {
ctx.scale(1.5, 1.5);
for (var i = 0; i < 10; i++){
ctx.lineWidth = 1+i;
ctx.beginPath();
ctx.moveTo(5+i*14,5);
ctx.lineTo(5+i*14,140);
ctx.stroke();
}
};