diff --git a/img2.png b/img2.png index 7acd7d8..44556b1 100644 Binary files a/img2.png and b/img2.png differ diff --git a/share-pic.js b/share-pic.js index b36e75c..1e42ef2 100644 --- a/share-pic.js +++ b/share-pic.js @@ -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); @@ -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