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

Expose current_transform() for contexts #117

Merged
merged 3 commits into from
Jan 22, 2020
Merged

Conversation

scholtzan
Copy link
Contributor

@scholtzan scholtzan commented Jan 19, 2020

This is related to linebender/druid#430 and exposes current_transform() and required for linebender/druid#466

// todo
// current_transform() and get_transform() currently not implemented:
// https://github.com/rustwasm/wasm-bindgen/blob/f8354b3a88de013845a304ea77d8b9b9286a0d7b/crates/web-sys/webidls/enabled/CanvasRenderingContext2D.webidl#L136
Affine::default()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did open a PR to get this added: rustwasm/wasm-bindgen#1966
Not sure what the best way here is, wait until it's merged or return something like Affine::default() for now and change it later?

Copy link
Member

Choose a reason for hiding this comment

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

yea this looks good. I would also open an issue when this is merged.

Copy link
Contributor Author

@scholtzan scholtzan Jan 22, 2020

Choose a reason for hiding this comment

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

rustwasm/wasm-bindgen#1966 got merged, now we'll just have to wait until a new version gets released to use it

Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

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

Looks good! If we get this merged I'll do a release of piet and we can bring it into druid.

// todo
// current_transform() and get_transform() currently not implemented:
// https://github.com/rustwasm/wasm-bindgen/blob/f8354b3a88de013845a304ea77d8b9b9286a0d7b/crates/web-sys/webidls/enabled/CanvasRenderingContext2D.webidl#L136
Affine::default()
Copy link
Member

Choose a reason for hiding this comment

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

yea this looks good. I would also open an issue when this is merged.

piet-direct2d/src/lib.rs Outdated Show resolved Hide resolved
@cmyr
Copy link
Member

cmyr commented Jan 21, 2020

update: just merged #112, which means there's another backend we will want to add this to.

@scholtzan
Copy link
Contributor Author

This should be ready to get merged now

@cmyr cmyr merged commit c11e7a2 into linebender:master Jan 22, 2020
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.

2 participants