Skip to content

Commit

Permalink
more lines
Browse files Browse the repository at this point in the history
  • Loading branch information
aroary committed Jul 17, 2022
1 parent 08aa588 commit e44574a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function execute() {
ratio = ratio.split(":").map(Number);

const [height, width] = [500, Math.round(500 / (ratio[0] / ratio[1]))];
const lines = 20; // Determined to be acceptable.
const lines = 30; // Determined to be acceptable.

const background = await vscode.window.showInputBox({ placeHolder: "CSS Color", ignoreFocusOut: true, title: "Background color", value: "white", validateInput: colorValidation });
if (!background) return;
Expand All @@ -24,7 +24,7 @@ async function execute() {
<title>lorem ipsum</title>
<rect width="100%" height="100%" fill="${background}"/>
${new Array(lines).fill(undefined).map((line, index) => `<text x="50%" y="${(100 / (lines + 1)) * (index + 1)}%" fill="${foreground}" font-family="${vscode.workspace.getConfiguration("editor").get("fontFamily")}" dominant-baseline="middle" text-anchor="middle" textLength="80%">
${generate(20)}
${generate(Math.floor(width / 100) * 6)}
</text>`).join``}
</svg>
`;
Expand Down

0 comments on commit e44574a

Please sign in to comment.