Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JAMSVGImage containsPoint:] does not account for changed size. #18

Open
rwe opened this issue Apr 18, 2015 · 1 comment
Open

[JAMSVGImage containsPoint:] does not account for changed size. #18

rwe opened this issue Apr 18, 2015 · 1 comment

Comments

@rwe
Copy link
Contributor

rwe commented Apr 18, 2015

If you have a large SVG (say, 512x512) and a small JAMSVGImageView (say, 32x32), although the image will render correctly, hit tests with [JAMSVGImageView pointInside: withEvent:] will incorrectly fail due to [JAMSVGImage containsPoint:] testing against the original path dimensions rather than the actually rendered ones.

@rwe
Copy link
Contributor Author

rwe commented Apr 24, 2015

Actually, there are two issues here:

  1. JAMSVGImageView should transform the point from its coordinate system (including bounds and contentMode) before handing the transformed point to JAMSVGImage.
  2. JAMSVGImage needs to apply its entire viewBox transformation to that point before handing it down to JAMSVGStyledBezierPath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant