Is there a way to prevent parts of objects from drawing, such as bitmaps or paths, that go beyond the borders Canvasin SurfaceView?
When I gradually scale the object outside the size Canvas, especially with blurry paint, it all slows down until it is ready, and I have to wait a few seconds to return control - it does not respond. I scale the object by moving my finger across the screen; if I do it too fast and scale it, then it really slows down the drawing.
I didn’t have the same problem when using just a regular canvas View, so I don’t know what slows it down. As if SurfaceViewreacting too quickly, and then overloaded.
So, one idea to improve this is to prevent drawing outside the canvas, but I'm not sure that it SurfaceViewhas such clipping options.
Lumis source
share