mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Canvas: implement transformation matrix reset.
This commit is contained in:
parent
ccf1e6b9a7
commit
9302aaab96
6 changed files with 72 additions and 7 deletions
|
@ -413,6 +413,12 @@ impl<'a> CanvasRenderingContext2DMethods for JSRef<'a, CanvasRenderingContext2D>
|
|||
self.update_transform()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-resettransform
|
||||
fn ResetTransform(self) {
|
||||
self.state.borrow_mut().transform = Matrix2D::identity();
|
||||
self.update_transform()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-globalalpha
|
||||
fn GlobalAlpha(self) -> f64 {
|
||||
let state = self.state.borrow();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue