aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/paintrenderingcontext2d.rs
diff options
context:
space:
mode:
authorpylbrecht <palbrecht@mailbox.org>2020-02-11 22:36:50 +0100
committerpylbrecht <palbrecht@mailbox.org>2020-02-12 08:49:18 +0100
commit588c09b5807bd9534aa63cbb11cff5c0227efdab (patch)
treeb9a65317579b79904122a68e4ee9bf81496feff7 /components/script/dom/paintrenderingcontext2d.rs
parent6b2079e5b3272245bdd21e2664e2ef6cd83f7aab (diff)
downloadservo-588c09b5807bd9534aa63cbb11cff5c0227efdab.tar.gz
servo-588c09b5807bd9534aa63cbb11cff5c0227efdab.zip
Implement CanvasRenderingContext2D.getTransform()
Diffstat (limited to 'components/script/dom/paintrenderingcontext2d.rs')
-rw-r--r--components/script/dom/paintrenderingcontext2d.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/dom/paintrenderingcontext2d.rs b/components/script/dom/paintrenderingcontext2d.rs
index b9adc23e52d..7b44bbc4a71 100644
--- a/components/script/dom/paintrenderingcontext2d.rs
+++ b/components/script/dom/paintrenderingcontext2d.rs
@@ -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);