Closed DavidLJz closed 3 years ago
const canvas = document.getElementById("canva"); ... const qr = new QRious({ size: 250, value: 'value', foreground: 'black', });
I want to render the QRious object on already existing canvas with specific dimensions. How to do that?
Edit: Sorry, I figured it out
ctx = canvas.getContext("2d"); const img = new Image(); img.onload = () => { ctx.drawImage(img, 425, 700, 250, 250) }; img.src = qr.toDataURL('image/jpeg');
I want to render the QRious object on already existing canvas with specific dimensions. How to do that?
Edit: Sorry, I figured it out