Saturday, 15 October 2022

Android Vector pixelating on zoom-in

I'm trying to create a zoomable ImageView that can display vector images (SVG converted to Vector Drawable) that doesn't loose it's sharpness when zooming in.

I've used multiple Zooming approaches like this or this to handle the zooming, pinching and dragging. This resulted in a blurry mess when trying to zoom in, as seen below.

As I understand it from this article, these approaches don't work because the vector is drawn to bitmap , therefore pixelating when zooming in.

Is there any workaround to redraw the vector for each zoom step? Or should I try to draw the vector in a bigger size before displaying it?

Any Help is appreciated.

blurry when zooming in

Redraw on zoom? Draw bigger Canvas, then zoom?



from Android Vector pixelating on zoom-in

No comments:

Post a Comment