mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement CanvasRenderingContext2D.getTransform()
This commit is contained in:
parent
6b2079e5b3
commit
588c09b580
16 changed files with 42 additions and 22 deletions
|
@ -20,6 +20,7 @@ use crate::dom::bindings::str::DOMString;
|
|||
use crate::dom::canvasgradient::CanvasGradient;
|
||||
use crate::dom::canvaspattern::CanvasPattern;
|
||||
use crate::dom::canvasrenderingcontext2d::CanvasRenderingContext2D;
|
||||
use crate::dom::dommatrix::DOMMatrix;
|
||||
use crate::dom::paintworkletglobalscope::PaintWorkletGlobalScope;
|
||||
use crate::euclidext::Size2DExt;
|
||||
use canvas_traits::canvas::CanvasImageData;
|
||||
|
@ -119,6 +120,11 @@ impl PaintRenderingContext2DMethods for PaintRenderingContext2D {
|
|||
self.context.Transform(a, b, c, d, e, f)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-gettransform
|
||||
fn GetTransform(&self) -> DomRoot<DOMMatrix> {
|
||||
self.context.GetTransform()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-settransform
|
||||
fn SetTransform(&self, a: f64, b: f64, c: f64, d: f64, e: f64, f: f64) {
|
||||
self.context.SetTransform(a, b, c, d, e, f);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue