Answer the question
In order to leave comments, you need to log in
Canvas & Retina: Shift image position on retina when getting getImageData() from one canvas and rendering part of the image in another?
I'm writing a pipette.
When moving the mouse on the canvas, I take the coordinates of the cursor and get the image and paste it into another canvas that is much smaller (preview yes colors)
//canvas.lowerCanvasEl - это htmk element canvas, его размеры 1920x1080
previewCanvas.ctx.drawImage(canvas.lowerCanvasEl, x - 7, y - 7, 128, 128, 0, 0, 128, 128) // у previewCanvas размеры 128x128
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question