Skip to content

Commit

Permalink
resize canvas to match
Browse files Browse the repository at this point in the history
  • Loading branch information
savardnm committed Jan 24, 2021
1 parent c0b0d34 commit 68e0174
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions text_image.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function wrapText(canvas, str){
line = "";
}
line += letter;

ctx.fillText(letter, x, y);

x+= metric.width;
Expand All @@ -77,6 +78,7 @@ function wrapText(canvas, str){

}


function resizeCanvas(canvas, str) {
let ctx = canvas.getContext('2d')

Expand Down

0 comments on commit 68e0174

Please sign in to comment.