Canvas does not render at bigger sizes : is there a maximum size? #269
Unanswered
jeremyallison
asked this question in
Q&A
Replies: 1 comment
-
I had the same issue and decided to dig through the code. On iOS at least, the screen resolution is scaled down from the device resolution, so there's a similar ratio applied to the canvas. You can find the device ratio by doing If you want to draw on something and have the native resolution coordinates, dividing by |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
For the purposes of my app I need to draw in a pretty big canvas, then pan / zoom the parent container using React native's
Animated
andreact-native-gesture-handler
.I need to draw a kind of map of [x, y] elements.
So of course the total canvas width / height will be
x * elementWidth
/y * elementHeight
When drawing bigger maps, the canvas simply does not display. I've tried setting fixed values to width / height, and manually decreasing them up to a point where the canvas actually shows.
It seems there is some kind of width / height limitation? But I can't seem to pinpoint how or why.
For example :
Result :

Whereas
Result :

Of course I could reduce the size of each individual item, but they would look more and more blurry with my pinch to zoom interaction.
I've looked up open / closed issues and could not find a similar one yet. Any ideas ? 💡
Beta Was this translation helpful? Give feedback.
All reactions