change options, drop svg_out_path in favor of outputs list

This commit is contained in:
Platane
2022-04-11 23:19:33 +02:00
committed by GitHub
parent 579bcf1afe
commit 6b320a1ac4
25 changed files with 296 additions and 154 deletions

View File

@@ -6,10 +6,10 @@ import type { Point } from "@snk/types/point";
type Options = {
colorDots: Record<Color, string>;
colorEmpty: string;
colorBorder: string;
colorDotBorder: string;
sizeCell: number;
sizeDot: number;
sizeBorderRadius: number;
sizeDotBorderRadius: number;
cells?: Point[];
};
@@ -31,11 +31,11 @@ export const drawGrid = (
);
ctx.fillStyle = color;
ctx.strokeStyle = o.colorBorder;
ctx.strokeStyle = o.colorDotBorder;
ctx.lineWidth = 1;
ctx.beginPath();
pathRoundedRect(ctx, o.sizeDot, o.sizeDot, o.sizeBorderRadius);
pathRoundedRect(ctx, o.sizeDot, o.sizeDot, o.sizeDotBorderRadius);
ctx.fill();
ctx.stroke();

View File

@@ -7,11 +7,11 @@ import type { Snake } from "@snk/types/snake";
export type Options = {
colorDots: Record<Color, string>;
colorEmpty: string;
colorBorder: string;
colorDotBorder: string;
colorSnake: string;
sizeCell: number;
sizeDot: number;
sizeBorderRadius: number;
sizeDotBorderRadius: number;
cells?: Point[];
};