pocketsvg/PocketSVG

Scaling the SVGImageView the svg content (sometimes) disappears

NeedNap opened this issue · 4 comments

Steps to reproduce the issue

I have built a drawing editor where I can put an svg image object using PocketSVG library.
When I zoom in/out my virtual canvas, the the svg object is scaled using the CGAffineTransform sometimes
it happens that the svg is not drawn.
I tried setting the backgroundColor to the SVGImageView object, but all the view seems to disappear, not only the CGPaths drawn in its layer.

This is the result at 32% zoom factor:
Screenshot 2020-10-29 at 18 01 04

This is the result at 25% zoom factor:
Screenshot 2020-10-29 at 18 01 15

Specifications

  • PocketSVG Version: 2.6.0
  • Xcode Version: 12.1 (12A7403)
  • iOS/macOS Version: iOS 14.1

@NeedNap I've haven't been able to reproduce this on my end.. Could you please provide a link to a small repo with a reproducible example?

I get this strange behaviour in a huge project which I can't share. It's not easy to reproduce it on a separate repo. It seems to be related to the settings of the contentScaleFactor that I use to prevent the antialiasing blurred effect on zoom in.
I hope this further info will help you to understand the problem, otherwise I'll try to create a small repo (I can't guarantee to that shortly).

Sounds good, please let me know when you have a reproducible example.

Closing this due to inactivity. Feel free to reopen if needed.