Implement CanvasRenderingContext2D.getTransform()

This commit is contained in:
pylbrecht 2020-02-11 22:36:50 +01:00
parent 6b2079e5b3
commit 588c09b580
16 changed files with 42 additions and 22 deletions

View file

@ -919,6 +919,10 @@ impl<'a> CanvasData<'a> {
self.state.stroke_opts.set_miter_limit(limit);
}
pub fn get_transform(&self) -> Transform2D<f32> {
self.drawtarget.get_transform()
}
pub fn set_transform(&mut self, transform: &Transform2D<f32>) {
// If there is an in-progress path, store the existing transformation required
// to move between device and user space.