T
T
toddbarry2018-09-12 17:30:25
Canvas
toddbarry, 2018-09-12 17:30:25

How to determine the color of a pixel outside of the canvas?

Good afternoon, I can not solve the problem of determining the color of a pixel outside the canvas.
I'm using a third party library that draws graphs on a canvas. the image on the canvas can be panned and zoomed.
getImageData() works fine when I'm interested in the color of a pixel within the canvas, however sometimes (often) I need to determine the color of a pixel that is panned out of the canvas. But in this case, getImageData() says the pixel is transparent.
How can I get the color of a pixel outside of the canvas?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GreatRash, 2018-09-12
@toddbarry

There are no pixels outside the canvas. You probably need to memorize the entire array of pixels before you pan/zoom.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question