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

Add bindings for CanvasTransform.setTransform(DOMMatrix2DInit) #3580

Merged
merged 1 commit into from Aug 29, 2023

Conversation

daxpedda
Copy link
Collaborator

As in the title.

See:
MDN
WHATWG spec (Firefox WebIDL)
Geometry Interfaces

Fixes #3578.

@daxpedda daxpedda merged commit 7e4f73e into rustwasm:main Aug 29, 2023
25 checks passed
pub fn set_transform(this: &CanvasPattern, matrix: &SvgMatrix);
pub fn set_transform_with_default_dom_matrix_2d_init(this: &CanvasPattern, matrix: &SvgMatrix);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change (and not really a desirable one, either).

I can see what happened here: you used FIXED_INTERFACES to prevent CanvasRenderingContext2d::set_transform being changed to mean the DomMatrix overload with its default value, but that affected this method too since it doesn't distinguish between methods on different types.

I think FIXED_INTERFACES will have to be extended to allow specifying both the type name and method name to fix this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, I missed that somehow ... thank you @Liamolucko.

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 this pull request may close these issues.

web_sys: missing set_transform with matrix function
2 participants