Skip to content

Commit

Permalink
father right rect
Browse files Browse the repository at this point in the history
  • Loading branch information
bramses committed Sep 27, 2023
1 parent 640678a commit f72c750
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified img2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions share-pic.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ async function overlayTextOnImage(imageUrl, text) {


// superimpose the rectangle on the canvas as a 1px red border for debugging
ctx.strokeStyle = "red";
ctx.lineWidth = 1;
ctx.strokeRect(rectX, rectY, rectWidth, rectHeight);
// ctx.strokeStyle = "red";
// ctx.lineWidth = 1;
// ctx.strokeRect(rectX, rectY, rectWidth, rectHeight);

// Fetch and load the image
const img = await loadImage(imageUrl);
Expand Down Expand Up @@ -238,7 +238,7 @@ async function overlayTextOnImage(imageUrl, text) {
const linesAfterCitation = lines.slice(citationIndex);
const rectangleHeight = (linesBeforeCitation.length - 3) * (fontSize + 10); // Exclude the last line (citation)
ctx.fillRect(
4,
12,
rectY,
rectangleWidth,
rectangleHeight
Expand Down

0 comments on commit f72c750

Please sign in to comment.