mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
12 lines
309 B
JavaScript
12 lines
309 B
JavaScript
|
|
export function DrawPoint(ctx, x, y, rad, scale) {
|
|
ctx.beginPath();
|
|
ctx.arc(x, y, rad / scale, 0, 2 * Math.PI, false);
|
|
ctx.fill();
|
|
}
|
|
|
|
export function SetStyle(style, ctx, scale) {
|
|
ctx.lineWidth = style.lineWidth / scale;
|
|
ctx.strokeStyle = style.strokeStyle;
|
|
ctx.fillStyle = style.fillStyle;
|
|
}
|