P
P
pashablya12014-02-28 22:18:07
Android
pashablya1, 2014-02-28 22:18:07

How to make an infinite canvas (at least a very large one)?

I create my own view inside which I draw a bitmap in the onDraw method. The maximum was to create a bitmap the size of the view itself (which is full screen) multiplied by 3, and at the same time the whole application slows down terribly, if you create a bitmap with the size of the view multiplied by 4, openGl error Out of memory pops up in the logs.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
svd71, 2014-02-28
@svd71

We can only advise you to make several bitmaps and load them according to the algorithm.

V
VoidVolker, 2014-03-01
@VoidVolker

No way. Different browsers have different limits on the size of the canvas and different reactions or lack thereof: from 3000 to 32767 pixels. In Chrome, this is due to the implementation of the Skia library, link to the bug report: https://code.google.com/p/skia/issues/detail?id=2122
Therefore, displaying large images in the canvas is possible only in the following ways: on a set of canvases or by rendering a part of the image to the canvas.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question