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

isPointInPath() does not take transformation matrix into consideration #784

Closed
TooTallNate opened this issue Feb 20, 2024 · 0 comments · Fixed by #787
Closed

isPointInPath() does not take transformation matrix into consideration #784

TooTallNate opened this issue Feb 20, 2024 · 0 comments · Fixed by #787

Comments

@TooTallNate
Copy link

Given:

const ctx = canvas.getContext('2d');
ctx.translate(10, 10);
ctx.rect(0, 0, 100, 100);
console.log(ctx.isPointInPath(0, 0));
console.log(ctx.isPointInPath(10, 10));
console.log(ctx.isPointInPath(100, 100));
console.log(ctx.isPointInPath(110, 110));

In browser:

false
true
true
true

In @napi-rs/canvas:

true
true
true
false
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

Successfully merging a pull request may close this issue.

1 participant