-
Notifications
You must be signed in to change notification settings - Fork 791
Expand file tree
/
Copy pathPublish.html
More file actions
1559 lines (1343 loc) · 274 KB
/
Publish.html
File metadata and controls
1559 lines (1343 loc) · 274 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html><html lang=en><head>
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
<title>Geometry Interfaces Module Level 1</title>
<link href=../default.css rel=stylesheet type=text/css>
<link href=https://www.w3.org/StyleSheets/TR/W3C-CR rel=stylesheet type=text/css>
<script src="../shared/MathJax/MathJax.js?config=MML_SVGorMML,local/local"></script>
<style type=text/css>
a[data-link-type=element]::before,span[data-link-type=element]::before {
content: '<';
}
a[data-link-type=element]::after,span[data-link-type=element]::after {
content: '>';
}
</style>
</head>
<body class=h-entry>
<div class=head>
<p data-fill-with=logo><a class=logo href=http://www.w3.org/>
<img alt=W3C height=48 src=https://www.w3.org/Icons/w3c_home width=72>
</a>
</p>
<h1 class="p-name no-ref" id=title>Geometry Interfaces Module Level 1</h1>
<h2 class="no-num no-toc no-ref heading settled" id=subtitle><span class=content>W3C Candidate Recommendation,
<span class=dt-updated><span class=value-title title=20141106>6 November 2014</span></span></span></h2>
<div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://www.w3.org/TR/2014/CR-geometry-1-20141106/>http://www.w3.org/TR/2014/CR-geometry-1-20141106/</a><dt>Latest version:<dd><a href=http://www.w3.org/TR/geometry-1/>http://www.w3.org/TR/geometry-1/</a><dt>Editor's Draft:<dd><a href=http://dev.w3.org/fxtf/geometry/>http://dev.w3.org/fxtf/geometry/</a><dt>Previous Versions:<dd><a href=http://www.w3.org/TR/2014/WD-geometry-1-20140522/ rel=previous>http://www.w3.org/TR/2014/WD-geometry-1-20140522/</a><dt>Feedback:<dd><span><a href="mailto:public-fx@w3.org?subject=%5Bgeometry%5D%20feedback">public-fx@w3.org</a> with subject line “<kbd>[geometry] <var>… message topic …</var></kbd>” (<a href=http://lists.w3.org/Archives/Public/public-fx/ rel=discussion>archives</a>)</span><dt>Test Suite:<dd><a href=http://test.csswg.org/suites/geometry-1_dev/nightly-unstable/>http://test.csswg.org/suites/geometry-1_dev/nightly-unstable/</a><dt class=editor>Editors:<dd class=editor><div class="p-author h-card vcard"><a class="p-name fn u-email email" href=mailto:simonp@opera.com>Simon Pieters</a> (<span class="p-org org">Opera Software ASA</span>)</div><dd class=editor><div class="p-author h-card vcard"><a class="p-name fn u-email email" href=mailto:dschulze@adobe.com>Dirk Schulze</a> (<span class="p-org org">Adobe Systems Inc.</span>)</div><dd class=editor><div class="p-author h-card vcard"><a class="p-name fn u-email email" href=mailto:cabanier@adobe.com>Rik Cabanier</a> (<span class="p-org org">Adobe Systems Inc.</span>)</div><dt>Issues list:<dd><span><a href="https://www.w3.org/Bugs/Public/buglist.cgi?product=FXTF&component=Geometry&resolution=---">Bugzilla</a> (<a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=FXTF&component=Geometry">file a bug</a>)</span></dl></div>
<div data-fill-with=warning></div>
<p class=copyright data-fill-with=copyright><a href=http://www.w3.org/Consortium/Legal/ipr-notice#Copyright>Copyright</a> © 2014 <a href=http://www.w3.org/><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href=http://www.csail.mit.edu/><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href=http://www.ercim.eu/><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href=http://www.keio.ac.jp/>Keio</a>, <a href=http://ev.buaa.edu.cn/>Beihang</a>), All Rights Reserved. W3C <a href=http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer>liability</a>, <a href=http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks>trademark</a> and <a href=http://www.w3.org/Consortium/Legal/copyright-documents>document use</a> rules apply.
</p>
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc no-ref heading settled" id=abstract><span class=content>Abstract</span></h2>
<div class=p-summary data-fill-with=abstract><p>This specification provides basic geometric interfaces to represent points, rectangles, quadrilaterals and transformation matrices that can be used by other modules or specifications.</p>
</div>
<h2 class="no-num no-toc no-ref heading settled" id=status><span class=content>Status of this document</span></h2>
<div data-fill-with=status><p>
<em>This section describes the status of this document at the time of its publication.
Other documents may supersede this document.
A list of current W3C publications and the latest revision of this technical report
can be found in the <a href=http://www.w3.org/TR/>W3C technical reports index at http://www.w3.org/TR/.</a></em>
<p>
This document was produced by the <a href=http://www.w3.org/Style/CSS/members>CSS Working Group</a>
(part of the <a href=http://www.w3.org/Style/>Style Activity</a>) and the <a href=http://www.w3.org/Graphics/SVG/WG/>SVG Working Group</a> (part of the
<a href=http://www.w3.org/Graphics/>Graphics Activity</a>) as a
<a href=http://www.w3.org/2005/10/Process-20051014/tr.html#maturity-levels>Candidate
Recommendation</a>.
<p>
A Candidate Recommendation is a document that has been widely reviewed
and is ready for implementation. W3C encourages everybody to implement
this specification and return comments to the
(<a href=http://lists.w3.org/Archives/Public/public-fx/>archived</a>)
public mailing list
<a href="mailto:public-fx@w3.org?Subject=%5Bgeometry%5D%20PUT%20SUBJECT%20HERE">public-fx@w3.org</a>
(see <a href=http://www.w3.org/Mail/Request>instructions</a>).
When sending e-mail, please put the text “geometry” in the subject,
preferably like this: “[geometry] <em>…summary of comment…</em>”
<p>
Publication as a Candidate Recommendation does not imply endorsement
by the W3C Membership. This is a draft document and may be updated,
replaced or obsoleted by other documents at any time. It is inappropriate
to cite this document as other than work in progress.
<p>
This document was produced by groups operating under
the <a href=http://www.w3.org/Consortium/Patent-Policy-20040205/>5
February 2004 W3C Patent Policy</a>. W3C maintains a <a href=http://www.w3.org/2004/01/pp-impl/32061/status rel=disclosure>public list of any patent disclosures (CSS)</a>
and a <a href=http://www.w3.org/2004/01/pp-impl/19480/status rel=disclosure>public list of any patent disclosures (SVG)</a>
made in connection with the deliverables of each group;
these pages also includes instructions for disclosing a patent.
An individual who has actual knowledge of a patent which the individual
believes contains <a href=http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential>Essential
Claim(s)</a> must disclose the information in accordance with
<a href=http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure>section
6 of the W3C Patent Policy</a>.
<p>
A test suite and implementation report for Geometry Interfaces Module Level 1 will be developed during
the Candidate Recommendation phase, which will last a minimum of six months,
and at least until 6 May 2015.
See the section <a href=#cr-exit-criteria>“CR
exit criteria”</a> for more details.</div>
<div data-fill-with=at-risk><p>The following features are at-risk, and may be dropped during the CR period:
<ul><li>The <a class=idl-code data-link-type=interface href=#dom-domrectlist title=DOMRectList>DOMRectList</a> interface is at-risk. The authors of this specification await feedback from implementers if the item() function of <a class=idl-code data-link-type=interface href=#dom-domrectlist title=DOMRectList>DOMRectList</a> is currently in use on legacy interfaces. If there is no/not enough content to justify <a class=idl-code data-link-type=interface href=#dom-domrectlist title=DOMRectList>DOMRectList</a>, legacy interfaces must use sequences instead and <a class=idl-code data-link-type=interface href=#dom-domrectlist title=DOMRectList>DOMRectList</a> will be removed from this specification.</ul></div>
<h2 class="no-num no-toc no-ref heading settled" id=contents><span class=content>Table of Contents</span></h2>
<div data-fill-with=table-of-contents><ul class=toc><li><a href=#intro><span class=secno>1</span> <span class=content>Introduction</span></a><li><a href=#DOMPoint><span class=secno>2</span> <span class=content>
The DOMPoint interfaces</span></a><li><a href=#DOMRect><span class=secno>3</span> <span class=content>
The DOMRect interfaces</span></a><li><a href=#DOMRectList><span class=secno>4</span> <span class=content>
The DOMRectList Interface</span></a><li><a href=#DOMQuad><span class=secno>5</span> <span class=content>
The DOMQuad interface</span></a><li><a href=#DOMMatrix><span class=secno>6</span> <span class=content>
The DOMMatrix interfaces</span></a><ul class=toc><li><a href=#dommatrixreadonly-constructors><span class=secno>6.1</span> <span class=content>DOMMatrixReadOnly constructor</span></a><li><a href=#dommatrix-constructors><span class=secno>6.2</span> <span class=content>DOMMatrix constructors</span></a><li><a href=#dommatrix-attributes><span class=secno>6.3</span> <span class=content>DOMMatrix attributes</span></a><li><a href=#immutable-transformation-methods><span class=secno>6.4</span> <span class=content>Immutable transformation methods</span></a><li><a href=#mutable-transformation-methods><span class=secno>6.5</span> <span class=content>Mutable transformation methods</span></a></ul><li><a href=#cloning><span class=secno>7</span> <span class=content>Cloning</span></a><li><a href=#changes><span class=secno></span> <span class=content>Changes since last publication</span></a><li><a href=#acknowledgments><span class=secno></span> <span class=content>Acknowledgments</span></a><li><a href=#conformance><span class=secno></span> <span class=content>
Conformance</span></a><ul class=toc><li><a href=#conventions><span class=secno></span> <span class=content>
Document conventions</span></a><li><a href=#conformance-classes><span class=secno></span> <span class=content>
Conformance classes</span></a><li><a href=#partial><span class=secno></span> <span class=content>
Partial implementations</span></a><li><a href=#experimental><span class=secno></span> <span class=content>
Experimental implementations</span></a><li><a href=#testing><span class=secno></span> <span class=content>
Non-experimental implementations</span></a><li><a href=#cr-exit-criteria><span class=secno></span> <span class=content>
CR exit criteria</span></a></ul><li><a href=#references><span class=secno></span> <span class=content>References</span></a><ul class=toc><li><a href=#normative><span class=secno></span> <span class=content>Normative References</span></a><li><a href=#informative><span class=secno></span> <span class=content>Informative References</span></a></ul><li><a href=#index><span class=secno></span> <span class=content>Index</span></a><li><a href=#idl-index><span class=secno></span> <span class=content>IDL Index</span></a></ul></div>
<h2 class="heading settled" data-level=1 id=intro><span class=secno>1. </span><span class=content>Introduction</span><a class=self-link href=#intro></a></h2>
<p>This specification describes several geometry interfaces <a data-biblio-type=normative data-link-type=biblio href=#biblio-webidl title=WEBIDL>[WEBIDL]</a> for the representation of points, rectangles, quadrilaterals and transformation matrices with the dimension of 3x2 and 4x4.</p>
<p>The SVG interfaces SVGPoint, SVGRect and SVGMatrix <a data-biblio-type=informative data-link-type=biblio href=#biblio-svg11 title=SVG11>[SVG11]</a> are aliasing the here defined interfaces in favor for common interfaces used by SVG, Canvas 2D Context <a data-biblio-type=informative data-link-type=biblio href=#biblio-2dcontext title=2DCONTEXT>[2DCONTEXT]</a> and CSS Transforms <a data-biblio-type=normative data-link-type=biblio href=#biblio-css3-transforms title=CSS3-TRANSFORMS>[CSS3-TRANSFORMS]</a>.</p>
<h2 class="heading settled" data-level=2 id=DOMPoint><span class=secno>2. </span><span class=content>
The DOMPoint interfaces</span><a class=self-link href=#DOMPoint></a></h2>
<p>A 2D or a 3D <dfn data-dfn-type=dfn data-noexport="" id=point>point<a class=self-link href=#point></a></dfn> can be represented by the following WebIDL interfaces:</p>
<pre class=idl>[Constructor(unrestricted double <dfn class=idl-code data-dfn-for=DOMPointReadOnly/DOMPointReadOnly() data-dfn-type=argument data-export="" data-global-name="DOMPointReadOnly<interface>/DOMPointReadOnly()<method>/x<argument>" id=dom-dompointreadonly-dompointreadonly-x>x<a class=self-link href=#dom-dompointreadonly-dompointreadonly-x></a></dfn>, unrestricted double <dfn class=idl-code data-dfn-for=DOMPointReadOnly/DOMPointReadOnly() data-dfn-type=argument data-export="" data-global-name="DOMPointReadOnly<interface>/DOMPointReadOnly()<method>/y<argument>" id=dom-dompointreadonly-dompointreadonly-y>y<a class=self-link href=#dom-dompointreadonly-dompointreadonly-y></a></dfn>,
unrestricted double <dfn class=idl-code data-dfn-for=DOMPointReadOnly/DOMPointReadOnly() data-dfn-type=argument data-export="" data-global-name="DOMPointReadOnly<interface>/DOMPointReadOnly()<method>/z<argument>" id=dom-dompointreadonly-dompointreadonly-z>z<a class=self-link href=#dom-dompointreadonly-dompointreadonly-z></a></dfn>, unrestricted double <dfn class=idl-code data-dfn-for=DOMPointReadOnly/DOMPointReadOnly() data-dfn-type=argument data-export="" data-global-name="DOMPointReadOnly<interface>/DOMPointReadOnly()<method>/w<argument>" id=dom-dompointreadonly-dompointreadonly-w>w<a class=self-link href=#dom-dompointreadonly-dompointreadonly-w></a></dfn>),
Exposed=(Window,Worker)]
interface <dfn class=idl-code data-dfn-type=interface data-export="" data-global-name="" id=dom-dompointreadonly>DOMPointReadOnly<a class=self-link href=#dom-dompointreadonly></a></dfn> {
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMPointReadOnly<interface>/x<attribute>" data-link-for=DOMPointReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dompointreadonly-dompoint-x title=x>x</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMPointReadOnly<interface>/y<attribute>" data-link-for=DOMPointReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dompointreadonly-dompoint-y title=y>y</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMPointReadOnly<interface>/z<attribute>" data-link-for=DOMPointReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dompointreadonly-dompoint-z title=z>z</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMPointReadOnly<interface>/w<attribute>" data-link-for=DOMPointReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dompointreadonly-dompoint-w title=w>w</a>;
<a data-link-type=idl-name href=#dom-dompoint title=DOMPoint>DOMPoint</a> <a class=idl-code data-global-name="DOMPointReadOnly<interface>/matrixtransform()<method>" data-link-for=DOMPointReadOnly data-link-type=method href=#dom-dompointreadonly-matrixtransform title=matrixTransform()>matrixTransform</a>(<a data-link-type=idl-name href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> <dfn class=idl-code data-dfn-for=DOMPointReadOnly/matrixTransform() data-dfn-type=argument data-export="" data-global-name="DOMPointReadOnly<interface>/matrixTransform()<method>/matrix<argument>" id=dom-dompointreadonly-matrixtransform-matrix>matrix<a class=self-link href=#dom-dompointreadonly-matrixtransform-matrix></a></dfn>);
};
[Constructor(optional <a data-link-type=idl-name href=#dictdef-dompointinit title=DOMPointInit>DOMPointInit</a> <dfn class=idl-code data-dfn-for=DOMPoint/DOMPoint() data-dfn-type=argument data-export="" data-global-name="DOMPoint<interface>/DOMPoint()<method>/point<argument>" id=dom-dompoint-dompoint-point>point<a class=self-link href=#dom-dompoint-dompoint-point></a></dfn>),
Constructor(optional unrestricted double <dfn class=idl-code data-dfn-for=DOMPoint/DOMPoint() data-dfn-type=argument data-export="" data-global-name="DOMPoint<interface>/DOMPoint()<method>/x<argument>" id=dom-dompoint-dompoint-x>x<a class=self-link href=#dom-dompoint-dompoint-x></a></dfn> = 0, optional unrestricted double <dfn class=idl-code data-dfn-for=DOMPoint/DOMPoint() data-dfn-type=argument data-export="" data-global-name="DOMPoint<interface>/DOMPoint()<method>/y<argument>" id=dom-dompoint-dompoint-y>y<a class=self-link href=#dom-dompoint-dompoint-y></a></dfn> = 0,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMPoint/DOMPoint() data-dfn-type=argument data-export="" data-global-name="DOMPoint<interface>/DOMPoint()<method>/z<argument>" id=dom-dompoint-dompoint-z>z<a class=self-link href=#dom-dompoint-dompoint-z></a></dfn> = 0, optional unrestricted double <dfn class=idl-code data-dfn-for=DOMPoint/DOMPoint() data-dfn-type=argument data-export="" data-global-name="DOMPoint<interface>/DOMPoint()<method>/w<argument>" id=dom-dompoint-dompoint-w>w<a class=self-link href=#dom-dompoint-dompoint-w></a></dfn> = 1),
Exposed=(Window,Worker)]
interface <dfn class=idl-code data-dfn-type=interface data-export="" data-global-name="" id=dom-dompoint>DOMPoint<a class=self-link href=#dom-dompoint></a></dfn> : <a data-link-type=idl-name href=#dom-dompointreadonly title=DOMPointReadOnly>DOMPointReadOnly</a> {
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMPoint<interface>/x<attribute>" data-link-for=DOMPoint data-link-type=attribute data-type="unrestricted double " href=#dom-dompointreadonly-dompoint-x title=x>x</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMPoint<interface>/y<attribute>" data-link-for=DOMPoint data-link-type=attribute data-type="unrestricted double " href=#dom-dompointreadonly-dompoint-y title=y>y</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMPoint<interface>/z<attribute>" data-link-for=DOMPoint data-link-type=attribute data-type="unrestricted double " href=#dom-dompointreadonly-dompoint-z title=z>z</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMPoint<interface>/w<attribute>" data-link-for=DOMPoint data-link-type=attribute data-type="unrestricted double " href=#dom-dompointreadonly-dompoint-w title=w>w</a>;
};
dictionary <dfn class=idl-code data-dfn-type=dictionary data-export="" data-global-name="" id=dictdef-dompointinit>DOMPointInit<a class=self-link href=#dictdef-dompointinit></a></dfn> {
unrestricted double <dfn class=idl-code data-default=0 data-dfn-for=DOMPointInit data-dfn-type=dict-member data-export="" data-global-name="DOMPointInit<dictionary>/x<dict-member>" data-type="unrestricted double " id=dom-dompointinit-x>x<a class=self-link href=#dom-dompointinit-x></a></dfn> = 0;
unrestricted double <dfn class=idl-code data-default=0 data-dfn-for=DOMPointInit data-dfn-type=dict-member data-export="" data-global-name="DOMPointInit<dictionary>/y<dict-member>" data-type="unrestricted double " id=dom-dompointinit-y>y<a class=self-link href=#dom-dompointinit-y></a></dfn> = 0;
unrestricted double <dfn class=idl-code data-default=0 data-dfn-for=DOMPointInit data-dfn-type=dict-member data-export="" data-global-name="DOMPointInit<dictionary>/z<dict-member>" data-type="unrestricted double " id=dom-dompointinit-z>z<a class=self-link href=#dom-dompointinit-z></a></dfn> = 0;
unrestricted double <dfn class=idl-code data-default=1 data-dfn-for=DOMPointInit data-dfn-type=dict-member data-export="" data-global-name="DOMPointInit<dictionary>/w<dict-member>" data-type="unrestricted double " id=dom-dompointinit-w>w<a class=self-link href=#dom-dompointinit-w></a></dfn> = 1;
};
</pre>
<p>The following algorithms assume that <a class=idl-code data-link-type=interface href=#dom-dompointreadonly title=DOMPointReadOnly>DOMPointReadOnly</a> objects have the internal member variables <dfn data-dfn-for=point data-dfn-type=dfn data-noexport="" id=x-coordinate>x coordinate<a class=self-link href=#x-coordinate></a></dfn>, <dfn data-dfn-for=point data-dfn-type=dfn data-noexport="" id=y-coordinate>y coordinate<a class=self-link href=#y-coordinate></a></dfn>, <dfn data-dfn-for=point data-dfn-type=dfn data-noexport="" id=z-coordinate>z coordinate<a class=self-link href=#z-coordinate></a></dfn> and <dfn data-dfn-for=point data-dfn-type=dfn data-noexport="" id=w-perspective>w perspective<a class=self-link href=#w-perspective></a></dfn>. <a class=idl-code data-link-type=interface href=#dom-dompointreadonly title=DOMPointReadOnly>DOMPointReadOnly</a> as well as the inheriting interface <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> must be able to access and set the value of these variables.</p>
<p>An interface returning an <a class=idl-code data-link-type=interface href=#dom-dompointreadonly title=DOMPointReadOnly>DOMPointReadOnly</a> object by an attribute or function may be able to modify internal member variable values. Such an interface must specify this ability explicitly in prose.</p>
<p>Internal member variables must not be exposed in any way.</p>
<p>The <dfn class=idl-code data-dfn-for=DOMPointReadOnly data-dfn-type=constructor data-export="" id=dom-dompointreadonly-dompointreadonly title=DOMPointReadOnly()><code>DOMPointReadOnly(x, y, z, w)</code><a class=self-link href=#dom-dompointreadonly-dompointreadonly></a></dfn> constructor, when invoked, must run the following steps:</p>
<ol class=algorithm>
<li>Set the the current object’s variables <a data-link-for=point data-link-type=dfn href=#x-coordinate title="x coordinate">x coordinate</a> to <var>x</var>, <a data-link-for=point data-link-type=dfn href=#y-coordinate title="y coordinate">y coordinate</a> to <var>y</var>, <a data-link-type=dfn href=#z-coordinate title="z coordinate">z coordinate</a> to <var>z</var> and <a data-link-type=dfn href=#w-perspective title="w perspective">w perspective</a> to <var>w</var>.</li>
<li>Return the new <a class=idl-code data-link-type=interface href=#dom-dompointreadonly title=DOMPointReadOnly>DOMPointReadOnly</a> object.</li>
</ol>
<p>The <dfn class=idl-code data-dfn-for=DOMPoint data-dfn-type=constructor data-export="" id=dom-dompoint-dompoint><code>DOMPoint()</code><a class=self-link href=#dom-dompoint-dompoint></a></dfn> constructor, when invoked, must run the following steps:</p>
<dl class=switch>
<dt>If invoked with a <a class=idl-code data-link-type=dictionary href=#dictdef-dompointinit title=DOMPointInit>DOMPointInit</a> argument</dt>
<dd>
<ol class=algorithm>
<li>Let <var>point</var> be the argument.</li>
<li>Call the constructor of <a class=idl-code data-link-type=interface href=#dom-dompointreadonly title=DOMPointReadOnly>DOMPointReadOnly</a> with the arguments <var>x</var>, <var>y</var>, <var>z</var>, <var>w</var>, where:
<ol>
<li><var>x</var> is the <code>x</code> dictionary member of <var>point</var>.
<li><var>y</var> is the <code>y</code> dictionary member of <var>point</var>.
<li><var>z</var> is the <code>z</code> dictionary member of <var>point</var>.
<li><var>w</var> is the <code>w</code> dictionary member of <var>point</var>.
</ol>
</li>
<li>Return the new <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object.</li>
</ol>
</dd>
<dt>Otherwise</dt>
<dd>
<ol class=algorithm>
<li>Call the constructor of <a class=idl-code data-link-type=interface href=#dom-dompointreadonly title=DOMPointReadOnly>DOMPointReadOnly</a> with the arguments <var>x</var>, <var>y</var>, <var>z</var> and <var>w</var>, respectively.</li>
<li>Return the new <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object.</li>
</ol>
</dd>
</dl>
<div data-dfn-for="DOMPointReadOnly DOMPoint" data-dfn-type=attribute>
The <dfn class=idl-code data-dfn-for="DOMPointReadOnly DOMPoint" data-dfn-type=attribute data-export="" id=dom-dompointreadonly-dompoint-x>x<a class=self-link href=#dom-dompointreadonly-dompoint-x></a></dfn> attribute, on getting, must return the <a data-link-for=point data-link-type=dfn href=#x-coordinate title="x coordinate">x coordinate</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> interface, setting the <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-x title=x>x</a> attribute must set the <a data-link-for=point data-link-type=dfn href=#x-coordinate title="x coordinate">x coordinate</a> value of the object it was invoked on to the new value.
<p>The <dfn class=idl-code data-dfn-for="DOMPointReadOnly DOMPoint" data-dfn-type=attribute data-export="" id=dom-dompointreadonly-dompoint-y>y<a class=self-link href=#dom-dompointreadonly-dompoint-y></a></dfn> attribute, on getting, must return the <a data-link-for=point data-link-type=dfn href=#y-coordinate title="y coordinate">y coordinate</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> interface, setting the <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-y title=y>y</a> attribute must set the <a data-link-for=point data-link-type=dfn href=#y-coordinate title="y coordinate">y coordinate</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMPointReadOnly DOMPoint" data-dfn-type=attribute data-export="" id=dom-dompointreadonly-dompoint-z>z<a class=self-link href=#dom-dompointreadonly-dompoint-z></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#z-coordinate title="z coordinate">z coordinate</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> interface, setting the <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-z title=z>z</a> attribute must set the <a data-link-type=dfn href=#z-coordinate title="z coordinate">z coordinate</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMPointReadOnly DOMPoint" data-dfn-type=attribute data-export="" id=dom-dompointreadonly-dompoint-w>w<a class=self-link href=#dom-dompointreadonly-dompoint-w></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#w-perspective title="w perspective">w perspective</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> interface, setting the <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-w title=w>w</a> attribute must set the <a data-link-type=dfn href=#w-perspective title="w perspective">w perspective</a> value of the object it was invoked on to the new value.</p>
</div>
<p><dfn class=idl-code data-dfn-for=DOMPointReadOnly data-dfn-type=method data-export="" id=dom-dompointreadonly-matrixtransform title=matrixTransform()>matrixTransform(<var>matrix</var>)<a class=self-link href=#dom-dompointreadonly-matrixtransform></a></dfn>, when invoked, must run the following steps</p>
<ol>
<li>Create a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> <var>point</var> initialized to <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-x title=x>x</a>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-y title=y>y</a>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-z title=z>z</a> and <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-w title=w>w</a> of the current point.</li>
<li><a data-link-type=dfn href=#post-multiply title=Post-multiply>Post-multiply</a> <var>point</var> with <var>matrix</var>.</li>
<li>Return <var>point</var>.</li>
</ol>
<p><a data-link-type=functionish href=#dom-dompointreadonly-matrixtransform title=matrixTransform()>matrixTransform()</a> does not modify the current <a class=idl-code data-link-type=interface href=#dom-dompointreadonly title=DOMPointReadOnly>DOMPointReadOnly</a> object and returns a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object.
<div class=example>
<p>In this example the method <a class=idl-code data-link-type=method href=#dom-dompointreadonly-matrixtransform title=matrixTransform()>matrixTransform()</a> on <var>point</var> is called with a <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> argument <var>matrix</var>.</p>
<pre><code>var point = new DOMPoint(5, 4);
var matrix = new DOMMatrix(2, 0, 0, 2, 10, 10);
var transformedPoint = point.matrixTransform(matrix);
</code></pre>
<p><var>point</var> creates a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object initialized to the same attribute values as <var>point</var>. This new <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> is now scaled and the translated by <var>matrix</var>. This resulting <var>transformPoint</var> has the attribute values <code>x: 20</code> and <code>y: 18</code>.</p>
</div>
<p>For historical reasons, Window objects must also have a writable, configurable, non-enumerable property named <code>SVGPoint</code> whose value is the <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> interface object.</p>
<h2 class="heading settled" data-level=3 id=DOMRect><span class=secno>3. </span><span class=content>
The DOMRect interfaces</span><a class=self-link href=#DOMRect></a></h2>
<p>Objects implementing the <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=DOMRectReadOnly>DOMRectReadOnly</a> interface represent a <dfn data-dfn-type=dfn data-noexport="" id=rectangle>rectangle<a class=self-link href=#rectangle></a></dfn>. The type of box is specified by the method or attribute that returns a <a class=idl-code data-link-type=interface href=#dom-domrect title=DOMRect>DOMRect</a> or <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=DOMRectReadOnly>DOMRectReadOnly</a> object.</p>
<p>Rectangles have the following properties:</p>
<dl data-dfn-for=rectangle>
<dt><dfn data-dfn-type=dfn data-noexport="" id=origin>origin<a class=self-link href=#origin></a></dfn></dt>
<dd>
When the rectangle has a non-negative <a data-link-type=dfn href=http://www.w3.org/TR/css-writing-modes-3/#width title=width>width</a>, the rectangle’s horizontal origin is the left edge; otherwise, it is the right edge. Similarly, when the rectangle has a non-negative <a data-link-type=dfn href=http://www.w3.org/TR/css-writing-modes-3/#height title=height>height</a>, the rectangle’s vertical origin is the top edge; otherwise, it is the bottom edge.
</dd>
<dt><dfn data-dfn-type=dfn data-noexport="" id=x-coordinate0>x coordinate<a class=self-link href=#x-coordinate0></a></dfn></dt>
<dd>
The horizontal distance between the viewport’s left edge and the rectangle’s <a data-link-type=dfn href=#origin title=origin>origin</a>.
</dd>
<dt><dfn data-dfn-type=dfn data-noexport="" id=y-coordinate0>y coordinate<a class=self-link href=#y-coordinate0></a></dfn></dt>
<dd>
The vertical distance between the viewport’s top edge and the rectangle’s <a data-link-type=dfn href=#origin title=origin>origin</a>.
</dd>
<dt><dfn data-dfn-type=dfn data-noexport="" id=width-dimension>width dimension<a class=self-link href=#width-dimension></a></dfn></dt>
<dd>
The width of the rectangle. Can be negative.
</dd>
<dt><dfn data-dfn-type=dfn data-noexport="" id=height-dimension>height dimension<a class=self-link href=#height-dimension></a></dfn></dt>
<dd>
The height of the rectangle. Can be negative.
</dd>
</dl>
<pre class=idl>[Constructor(unrestricted double x = 0, unrestricted double y = 0,
unrestricted double width = 0, unrestricted double height = 0),
Exposed=(Window,Worker)]
interface <dfn class=idl-code data-dfn-type=interface data-export="" data-global-name="" id=dom-domrect>DOMRect<a class=self-link href=#dom-domrect></a></dfn> : <a data-link-type=idl-name href=#dom-domrectreadonly title=DOMRectReadOnly>DOMRectReadOnly</a> {
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMRect<interface>/x<attribute>" data-link-for=DOMRect data-link-type=attribute data-type="unrestricted double " href=#dom-domrectreadonly-domrect-x title=x>x</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMRect<interface>/y<attribute>" data-link-for=DOMRect data-link-type=attribute data-type="unrestricted double " href=#dom-domrectreadonly-domrect-y title=y>y</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMRect<interface>/width<attribute>" data-link-for=DOMRect data-link-type=attribute data-type="unrestricted double " href=#dom-domrectreadonly-domrect-width title=width>width</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMRect<interface>/height<attribute>" data-link-for=DOMRect data-link-type=attribute data-type="unrestricted double " href=#dom-domrectreadonly-domrect-height title=height>height</a>;
};
[Constructor(unrestricted double <dfn class=idl-code data-dfn-for=DOMRectReadOnly/DOMRectReadOnly() data-dfn-type=argument data-export="" data-global-name="DOMRectReadOnly<interface>/DOMRectReadOnly()<method>/x<argument>" id=dom-domrectreadonly-domrectreadonly-x>x<a class=self-link href=#dom-domrectreadonly-domrectreadonly-x></a></dfn>, unrestricted double <dfn class=idl-code data-dfn-for=DOMRectReadOnly/DOMRectReadOnly() data-dfn-type=argument data-export="" data-global-name="DOMRectReadOnly<interface>/DOMRectReadOnly()<method>/y<argument>" id=dom-domrectreadonly-domrectreadonly-y>y<a class=self-link href=#dom-domrectreadonly-domrectreadonly-y></a></dfn>,
unrestricted double <dfn class=idl-code data-dfn-for=DOMRectReadOnly/DOMRectReadOnly() data-dfn-type=argument data-export="" data-global-name="DOMRectReadOnly<interface>/DOMRectReadOnly()<method>/width<argument>" id=dom-domrectreadonly-domrectreadonly-width>width<a class=self-link href=#dom-domrectreadonly-domrectreadonly-width></a></dfn>, unrestricted double <dfn class=idl-code data-dfn-for=DOMRectReadOnly/DOMRectReadOnly() data-dfn-type=argument data-export="" data-global-name="DOMRectReadOnly<interface>/DOMRectReadOnly()<method>/height<argument>" id=dom-domrectreadonly-domrectreadonly-height>height<a class=self-link href=#dom-domrectreadonly-domrectreadonly-height></a></dfn>),
Exposed=(Window,Worker)]
interface <dfn class=idl-code data-dfn-type=interface data-export="" data-global-name="" id=dom-domrectreadonly>DOMRectReadOnly<a class=self-link href=#dom-domrectreadonly></a></dfn> {
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMRectReadOnly<interface>/x<attribute>" data-link-for=DOMRectReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-domrectreadonly-domrect-x title=x>x</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMRectReadOnly<interface>/y<attribute>" data-link-for=DOMRectReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-domrectreadonly-domrect-y title=y>y</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMRectReadOnly<interface>/width<attribute>" data-link-for=DOMRectReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-domrectreadonly-domrect-width title=width>width</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMRectReadOnly<interface>/height<attribute>" data-link-for=DOMRectReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-domrectreadonly-domrect-height title=height>height</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMRectReadOnly<interface>/top<attribute>" data-link-for=DOMRectReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-domrectreadonly-domrect-top title=top>top</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMRectReadOnly<interface>/right<attribute>" data-link-for=DOMRectReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-domrectreadonly-domrect-right title=right>right</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMRectReadOnly<interface>/bottom<attribute>" data-link-for=DOMRectReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-domrectreadonly-domrect-bottom title=bottom>bottom</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMRectReadOnly<interface>/left<attribute>" data-link-for=DOMRectReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-domrectreadonly-domrect-left title=left>left</a>;
};
dictionary <dfn class=idl-code data-dfn-type=dictionary data-export="" data-global-name="" id=dictdef-domrectinit>DOMRectInit<a class=self-link href=#dictdef-domrectinit></a></dfn> {
unrestricted double <dfn class=idl-code data-default=0 data-dfn-for=DOMRectInit data-dfn-type=dict-member data-export="" data-global-name="DOMRectInit<dictionary>/x<dict-member>" data-type="unrestricted double " id=dom-domrectinit-x>x<a class=self-link href=#dom-domrectinit-x></a></dfn> = 0;
unrestricted double <dfn class=idl-code data-default=0 data-dfn-for=DOMRectInit data-dfn-type=dict-member data-export="" data-global-name="DOMRectInit<dictionary>/y<dict-member>" data-type="unrestricted double " id=dom-domrectinit-y>y<a class=self-link href=#dom-domrectinit-y></a></dfn> = 0;
unrestricted double <dfn class=idl-code data-default=0 data-dfn-for=DOMRectInit data-dfn-type=dict-member data-export="" data-global-name="DOMRectInit<dictionary>/width<dict-member>" data-type="unrestricted double " id=dom-domrectinit-width>width<a class=self-link href=#dom-domrectinit-width></a></dfn> = 0;
unrestricted double <dfn class=idl-code data-default=0 data-dfn-for=DOMRectInit data-dfn-type=dict-member data-export="" data-global-name="DOMRectInit<dictionary>/height<dict-member>" data-type="unrestricted double " id=dom-domrectinit-height>height<a class=self-link href=#dom-domrectinit-height></a></dfn> = 0;
};
</pre>
<p>The following algorithms assume that <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=DOMRectReadOnly>DOMRectReadOnly</a> objects have the internal member variables <a data-link-for=rectangle data-link-type=dfn href=#x-coordinate0 title="x coordinate">x coordinate</a>, <a data-link-for=rectangle data-link-type=dfn href=#y-coordinate0 title="y coordinate">y coordinate</a>, <a data-link-type=dfn href=#width-dimension title="width dimension">width dimension</a> and <a data-link-type=dfn href=#height-dimension title="height dimension">height dimension</a>. <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=DOMRectReadOnly>DOMRectReadOnly</a> as well as the inheriting interface <a class=idl-code data-link-type=interface href=#dom-domrect title=DOMRect>DOMRect</a> must be able to access and set the value of these variables.</p>
<p>An interface returning an <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=DOMRectReadOnly>DOMRectReadOnly</a> object by an attribute or function may be able to modify internal member variable values. Such an interface must specify this ability explicitly in prose.</p>
<p>Internal member variables must not be exposed in any way.</p>
<p>The <dfn class=idl-code data-dfn-for=DOMRect data-dfn-type=constructor data-export="" id=dom-domrect-domrectreadonly title=DOMRectReadOnly()><code>DOMRectReadOnly(<var>x</var>, <var>y</var>, <var>width</var>, <var>height</var>)</code><a class=self-link href=#dom-domrect-domrectreadonly></a></dfn> constructor, when invoked, must run the following steps:</p>
<ol class=algorithm>
<li>Set the the current object’s variables <a data-link-for=rectangle data-link-type=dfn href=#x-coordinate0 title="x coordinate">x coordinate</a> to <var>x</var>, <a data-link-for=rectangle data-link-type=dfn href=#y-coordinate0 title="y coordinate">y coordinate</a> to <var>y</var>, <a data-link-type=dfn href=#width-dimension title="width dimension">width dimension</a> to <var>width</var> and <a data-link-type=dfn href=#height-dimension title="height dimension">height dimension</a> to <var>height</var>.
<li>Return the new <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=DOMRectReadOnly>DOMRectReadOnly</a> object.
</ol>
<p>The <dfn class=idl-code data-dfn-for=DOMRect data-dfn-type=constructor data-export="" id=dom-domrect-domrect title=DOMRect()><code>DOMRect(<var>x</var>, <var>y</var>, <var>width</var>, <var>height</var>)</code><a class=self-link href=#dom-domrect-domrect></a></dfn> constructor, when invoked, must run the following steps:</p>
<ol class=algorithm>
<li>Call the constructor of <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=DOMRectReadOnly>DOMRectReadOnly</a> with <var>x</var>, <var>y</var>, <var>width</var> and <var>height</var>.
<li>Return the new <a class=idl-code data-link-type=interface href=#dom-domrect title=DOMRect>DOMRect</a> object.
</ol>
<div data-dfn-for="DOMRectReadOnly DOMRect" data-dfn-type=attribute>
The <dfn class=idl-code data-dfn-for="DOMRectReadOnly DOMRect" data-dfn-type=attribute data-export="" id=dom-domrectreadonly-domrect-x>x<a class=self-link href=#dom-domrectreadonly-domrect-x></a></dfn> attribute, on getting, must return the <a data-link-for=rectangle data-link-type=dfn href=#x-coordinate0 title="x coordinate">x coordinate</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-domrect title=DOMRect>DOMRect</a> interface, setting the <a class=idl-code data-link-for=DOMRect data-link-type=attribute href=#dom-domrectreadonly-domrect-x title=x>x</a> attribute must set the <a data-link-for=rectangle data-link-type=dfn href=#x-coordinate0 title="x coordinate">x coordinate</a> value of the object it was invoked on to the new value.
<p>The <dfn class=idl-code data-dfn-for="DOMRectReadOnly DOMRect" data-dfn-type=attribute data-export="" id=dom-domrectreadonly-domrect-y>y<a class=self-link href=#dom-domrectreadonly-domrect-y></a></dfn> attribute, on getting, it must return the <a data-link-for=rectangle data-link-type=dfn href=#y-coordinate0 title="y coordinate">y coordinate</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-domrect title=DOMRect>DOMRect</a> interface, setting the <a class=idl-code data-link-for=DOMRect data-link-type=attribute href=#dom-domrectreadonly-domrect-y title=y>y</a> attribute must set the <a data-link-for=rectangle data-link-type=dfn href=#y-coordinate0 title="y coordinate">y coordinate</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMRectReadOnly DOMRect" data-dfn-type=attribute data-export="" id=dom-domrectreadonly-domrect-width>width<a class=self-link href=#dom-domrectreadonly-domrect-width></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=http://www.w3.org/TR/css-writing-modes-3/#width title=width>width</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-domrect title=DOMRect>DOMRect</a> interface, setting the <a class=idl-code data-link-for=DOMRect data-link-type=attribute href=#dom-domrectreadonly-domrect-width title=width>width</a> attribute must set the <a data-link-type=dfn href=#width-dimension title="width dimension">width dimension</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMRectReadOnly DOMRect" data-dfn-type=attribute data-export="" id=dom-domrectreadonly-domrect-height>height<a class=self-link href=#dom-domrectreadonly-domrect-height></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=http://www.w3.org/TR/css-writing-modes-3/#height title=height>height</a> value. For the <a class=idl-code data-link-type=interface href=#dom-domrect title=DOMRect>DOMRect</a> interface, setting the <a class=idl-code data-link-for=DOMRect data-link-type=attribute href=#dom-domrectreadonly-domrect-height title=height>height</a> attribute must set the <a data-link-type=dfn href=#height-dimension title="height dimension">height dimension</a> value to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMRectReadOnly DOMRect" data-dfn-type=attribute data-export="" id=dom-domrectreadonly-domrect-top>top<a class=self-link href=#dom-domrectreadonly-domrect-top></a></dfn> attribute, on getting, must return min(<a data-link-for=rectangle data-link-type=dfn href=#y-coordinate0 title="y coordinate">y coordinate</a>, <a data-link-for=rectangle data-link-type=dfn href=#y-coordinate0 title="y coordinate">y coordinate</a> + <a data-link-type=dfn href=#height-dimension title="height dimension">height dimension</a>) of the object it was invoked on.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMRectReadOnly DOMRect" data-dfn-type=attribute data-export="" id=dom-domrectreadonly-domrect-right>right<a class=self-link href=#dom-domrectreadonly-domrect-right></a></dfn> attribute, on getting, must return max(<a data-link-for=rectangle data-link-type=dfn href=#x-coordinate0 title="x coordinate">x coordinate</a>, <a data-link-for=rectangle data-link-type=dfn href=#x-coordinate0 title="x coordinate">x coordinate</a> + <a data-link-type=dfn href=#width-dimension title="width dimension">width dimension</a>) of the object it was invoked on.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMRectReadOnly DOMRect" data-dfn-type=attribute data-export="" id=dom-domrectreadonly-domrect-bottom>bottom<a class=self-link href=#dom-domrectreadonly-domrect-bottom></a></dfn> attribute, on getting, must return max(<a data-link-for=rectangle data-link-type=dfn href=#y-coordinate0 title="y coordinate">y coordinate</a>, <a data-link-for=rectangle data-link-type=dfn href=#y-coordinate0 title="y coordinate">y coordinate</a> + <a data-link-type=dfn href=#height-dimension title="height dimension">height dimension</a>) of the object it was invoked on.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMRectReadOnly DOMRect" data-dfn-type=attribute data-export="" id=dom-domrectreadonly-domrect-left>left<a class=self-link href=#dom-domrectreadonly-domrect-left></a></dfn> attribute, on getting, must return min(<a data-link-for=rectangle data-link-type=dfn href=#x-coordinate0 title="x coordinate">x coordinate</a>, <a data-link-for=rectangle data-link-type=dfn href=#x-coordinate0 title="x coordinate">x coordinate</a> + <a data-link-type=dfn href=#width-dimension title="width dimension">width dimension</a>) of the object it was invoked on.</p>
</div>
<p>For historical reasons, Window objects must also have a writable, configurable, non-enumerable property named <dfn class=idl-code data-dfn-type=interface data-export="" id=dom-svgrect>SVGRect<a class=self-link href=#dom-svgrect></a></dfn> whose value is the <a class=idl-code data-link-type=interface href=#dom-domrect title=DOMRect>DOMRect</a> interface object.</p>
<h2 class="heading settled" data-level=4 id=DOMRectList><span class=secno>4. </span><span class=content>
The DOMRectList Interface</span><a class=self-link href=#DOMRectList></a></h2>
<pre class=idl>[NoInterfaceObject,
ArrayClass]
interface <dfn class=idl-code data-dfn-type=interface data-export="" data-global-name="" id=dom-domrectlist>DOMRectList<a class=self-link href=#dom-domrectlist></a></dfn> {
readonly attribute unsigned long <a class=idl-code data-global-name="DOMRectList<interface>/length<attribute>" data-link-for=DOMRectList data-link-type=attribute data-readonly="" data-type="unsigned long " href=#dom-domrectlist-length title=length>length</a>;
getter <a data-link-type=idl-name href=#dom-domrect title=DOMRect>DOMRect</a>? <a class=idl-code data-global-name="DOMRectList<interface>/item()<method>" data-link-for=DOMRectList data-link-type=method href=#dom-domrectlist-item title=item()>item</a>(unsigned long <dfn class=idl-code data-dfn-for=DOMRectList/item() data-dfn-type=argument data-export="" data-global-name="DOMRectList<interface>/item()<method>/index<argument>" id=dom-domrectlist-item-index>index<a class=self-link href=#dom-domrectlist-item-index></a></dfn>);
};
</pre>
<p>The <dfn class=idl-code data-dfn-for=DOMRectList data-dfn-type=attribute data-export="" id=dom-domrectlist-length>length<a class=self-link href=#dom-domrectlist-length></a></dfn> attribute must return the total number of <a class=idl-code data-link-type=interface href=#dom-domrect title=DOMRect>DOMRect</a> objects associated with the object.</p>
<p>The <dfn class=idl-code data-dfn-for=DOMRectList data-dfn-type=method data-export="" id=dom-domrectlist-item title=item()>item(<var>index</var>)<a class=self-link href=#dom-domrectlist-item></a></dfn> method, when invoked, must return a <span class=css>null</span> value when <var>index</var> is greater than or equal to the number of <a class=idl-code data-link-type=interface href=#dom-domrect title=DOMRect>DOMRect</a> objects associated with the <a class=idl-code data-link-type=interface href=#dom-domrectlist title=DOMRectList>DOMRectList</a>. Otherwise, the <a class=idl-code data-link-type=interface href=#dom-domrect title=DOMRect>DOMRect</a> object at <var>index</var> must be returned. Indices are zero-based.</p>
<strong class=advisement><a class=idl-code data-link-type=interface href=#dom-domrectlist title=DOMRectList>DOMRectList</a> must be supported for legacy reasons. New interfaces must not use <a class=idl-code data-link-type=interface href=#dom-domrectlist title=DOMRectList>DOMRectList</a> and may use Sequences <a data-biblio-type=normative data-link-type=biblio href=#biblio-webidl title=WEBIDL>[WEBIDL]</a> instead.</strong>
<h2 class="heading settled" data-level=5 id=DOMQuad><span class=secno>5. </span><span class=content>
The DOMQuad interface</span><a class=self-link href=#DOMQuad></a></h2>
<p>Objects implementing the <a class=idl-code data-link-type=interface href=#dom-domquad title=DOMQuad>DOMQuad</a> interface represents a <dfn data-dfn-type=dfn data-noexport="" id=quadrilateral>quadrilateral<a class=self-link href=#quadrilateral></a></dfn>.</p>
<pre class=idl>[Constructor(optional <a data-link-type=idl-name href=#dictdef-dompointinit title=DOMPointInit>DOMPointInit</a> <dfn class=idl-code data-dfn-for=DOMQuad/DOMQuad() data-dfn-type=argument data-export="" data-global-name="DOMQuad<interface>/DOMQuad()<method>/p1<argument>" id=dom-domquad-domquad-p1>p1<a class=self-link href=#dom-domquad-domquad-p1></a></dfn>, optional <a data-link-type=idl-name href=#dictdef-dompointinit title=DOMPointInit>DOMPointInit</a> <dfn class=idl-code data-dfn-for=DOMQuad/DOMQuad() data-dfn-type=argument data-export="" data-global-name="DOMQuad<interface>/DOMQuad()<method>/p2<argument>" id=dom-domquad-domquad-p2>p2<a class=self-link href=#dom-domquad-domquad-p2></a></dfn>,
optional <a data-link-type=idl-name href=#dictdef-dompointinit title=DOMPointInit>DOMPointInit</a> <dfn class=idl-code data-dfn-for=DOMQuad/DOMQuad() data-dfn-type=argument data-export="" data-global-name="DOMQuad<interface>/DOMQuad()<method>/p3<argument>" id=dom-domquad-domquad-p3>p3<a class=self-link href=#dom-domquad-domquad-p3></a></dfn>, optional <a data-link-type=idl-name href=#dictdef-dompointinit title=DOMPointInit>DOMPointInit</a> <dfn class=idl-code data-dfn-for=DOMQuad/DOMQuad() data-dfn-type=argument data-export="" data-global-name="DOMQuad<interface>/DOMQuad()<method>/p4<argument>" id=dom-domquad-domquad-p4>p4<a class=self-link href=#dom-domquad-domquad-p4></a></dfn>),
Constructor(optional <a data-link-type=idl-name href=#dictdef-domrectinit title=DOMRectInit>DOMRectInit</a> <dfn class=idl-code data-dfn-for=DOMQuad/DOMQuad() data-dfn-type=argument data-export="" data-global-name="DOMQuad<interface>/DOMQuad()<method>/rect<argument>" id=dom-domquad-domquad-rect>rect<a class=self-link href=#dom-domquad-domquad-rect></a></dfn>),
Exposed=(Window,Worker)]
interface <dfn class=idl-code data-dfn-type=interface data-export="" data-global-name="" id=dom-domquad>DOMQuad<a class=self-link href=#dom-domquad></a></dfn> {
[SameObject] readonly attribute <a data-link-type=idl-name href=#dom-dompoint title=DOMPoint>DOMPoint</a> <a class=idl-code data-global-name="DOMQuad<interface>/p1<attribute>" data-link-for=DOMQuad data-link-type=attribute data-readonly="" data-type="DOMPoint " href=#dom-domquad-p1 title=p1>p1</a>;
[SameObject] readonly attribute <a data-link-type=idl-name href=#dom-dompoint title=DOMPoint>DOMPoint</a> <a class=idl-code data-global-name="DOMQuad<interface>/p2<attribute>" data-link-for=DOMQuad data-link-type=attribute data-readonly="" data-type="DOMPoint " href=#dom-domquad-p2 title=p2>p2</a>;
[SameObject] readonly attribute <a data-link-type=idl-name href=#dom-dompoint title=DOMPoint>DOMPoint</a> <a class=idl-code data-global-name="DOMQuad<interface>/p3<attribute>" data-link-for=DOMQuad data-link-type=attribute data-readonly="" data-type="DOMPoint " href=#dom-domquad-p3 title=p3>p3</a>;
[SameObject] readonly attribute <a data-link-type=idl-name href=#dom-dompoint title=DOMPoint>DOMPoint</a> <a class=idl-code data-global-name="DOMQuad<interface>/p4<attribute>" data-link-for=DOMQuad data-link-type=attribute data-readonly="" data-type="DOMPoint " href=#dom-domquad-p4 title=p4>p4</a>;
[SameObject] readonly attribute <a data-link-type=idl-name href=#dom-domrectreadonly title=DOMRectReadOnly>DOMRectReadOnly</a> <a class=idl-code data-global-name="DOMQuad<interface>/bounds<attribute>" data-link-for=DOMQuad data-link-type=attribute data-readonly="" data-type="DOMRectReadOnly " href=#dom-domquad-bounds title=bounds>bounds</a>;
};
</pre>
<p>The <dfn class=idl-code data-dfn-for=DOMQuad data-dfn-type=constructor data-export="" id=dom-domquad-domquad><code>DOMQuad()</code><a class=self-link href=#dom-domquad-domquad></a></dfn> constructor, when invoked, must run the following steps:
<dl class=switch>
<dt>If invoked with one argument</dt>
<dd>
<ol class=algorithm>
<li>Let <var>rect</var> be the argument.
<li>Let <var>x</var>, <var>y</var>, <var>width</var> and <var>height</var> be the value of <var>rect</var>’s <a class=idl-code data-link-for=DOMRectReadOnly data-link-type=attribute href=#dom-domrectreadonly-domrect-x title=x>x</a>, <a class=idl-code data-link-for=DOMRectReadOnly data-link-type=attribute href=#dom-domrectreadonly-domrect-y title=y>y</a>, <a class=idl-code data-link-for=DOMRectReadOnly data-link-type=attribute href=#dom-domrectreadonly-domrect-width title=width>width</a> and <a class=idl-code data-link-for=DOMRectReadOnly data-link-type=attribute href=#dom-domrectreadonly-domrect-height title=height>height</a> attributes, respectively.
<li>Let <var>point 1</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object with <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-x title=x>x</a> set to <var>x</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-y title=y>y</a> set to <var>y</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-z title=z>z</a> set to zero and <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-w title=w>w</a> set to one.
<li>Let <var>point 2</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object with <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-x title=x>x</a> set to <var>x</var> + <var>width</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-y title=y>y</a> set to <var>y</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-z title=z>z</a> set to zero and <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-w title=w>w</a> set to one.
<li>Let <var>point 3</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object with <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-x title=x>x</a> set to <var>x</var> + <var>width</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-y title=y>y</a> set to <var>y</var> + <var>height</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-z title=z>z</a> set to zero and <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-w title=w>w</a> set to one.
<li>Let <var>point 4</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object with <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-x title=x>x</a> set to <var>x</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-y title=y>y</a> set to <var>y</var> + <var>height</var>, <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-z title=z>z</a> set to zero and <a class=idl-code data-link-for=DOMPoint data-link-type=attribute href=#dom-dompointreadonly-dompoint-w title=w>w</a> set to one.
<li><p>Return a new <a class=idl-code data-link-type=interface href=#dom-domquad title=DOMQuad>DOMQuad</a> with <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p1 title=p1>p1</a> set to <var>point 1</var>, <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p2 title=p2>p2</a> set to <var>point 2</var>, <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p3 title=p3>p3</a> set to <var>point 3</var> and <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p4 title=p4>p4</a> set to <var>point 4</var>, and let the <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a> be <var>bounds</var>.
</ol>
</dd>
<dt>Otherwise</dt>
<dd>
<ol class=algorithm>
<li>Let <var>p1</var>, <var>p2</var>, <var>p3</var> and <var>p4</var> be the given arguments, in the same order.
<li>Let <var>point 1</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p1</var>.
<li>Let <var>point 2</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p2</var>.
<li>Let <var>point 3</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p3</var>.
<li>Let <var>point 4</var> be a new <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object with its attributes set to the values of the namesake dictionary members in <var>p4</var>.
<li><p>Return a new <a class=idl-code data-link-type=interface href=#dom-domquad title=DOMQuad>DOMQuad</a> with <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p1 title=p1>p1</a> set to <var>point 1</var>, <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p2 title=p2>p2</a> set to <var>point 2</var>, <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p3 title=p3>p3</a> set to <var>point 3</var> and <a class=idl-code data-link-for=DOMQuad data-link-type=attribute href=#dom-domquad-p4 title=p4>p4</a> set to <var>point 4</var>, and let the <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a> be <var>bounds</var>.
</ol>
<p class=note>Note: It is possible to pass <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a>/<a class=idl-code data-link-type=interface href=#dom-dompointreadonly title=DOMPointReadOnly>DOMPointReadOnly</a> arguments as well. The passed arguments will be transformed to the correct object type internally following the WebIDL rules <a data-biblio-type=normative data-link-type=biblio href=#biblio-webidl title=WEBIDL>[WEBIDL]</a>.
</dd>
</dl>
<div data-dfn-for=DOMQuad data-dfn-type=attribute>
The <dfn class=idl-code data-dfn-for=DOMQuad data-dfn-type=attribute data-export="" id=dom-domquad-p1>p1<a class=self-link href=#dom-domquad-p1></a></dfn> attribute must return a <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> that represents <a class=idl-code data-link-type=attribute href=#dom-domquad-p1 title=p1>p1</a> of the quadrilateral it was invoked on. The author can modify the returned <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object, which directly affects the quadrilateral.
<p>The <dfn class=idl-code data-dfn-for=DOMQuad data-dfn-type=attribute data-export="" id=dom-domquad-p2>p2<a class=self-link href=#dom-domquad-p2></a></dfn> attribute must return a <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> that represents <a class=idl-code data-link-type=attribute href=#dom-domquad-p2 title=p2>p2</a> of the quadrilateral it was invoked on. The author can modify the returned <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object, which directly affects the quadrilateral.</p>
<p>The <dfn class=idl-code data-dfn-for=DOMQuad data-dfn-type=attribute data-export="" id=dom-domquad-p3>p3<a class=self-link href=#dom-domquad-p3></a></dfn> attribute must return a <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> that represents <a class=idl-code data-link-type=attribute href=#dom-domquad-p3 title=p3>p3</a> of the quadrilateral it was invoked on. The author can modify the returned <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object, which directly affects the quadrilateral.</p>
<p>The <dfn class=idl-code data-dfn-for=DOMQuad data-dfn-type=attribute data-export="" id=dom-domquad-p4>p4<a class=self-link href=#dom-domquad-p4></a></dfn> attribute must return a <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> that represents <a class=idl-code data-link-type=attribute href=#dom-domquad-p4 title=p4>p4</a> of the quadrilateral it was invoked on. The author can modify the returned <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> object, which directly affects the quadrilateral.</p>
<p>The <dfn class=idl-code data-dfn-for=DOMQuad data-dfn-type=attribute data-export="" id=dom-domquad-bounds>bounds<a class=self-link href=#dom-domquad-bounds></a></dfn> attribute must return the <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a> of the quadrilateral it was invoked on.</p>
</div>
<p><a class=idl-code data-link-type=interface href=#dom-domquad title=DOMQuad>DOMQuad</a> objects have an <dfn data-dfn-for=quadlirateral data-dfn-type=dfn data-noexport="" id=associated-bounding-rectangle>associated bounding rectangle<a class=self-link href=#associated-bounding-rectangle></a></dfn> set to a <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=DOMRectReadOnly>DOMRectReadOnly</a> object when created. <a class=idl-code data-link-type=interface href=#dom-domquad title=DOMQuad>DOMQuad</a> objects must have read and write access to the internal member variables of the <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a>. The <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a> is live; whenever the objects for <a class=idl-code data-link-type=attribute href=#dom-domquad-p1 title=p1>p1</a>, <a class=idl-code data-link-type=attribute href=#dom-domquad-p2 title=p2>p2</a>, <a class=idl-code data-link-type=attribute href=#dom-domquad-p3 title=p3>p3</a> or <a class=idl-code data-link-type=attribute href=#dom-domquad-p4 title=p4>p4</a> change, the <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a> must update its internal member variable values as appropriate to describe the new smallest bounding box of the four points.</p>
<p>The <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a> is computed as follows:</p>
<ol class=algorithm>
<li>Let <var>bounds</var> be a <a class=idl-code data-link-type=interface href=#dom-domrectreadonly title=DOMRectReadOnly>DOMRectReadOnly</a> object.</li>
<li>Let <var>left</var> be the minimum of <a class=idl-code data-link-type=attribute href=#dom-domquad-p1 title=p1>p1</a>.x, <a class=idl-code data-link-type=attribute href=#dom-domquad-p2 title=p2>p2</a>.x, <a class=idl-code data-link-type=attribute href=#dom-domquad-p3 title=p3>p3</a>.x and <a class=idl-code data-link-type=attribute href=#dom-domquad-p4 title=p4>p4</a>.x.</li>
<li>Let <var>top</var> be the minimum of <a class=idl-code data-link-type=attribute href=#dom-domquad-p1 title=p1>p1</a>.y, <a class=idl-code data-link-type=attribute href=#dom-domquad-p2 title=p2>p2</a>.y, <a class=idl-code data-link-type=attribute href=#dom-domquad-p3 title=p3>p3</a>.y and <a class=idl-code data-link-type=attribute href=#dom-domquad-p4 title=p4>p4</a>.y.</li>
<li>Let <var>right</var> be the maximum of <a class=idl-code data-link-type=attribute href=#dom-domquad-p1 title=p1>p1</a>.x, <a class=idl-code data-link-type=attribute href=#dom-domquad-p2 title=p2>p2</a>.x, <a class=idl-code data-link-type=attribute href=#dom-domquad-p3 title=p3>p3</a>.x and <a class=idl-code data-link-type=attribute href=#dom-domquad-p4 title=p4>p4</a>.x.</li>
<li>Let <var>bottom</var> be the maximum of <a class=idl-code data-link-type=attribute href=#dom-domquad-p1 title=p1>p1</a>.y, <a class=idl-code data-link-type=attribute href=#dom-domquad-p2 title=p2>p2</a>.y, <a class=idl-code data-link-type=attribute href=#dom-domquad-p3 title=p3>p3</a>.y and <a class=idl-code data-link-type=attribute href=#dom-domquad-p4 title=p4>p4</a>.y.</li>
<li>Let <a data-link-for=rectangle data-link-type=dfn href=#x-coordinate0 title="x coordinate">x coordinate</a> of <var>bounds</var> be <var>left</var>, <a data-link-for=rectangle data-link-type=dfn href=#y-coordinate0 title="y coordinate">y coordinate</a> of <var>bounds</var> be <var>top</var>, <a data-link-type=dfn href=#width-dimension title="width dimension">width dimension</a> of <var>bounds</var> be <var>right</var> - <var>left</var> and <a data-link-type=dfn href=#height-dimension title="height dimension">height dimension</a> of <var>bounds</var> be <var>bottom</var> - <var>top</var>.</li>
</ol>
<div class=example>
<p>In this example the <a class=idl-code data-link-type=interface href=#dom-domquad title=DOMQuad>DOMQuad</a> constructor is called with arguments of type <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> and <a class=idl-code data-link-type=dictionary href=#dictdef-dompointinit title=DOMPointInit>DOMPointInit</a>. Both arguments are accepted and can be used.
<pre><code>var point = new DOMPoint(2, 0);
var quad1 = new DOMQuad(point, {x: 12, y: 0}, {x: 2, y: 10}, {x: 12, y: 10});</code></pre>
<p>The attribute values of the resulting <a class=idl-code data-link-type=interface href=#dom-domquad title=DOMQuad>DOMQuad</a> <var>quad1</var> above are also equal to the attribute values of the following <a class=idl-code data-link-type=interface href=#dom-domquad title=DOMQuad>DOMQuad</a> <var>quad2</var>:</p>
<pre><code>var rect = new DOMRect(2, 0, 10, 10);
var quad2 = new DOMQuad(rect);</code></pre>
</div>
<div class=example>
<p>This is an example of an irregular quadrilateral:</p>
<pre><code>new DOMQuad({x: 40, y: 25}, {x: 180, y: 8}, {x: 210, y: 150}, {x: 10, y: 180});
</code></pre>
<div class=figure>
<svg height=200 width=230>
<title>An irregular quadrilateral with none of the sides being vertical or horizontal. Its four corners are marked with red circles. Around this quadrilateral is a dashed rectangle. All sides of this rectangle are vertical or horizontal and tangent the quadrilateral.</title>
<polygon fill="rgb(51, 153, 204)" points="40 25, 180 8, 210 150, 10 180"></polygon>
<rect fill=none height=172 stroke=black stroke-dasharray="3 2" width=200 x=10 y=8></rect>
<circle cx=40 cy=25 fill="rgb(204, 51, 51)" r=3></circle>
<circle cx=180 cy=8 fill="rgb(204, 51, 51)" r=3></circle>
<circle cx=210 cy=150 fill="rgb(204, 51, 51)" r=3></circle>
<circle cx=10 cy=180 fill="rgb(204, 51, 51)" r=3></circle>
</svg>
<p class=capture>An irregular quadrilateral represented by a <a class=idl-code data-link-type=interface href=#dom-domquad title=DOMQuad>DOMQuad</a>. The four red colored circles represent the <a class=idl-code data-link-type=interface href=#dom-dompoint title=DOMPoint>DOMPoint</a> attributes <a class=idl-code data-link-type=attribute href=#dom-domquad-p1 title=p1>p1</a> to <a class=idl-code data-link-type=attribute href=#dom-domquad-p4 title=p4>p4</a>. The dashed rectangle represents the <a data-link-type=dfn href=#associated-bounding-rectangle title="associated bounding rectangle">associated bounding rectangle</a> <a class=idl-code data-link-type=attribute href=#dom-domquad-bounds title=bounds>bounds</a> of the <a class=idl-code data-link-type=interface href=#dom-domquad title=DOMQuad>DOMQuad</a>.</p>
</div>
</div>
<h2 class="heading settled" data-level=6 id=DOMMatrix><span class=secno>6. </span><span class=content>
The DOMMatrix interfaces</span><a class=self-link href=#DOMMatrix></a></h2>
<p>The <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> and <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> interfaces each represent a mathematical <dfn data-dfn-type=dfn data-noexport="" id=matrix>matrix<a class=self-link href=#matrix></a></dfn> with the purpose of describing transformations in a graphical context. The following sections describe the details of the interface.</p>
<div class=figure>
<math display=block><mrow><mfenced close=] open=[ separators=,><mrow><mtable><mtr><mtd><msub><mi>m</mi><mi>11</mi></msub></mtd><mtd><msub><mi>m</mi><mi>21</mi></msub></mtd><mtd><msub><mi>m</mi><mi>31</mi></msub></mtd><mtd><msub><mi>m</mi><mi>41</mi></msub></mtd></mtr><mtr><mtd><msub><mi>m</mi><mi>12</mi></msub></mtd><mtd><msub><mi>m</mi><mi>22</mi></msub></mtd><mtd><msub><mi>m</mi><mi>32</mi></msub></mtd><mtd><msub><mi>m</mi><mi>42</mi></msub></mtd></mtr><mtr><mtd><msub><mi>m</mi><mi>13</mi></msub></mtd><mtd><msub><mi>m</mi><mi>23</mi></msub></mtd><mtd><msub><mi>m</mi><mi>33</mi></msub></mtd><mtd><msub><mi>m</mi><mi>43</mi></msub></mtd></mtr><mtr><mtd><msub><mi>m</mi><mi>14</mi></msub></mtd><mtd><msub><mi>m</mi><mi>24</mi></msub></mtd><mtd><msub><mi>m</mi><mi>34</mi></msub></mtd><mtd><msub><mi>m</mi><mi>44</mi></msub></mtd></mtr></mtable></mrow></mfenced></mrow></math>
<p class=capture>A 4x4 matrix representing a <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> with items m11 to m44.</p>
</div>
<p>In the following sections, terms have the following meaning:</p>
<dl>
<dt><dfn data-dfn-type=dfn data-noexport="" id=post-multiply>post-multiply<a class=self-link href=#post-multiply></a></dfn></dt>
<dd>
Term A post-multiplied by term B is equal to A · B.
</dd>
<dt><dfn data-dfn-type=dfn data-noexport="" id=pre-multiply>pre-multiply<a class=self-link href=#pre-multiply></a></dfn></dt>
<dd>
Term A pre-multiplied by term B is equal to B · A.
</dd>
<dt><dfn data-dfn-type=dfn data-noexport="" id=multiply>multiply<a class=self-link href=#multiply></a></dfn></dt>
<dd>
Multiply term A by term B is equal to A · B.
</dd>
</dl>
<pre class=idl>[Constructor(sequence<unrestricted double> <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/DOMMatrixReadOnly() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/DOMMatrixReadOnly()<method>/numbersequence<argument>" id=dom-dommatrixreadonly-dommatrixreadonly-numbersequence>numberSequence<a class=self-link href=#dom-dommatrixreadonly-dommatrixreadonly-numbersequence></a></dfn>),
Exposed=(Window,Worker)]
interface <dfn class=idl-code data-dfn-type=interface data-export="" data-global-name="" id=dom-dommatrixreadonly>DOMMatrixReadOnly<a class=self-link href=#dom-dommatrixreadonly></a></dfn> {
// These attributes are simple aliases for certain elements of the 4x4 matrix
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/a<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-a title=a>a</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/b<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-b title=b>b</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/c<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-c title=c>c</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/d<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-d title=d>d</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/e<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-e title=e>e</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/f<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-f title=f>f</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m11<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m11 title=m11>m11</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m12<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m12 title=m12>m12</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m13<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m13 title=m13>m13</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m14<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m14 title=m14>m14</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m21<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m21 title=m21>m21</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m22<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m22 title=m22>m22</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m23<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m23 title=m23>m23</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m24<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m24 title=m24>m24</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m31<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m31 title=m31>m31</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m32<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m32 title=m32>m32</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m33<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m33 title=m33>m33</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m34<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m34 title=m34>m34</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m41<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m41 title=m41>m41</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m42<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m42 title=m42>m42</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m43<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m43 title=m43>m43</a>;
readonly attribute unrestricted double <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/m44<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m44 title=m44>m44</a>;
readonly attribute boolean <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/is2d<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="boolean " href=#dom-dommatrixreadonly-is2d title=is2D>is2D</a>;
readonly attribute boolean <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/isidentity<attribute>" data-link-for=DOMMatrixReadOnly data-link-type=attribute data-readonly="" data-type="boolean " href=#dom-dommatrixreadonly-isidentity title=isIdentity>isIdentity</a>;
// Immutable transform methods
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/translate()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-translate title=translate()>translate</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/translate() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/translate()<method>/tx<argument>" id=dom-dommatrixreadonly-translate-tx>tx<a class=self-link href=#dom-dommatrixreadonly-translate-tx></a></dfn>,
unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/translate() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/translate()<method>/ty<argument>" id=dom-dommatrixreadonly-translate-ty>ty<a class=self-link href=#dom-dommatrixreadonly-translate-ty></a></dfn>,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/translate() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/translate()<method>/tz<argument>" id=dom-dommatrixreadonly-translate-tz>tz<a class=self-link href=#dom-dommatrixreadonly-translate-tz></a></dfn> = 0);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/scale()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-scale title=scale()>scale</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/scale() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/scale()<method>/scale<argument>" id=dom-dommatrixreadonly-scale-scale>scale<a class=self-link href=#dom-dommatrixreadonly-scale-scale></a></dfn>,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/scale() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/scale()<method>/originx<argument>" id=dom-dommatrixreadonly-scale-originx>originX<a class=self-link href=#dom-dommatrixreadonly-scale-originx></a></dfn> = 0,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/scale() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/scale()<method>/originy<argument>" id=dom-dommatrixreadonly-scale-originy>originY<a class=self-link href=#dom-dommatrixreadonly-scale-originy></a></dfn> = 0);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/scale3d()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-scale3d title=scale3d()>scale3d</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/scale3d() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/scale3d()<method>/scale<argument>" id=dom-dommatrixreadonly-scale3d-scale>scale<a class=self-link href=#dom-dommatrixreadonly-scale3d-scale></a></dfn>,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/scale3d() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/scale3d()<method>/originx<argument>" id=dom-dommatrixreadonly-scale3d-originx>originX<a class=self-link href=#dom-dommatrixreadonly-scale3d-originx></a></dfn> = 0,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/scale3d() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/scale3d()<method>/originy<argument>" id=dom-dommatrixreadonly-scale3d-originy>originY<a class=self-link href=#dom-dommatrixreadonly-scale3d-originy></a></dfn> = 0,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/scale3d() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/scale3d()<method>/originz<argument>" id=dom-dommatrixreadonly-scale3d-originz>originZ<a class=self-link href=#dom-dommatrixreadonly-scale3d-originz></a></dfn> = 0);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/scalenonuniform()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-scalenonuniform title=scaleNonUniform()>scaleNonUniform</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/scaleNonUniform() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/scaleNonUniform()<method>/scalex<argument>" id=dom-dommatrixreadonly-scalenonuniform-scalex>scaleX<a class=self-link href=#dom-dommatrixreadonly-scalenonuniform-scalex></a></dfn>,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/scaleNonUniform() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/scaleNonUniform()<method>/scaley<argument>" id=dom-dommatrixreadonly-scalenonuniform-scaley>scaleY<a class=self-link href=#dom-dommatrixreadonly-scalenonuniform-scaley></a></dfn> = 1,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/scaleNonUniform() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/scaleNonUniform()<method>/scalez<argument>" id=dom-dommatrixreadonly-scalenonuniform-scalez>scaleZ<a class=self-link href=#dom-dommatrixreadonly-scalenonuniform-scalez></a></dfn> = 1,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/scaleNonUniform() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/scaleNonUniform()<method>/originx<argument>" id=dom-dommatrixreadonly-scalenonuniform-originx>originX<a class=self-link href=#dom-dommatrixreadonly-scalenonuniform-originx></a></dfn> = 0,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/scaleNonUniform() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/scaleNonUniform()<method>/originy<argument>" id=dom-dommatrixreadonly-scalenonuniform-originy>originY<a class=self-link href=#dom-dommatrixreadonly-scalenonuniform-originy></a></dfn> = 0,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/scaleNonUniform() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/scaleNonUniform()<method>/originz<argument>" id=dom-dommatrixreadonly-scalenonuniform-originz>originZ<a class=self-link href=#dom-dommatrixreadonly-scalenonuniform-originz></a></dfn> = 0);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/rotate()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-rotate title=rotate()>rotate</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/rotate() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/rotate()<method>/angle<argument>" id=dom-dommatrixreadonly-rotate-angle>angle<a class=self-link href=#dom-dommatrixreadonly-rotate-angle></a></dfn>,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/rotate() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/rotate()<method>/originx<argument>" id=dom-dommatrixreadonly-rotate-originx>originX<a class=self-link href=#dom-dommatrixreadonly-rotate-originx></a></dfn> = 0,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/rotate() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/rotate()<method>/originy<argument>" id=dom-dommatrixreadonly-rotate-originy>originY<a class=self-link href=#dom-dommatrixreadonly-rotate-originy></a></dfn> = 0);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/rotatefromvector()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-rotatefromvector title=rotateFromVector()>rotateFromVector</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/rotateFromVector() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/rotateFromVector()<method>/x<argument>" id=dom-dommatrixreadonly-rotatefromvector-x>x<a class=self-link href=#dom-dommatrixreadonly-rotatefromvector-x></a></dfn>,
unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/rotateFromVector() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/rotateFromVector()<method>/y<argument>" id=dom-dommatrixreadonly-rotatefromvector-y>y<a class=self-link href=#dom-dommatrixreadonly-rotatefromvector-y></a></dfn>);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/rotateaxisangle()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-rotateaxisangle title=rotateAxisAngle()>rotateAxisAngle</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/rotateAxisAngle() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/rotateAxisAngle()<method>/x<argument>" id=dom-dommatrixreadonly-rotateaxisangle-x>x<a class=self-link href=#dom-dommatrixreadonly-rotateaxisangle-x></a></dfn>,
unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/rotateAxisAngle() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/rotateAxisAngle()<method>/y<argument>" id=dom-dommatrixreadonly-rotateaxisangle-y>y<a class=self-link href=#dom-dommatrixreadonly-rotateaxisangle-y></a></dfn>,
unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/rotateAxisAngle() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/rotateAxisAngle()<method>/z<argument>" id=dom-dommatrixreadonly-rotateaxisangle-z>z<a class=self-link href=#dom-dommatrixreadonly-rotateaxisangle-z></a></dfn>,
unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/rotateAxisAngle() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/rotateAxisAngle()<method>/angle<argument>" id=dom-dommatrixreadonly-rotateaxisangle-angle>angle<a class=self-link href=#dom-dommatrixreadonly-rotateaxisangle-angle></a></dfn>);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/skewx()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-skewx title=skewX()>skewX</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/skewX() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/skewX()<method>/sx<argument>" id=dom-dommatrixreadonly-skewx-sx>sx<a class=self-link href=#dom-dommatrixreadonly-skewx-sx></a></dfn>);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/skewy()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-skewy title=skewY()>skewY</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/skewY() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/skewY()<method>/sy<argument>" id=dom-dommatrixreadonly-skewy-sy>sy<a class=self-link href=#dom-dommatrixreadonly-skewy-sy></a></dfn>);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/multiply()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-multiply title=multiply()>multiply</a>(<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/multiply() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/multiply()<method>/other<argument>" id=dom-dommatrixreadonly-multiply-other>other<a class=self-link href=#dom-dommatrixreadonly-multiply-other></a></dfn>);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/flipx()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-flipx title=flipX()>flipX</a>();
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/flipy()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-flipy title=flipY()>flipY</a>();
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/inverse()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-inverse title=inverse()>inverse</a>();
<a data-link-type=idl-name href=#dom-dompoint title=DOMPoint>DOMPoint</a> <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/transformpoint()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-transformpoint title=transformPoint()>transformPoint</a>(optional <a data-link-type=idl-name href=#dictdef-dompointinit title=DOMPointInit>DOMPointInit</a> <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly/transformPoint() data-dfn-type=argument data-export="" data-global-name="DOMMatrixReadOnly<interface>/transformPoint()<method>/point<argument>" id=dom-dommatrixreadonly-transformpoint-point>point<a class=self-link href=#dom-dommatrixreadonly-transformpoint-point></a></dfn>);
Float32Array <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/tofloat32array()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-tofloat32array title=toFloat32Array()>toFloat32Array</a>();
Float64Array <a class=idl-code data-global-name="DOMMatrixReadOnly<interface>/tofloat64array()<method>" data-link-for=DOMMatrixReadOnly data-link-type=method href=#dom-dommatrixreadonly-tofloat64array title=toFloat64Array()>toFloat64Array</a>();
stringifier;
};
[Constructor,
Constructor(DOMString <dfn class=idl-code data-dfn-for=DOMMatrix/DOMMatrix() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/DOMMatrix()<method>/transformlist<argument>" id=dom-dommatrix-dommatrix-transformlist>transformList<a class=self-link href=#dom-dommatrix-dommatrix-transformlist></a></dfn>),
Constructor(<a data-link-type=idl-name href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> <dfn class=idl-code data-dfn-for=DOMMatrix/DOMMatrix() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/DOMMatrix()<method>/other<argument>" id=dom-dommatrix-dommatrix-other>other<a class=self-link href=#dom-dommatrix-dommatrix-other></a></dfn>),
Constructor(Float32Array <dfn class=idl-code data-dfn-for=DOMMatrix/DOMMatrix() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/DOMMatrix()<method>/array32<argument>" id=dom-dommatrix-dommatrix-array32>array32<a class=self-link href=#dom-dommatrix-dommatrix-array32></a></dfn>),
Constructor(Float64Array <dfn class=idl-code data-dfn-for=DOMMatrix/DOMMatrix() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/DOMMatrix()<method>/array64<argument>" id=dom-dommatrix-dommatrix-array64>array64<a class=self-link href=#dom-dommatrix-dommatrix-array64></a></dfn>),
Constructor(sequence<unrestricted double> <dfn class=idl-code data-dfn-for=DOMMatrix/DOMMatrix() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/DOMMatrix()<method>/numbersequence<argument>" id=dom-dommatrix-dommatrix-numbersequence>numberSequence<a class=self-link href=#dom-dommatrix-dommatrix-numbersequence></a></dfn>),
Exposed=(Window,Worker)]
interface <dfn class=idl-code data-dfn-type=interface data-export="" data-global-name="" id=dom-dommatrix>DOMMatrix<a class=self-link href=#dom-dommatrix></a></dfn> : <a data-link-type=idl-name href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> {
// These attributes are simple aliases for certain elements of the 4x4 matrix
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/a<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-a title=a>a</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/b<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-b title=b>b</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/c<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-c title=c>c</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/d<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-d title=d>d</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/e<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-e title=e>e</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/f<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-f title=f>f</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m11<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m11 title=m11>m11</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m12<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m12 title=m12>m12</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m13<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m13 title=m13>m13</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m14<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m14 title=m14>m14</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m21<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m21 title=m21>m21</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m22<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m22 title=m22>m22</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m23<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m23 title=m23>m23</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m24<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m24 title=m24>m24</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m31<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m31 title=m31>m31</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m32<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m32 title=m32>m32</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m33<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m33 title=m33>m33</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m34<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m34 title=m34>m34</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m41<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m41 title=m41>m41</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m42<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m42 title=m42>m42</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m43<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m43 title=m43>m43</a>;
inherit attribute unrestricted double <a class=idl-code data-global-name="DOMMatrix<interface>/m44<attribute>" data-link-for=DOMMatrix data-link-type=attribute data-type="unrestricted double " href=#dom-dommatrixreadonly-dommatrix-m44 title=m44>m44</a>;
// Mutable transform methods
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrix<interface>/multiplyself()<method>" data-link-for=DOMMatrix data-link-type=method href=#dom-dommatrix-multiplyself title=multiplySelf()>multiplySelf</a>(<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <dfn class=idl-code data-dfn-for=DOMMatrix/multiplySelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/multiplySelf()<method>/other<argument>" id=dom-dommatrix-multiplyself-other>other<a class=self-link href=#dom-dommatrix-multiplyself-other></a></dfn>);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrix<interface>/premultiplyself()<method>" data-link-for=DOMMatrix data-link-type=method href=#dom-dommatrix-premultiplyself title=preMultiplySelf()>preMultiplySelf</a>(<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <dfn class=idl-code data-dfn-for=DOMMatrix/preMultiplySelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/preMultiplySelf()<method>/other<argument>" id=dom-dommatrix-premultiplyself-other>other<a class=self-link href=#dom-dommatrix-premultiplyself-other></a></dfn>);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrix<interface>/translateself()<method>" data-link-for=DOMMatrix data-link-type=method href=#dom-dommatrix-translateself title=translateSelf()>translateSelf</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/translateSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/translateSelf()<method>/tx<argument>" id=dom-dommatrix-translateself-tx>tx<a class=self-link href=#dom-dommatrix-translateself-tx></a></dfn>,
unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/translateSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/translateSelf()<method>/ty<argument>" id=dom-dommatrix-translateself-ty>ty<a class=self-link href=#dom-dommatrix-translateself-ty></a></dfn>,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/translateSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/translateSelf()<method>/tz<argument>" id=dom-dommatrix-translateself-tz>tz<a class=self-link href=#dom-dommatrix-translateself-tz></a></dfn> = 0);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrix<interface>/scaleself()<method>" data-link-for=DOMMatrix data-link-type=method href=#dom-dommatrix-scaleself title=scaleSelf()>scaleSelf</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/scaleSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/scaleSelf()<method>/scale<argument>" id=dom-dommatrix-scaleself-scale>scale<a class=self-link href=#dom-dommatrix-scaleself-scale></a></dfn>,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/scaleSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/scaleSelf()<method>/originx<argument>" id=dom-dommatrix-scaleself-originx>originX<a class=self-link href=#dom-dommatrix-scaleself-originx></a></dfn> = 0,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/scaleSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/scaleSelf()<method>/originy<argument>" id=dom-dommatrix-scaleself-originy>originY<a class=self-link href=#dom-dommatrix-scaleself-originy></a></dfn> = 0);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrix<interface>/scale3dself()<method>" data-link-for=DOMMatrix data-link-type=method href=#dom-dommatrix-scale3dself title=scale3dSelf()>scale3dSelf</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/scale3dSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/scale3dSelf()<method>/scale<argument>" id=dom-dommatrix-scale3dself-scale>scale<a class=self-link href=#dom-dommatrix-scale3dself-scale></a></dfn>,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/scale3dSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/scale3dSelf()<method>/originx<argument>" id=dom-dommatrix-scale3dself-originx>originX<a class=self-link href=#dom-dommatrix-scale3dself-originx></a></dfn> = 0,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/scale3dSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/scale3dSelf()<method>/originy<argument>" id=dom-dommatrix-scale3dself-originy>originY<a class=self-link href=#dom-dommatrix-scale3dself-originy></a></dfn> = 0,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/scale3dSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/scale3dSelf()<method>/originz<argument>" id=dom-dommatrix-scale3dself-originz>originZ<a class=self-link href=#dom-dommatrix-scale3dself-originz></a></dfn> = 0);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrix<interface>/scalenonuniformself()<method>" data-link-for=DOMMatrix data-link-type=method href=#dom-dommatrix-scalenonuniformself title=scaleNonUniformSelf()>scaleNonUniformSelf</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/scaleNonUniformSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/scaleNonUniformSelf()<method>/scalex<argument>" id=dom-dommatrix-scalenonuniformself-scalex>scaleX<a class=self-link href=#dom-dommatrix-scalenonuniformself-scalex></a></dfn>,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/scaleNonUniformSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/scaleNonUniformSelf()<method>/scaley<argument>" id=dom-dommatrix-scalenonuniformself-scaley>scaleY<a class=self-link href=#dom-dommatrix-scalenonuniformself-scaley></a></dfn> = 1,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/scaleNonUniformSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/scaleNonUniformSelf()<method>/scalez<argument>" id=dom-dommatrix-scalenonuniformself-scalez>scaleZ<a class=self-link href=#dom-dommatrix-scalenonuniformself-scalez></a></dfn> = 1,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/scaleNonUniformSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/scaleNonUniformSelf()<method>/originx<argument>" id=dom-dommatrix-scalenonuniformself-originx>originX<a class=self-link href=#dom-dommatrix-scalenonuniformself-originx></a></dfn> = 0,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/scaleNonUniformSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/scaleNonUniformSelf()<method>/originy<argument>" id=dom-dommatrix-scalenonuniformself-originy>originY<a class=self-link href=#dom-dommatrix-scalenonuniformself-originy></a></dfn> = 0,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/scaleNonUniformSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/scaleNonUniformSelf()<method>/originz<argument>" id=dom-dommatrix-scalenonuniformself-originz>originZ<a class=self-link href=#dom-dommatrix-scalenonuniformself-originz></a></dfn> = 0);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrix<interface>/rotateself()<method>" data-link-for=DOMMatrix data-link-type=method href=#dom-dommatrix-rotateself title=rotateSelf()>rotateSelf</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/rotateSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/rotateSelf()<method>/angle<argument>" id=dom-dommatrix-rotateself-angle>angle<a class=self-link href=#dom-dommatrix-rotateself-angle></a></dfn>,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/rotateSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/rotateSelf()<method>/originx<argument>" id=dom-dommatrix-rotateself-originx>originX<a class=self-link href=#dom-dommatrix-rotateself-originx></a></dfn> = 0,
optional unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/rotateSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/rotateSelf()<method>/originy<argument>" id=dom-dommatrix-rotateself-originy>originY<a class=self-link href=#dom-dommatrix-rotateself-originy></a></dfn> = 0);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrix<interface>/rotatefromvectorself()<method>" data-link-for=DOMMatrix data-link-type=method href=#dom-dommatrix-rotatefromvectorself title=rotateFromVectorSelf()>rotateFromVectorSelf</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/rotateFromVectorSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/rotateFromVectorSelf()<method>/x<argument>" id=dom-dommatrix-rotatefromvectorself-x>x<a class=self-link href=#dom-dommatrix-rotatefromvectorself-x></a></dfn>,
unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/rotateFromVectorSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/rotateFromVectorSelf()<method>/y<argument>" id=dom-dommatrix-rotatefromvectorself-y>y<a class=self-link href=#dom-dommatrix-rotatefromvectorself-y></a></dfn>);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrix<interface>/rotateaxisangleself()<method>" data-link-for=DOMMatrix data-link-type=method href=#dom-dommatrix-rotateaxisangleself title=rotateAxisAngleSelf()>rotateAxisAngleSelf</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/rotateAxisAngleSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/rotateAxisAngleSelf()<method>/x<argument>" id=dom-dommatrix-rotateaxisangleself-x>x<a class=self-link href=#dom-dommatrix-rotateaxisangleself-x></a></dfn>,
unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/rotateAxisAngleSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/rotateAxisAngleSelf()<method>/y<argument>" id=dom-dommatrix-rotateaxisangleself-y>y<a class=self-link href=#dom-dommatrix-rotateaxisangleself-y></a></dfn>,
unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/rotateAxisAngleSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/rotateAxisAngleSelf()<method>/z<argument>" id=dom-dommatrix-rotateaxisangleself-z>z<a class=self-link href=#dom-dommatrix-rotateaxisangleself-z></a></dfn>,
unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/rotateAxisAngleSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/rotateAxisAngleSelf()<method>/angle<argument>" id=dom-dommatrix-rotateaxisangleself-angle>angle<a class=self-link href=#dom-dommatrix-rotateaxisangleself-angle></a></dfn>);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrix<interface>/skewxself()<method>" data-link-for=DOMMatrix data-link-type=method href=#dom-dommatrix-skewxself title=skewXSelf()>skewXSelf</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/skewXSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/skewXSelf()<method>/sx<argument>" id=dom-dommatrix-skewxself-sx>sx<a class=self-link href=#dom-dommatrix-skewxself-sx></a></dfn>);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrix<interface>/skewyself()<method>" data-link-for=DOMMatrix data-link-type=method href=#dom-dommatrix-skewyself title=skewYSelf()>skewYSelf</a>(unrestricted double <dfn class=idl-code data-dfn-for=DOMMatrix/skewYSelf() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/skewYSelf()<method>/sy<argument>" id=dom-dommatrix-skewyself-sy>sy<a class=self-link href=#dom-dommatrix-skewyself-sy></a></dfn>);
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrix<interface>/invertself()<method>" data-link-for=DOMMatrix data-link-type=method href=#dom-dommatrix-invertself title=invertSelf()>invertSelf</a>();
<a data-link-type=idl-name href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> <a class=idl-code data-global-name="DOMMatrix<interface>/setmatrixvalue()<method>" data-link-for=DOMMatrix data-link-type=method href=#dom-dommatrix-setmatrixvalue title=setMatrixValue()>setMatrixValue</a>(DOMString <dfn class=idl-code data-dfn-for=DOMMatrix/setMatrixValue() data-dfn-type=argument data-export="" data-global-name="DOMMatrix<interface>/setMatrixValue()<method>/transformlist<argument>" id=dom-dommatrix-setmatrixvalue-transformlist>transformList<a class=self-link href=#dom-dommatrix-setmatrixvalue-transformlist></a></dfn>);
};
</pre>
<p>The following algorithms assume that <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> objects have the internal member variables <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m11-element>m11 element<a class=self-link href=#m11-element></a></dfn>, <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m12-element>m12 element<a class=self-link href=#m12-element></a></dfn>, <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m13-element>m13 element<a class=self-link href=#m13-element></a></dfn>, <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m14-element>m14 element<a class=self-link href=#m14-element></a></dfn>, <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m21-element>m21 element<a class=self-link href=#m21-element></a></dfn>, <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m22-element>m22 element<a class=self-link href=#m22-element></a></dfn>, <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m23-element>m23 element<a class=self-link href=#m23-element></a></dfn>, <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m24-element>m24 element<a class=self-link href=#m24-element></a></dfn>, <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m31-element>m31 element<a class=self-link href=#m31-element></a></dfn>, <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m32-element>m32 element<a class=self-link href=#m32-element></a></dfn>, <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m33-element>m33 element<a class=self-link href=#m33-element></a></dfn>, <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m34-element>m34 element<a class=self-link href=#m34-element></a></dfn>, <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m41-element>m41 element<a class=self-link href=#m41-element></a></dfn>, <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m42-element>m42 element<a class=self-link href=#m42-element></a></dfn>, <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m43-element>m43 element<a class=self-link href=#m43-element></a></dfn>, <dfn data-dfn-for=matrix data-dfn-type=dfn data-noexport="" id=m44-element>m44 element<a class=self-link href=#m44-element></a></dfn> and <a data-link-type=dfn href=#is2d title=is2D>is2D</a>. <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> as well as the inheriting interface <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> must be able to access and set the value of these variables.</p>
<p>An interface returning an <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> object by an attribute or function may be able to modify internal member variable values. Such an interface must specify this ability explicitly in prose.</p>
<p>Internal member variables must not be exposed in any way.</p>
<p>The <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> and <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> interfaces replace the SVGMatrix interface from SVG <a data-biblio-type=informative data-link-type=biblio href=#biblio-svg11 title=SVG11>[SVG11]</a>.</p>
<p>For historical reasons, Window objects must also have a writable, configurable, non-enumerable property named <dfn class=idl-code data-dfn-type=interface data-export="" id=dom-svgmatrix>SVGMatrix<a class=self-link href=#dom-svgmatrix></a></dfn> whose value is the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface object.</p>
<h3 class="heading settled" data-level=6.1 id=dommatrixreadonly-constructors><span class=secno>6.1. </span><span class=content>DOMMatrixReadOnly constructor</span><a class=self-link href=#dommatrixreadonly-constructors></a></h3>
<p>The <dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=constructor data-export="" id=dom-dommatrixreadonly-dommatrixreadonly title=DOMMatrixReadOnly()><code>DOMMatrixReadOnly(sequence<unrestricted double> <var>numberSequence</var>)</code><a class=self-link href=#dom-dommatrixreadonly-dommatrixreadonly></a></dfn> constructor, when invoked, must run the following steps:</p>
<dl class=switch>
<dt>If <var>numberSequence</var> has 6 elements</dt>
<dd>
<ol>
<li>Set <a data-link-type=dfn href=#m11-element title="m11 element">m11 element</a>, <a data-link-type=dfn href=#m12-element title="m12 element">m12 element</a>, <a data-link-type=dfn href=#m21-element title="m21 element">m21 element</a>, <a data-link-type=dfn href=#m22-element title="m22 element">m22 element</a>, <a data-link-type=dfn href=#m41-element title="m41 element">m41 element</a>, <a data-link-type=dfn href=#m42-element title="m42 element">m42 element</a> to the values of <var>numberSequence</var> in order starting with the first value. Furthermore, set <a data-link-type=dfn href=#m31-element title="m31 element">m31 element</a>, <a data-link-type=dfn href=#m32-element title="m32 element">m32 element</a>, <a data-link-type=dfn href=#m13-element title="m13 element">m13 element</a>, <a data-link-type=dfn href=#m23-element title="m23 element">m23 element</a>, <a data-link-type=dfn href=#m43-element title="m43 element">m43 element</a>, <a data-link-type=dfn href=#m14-element title="m14 element">m14 element</a>, <a data-link-type=dfn href=#m24-element title="m24 element">m24 element</a>, <a data-link-type=dfn href=#m34-element title="m34 element">m34 element</a> to <span class=css>0</span> and <a data-link-type=dfn href=#m33-element title="m33 element">m33 element</a>, <a data-link-type=dfn href=#m44-element title="m44 element">m44 element</a> to <span class=css>1</span>.</li>
<li>Set <a data-link-type=dfn href=#is2d title=is2D>is2D</a> to <span class=css>true</span>.</li>
<li>Return the new <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> object.</li>
</ol>
</dd>
<dt>If <var>numberSequence</var> has 16 elements</dt>
<dd>
<ol>
<li>Set <a data-link-type=dfn href=#m11-element title="m11 element">m11 element</a> to <a data-link-type=dfn href=#m44-element title="m44 element">m44 element</a> to the values of <var>numberSequence</var> in column-major order.</li>
<li>Set <a data-link-type=dfn href=#is2d title=is2D>is2D</a> to <span class=css>false</span>.</li>
<li>Return the new <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> object.</li>
</ol>
</dd>
<dt>Otherwise</dt>
<dd>Throw a <code>TypeError</code> exception.</dd>
</dl>
<h3 class="heading settled" data-level=6.2 id=dommatrix-constructors><span class=secno>6.2. </span><span class=content>DOMMatrix constructors</span><a class=self-link href=#dommatrix-constructors></a></h3>
<p>The <dfn class=idl-code data-dfn-for=DOMMatrix data-dfn-type=constructor data-export="" id=dom-dommatrix-dommatrix><code>DOMMatrix()</code><a class=self-link href=#dom-dommatrix-dommatrix></a></dfn> constructor, when invoked, must run the following steps:</p>
<dl class=switch>
<dt>If invoked with no arguments</dt>
<dd>
<ol>
<li>Call the constructor of <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> with a sequence of numbers: 1, 0, 0, 1, 0, 0.</li>
<li>Return the new <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> object.</li>
</ol>
</dd>
<dt>If invoked with a <a class=idl-code data-link-type=interface title=DOMString>DOMString</a> argument <var>transformList</var></dt>
<dd>
<ol>
<li>Parse <var>transformList</var> by following the syntax description in “<a href=http://www.w3.org/TR/css-transforms-1/#svg-syntax>Syntax of the SVG ‘transform’ attribute</a>” <a data-biblio-type=normative data-link-type=biblio href=#biblio-css3-transforms title=CSS3-TRANSFORMS>[CSS3-TRANSFORMS]</a> to a <a class="production css" data-link-type=type href=http://www.w3.org/TR/css-transforms-1/#typedef-transform-list title="<transform-list>"><transform-list></a>. If parsing is not successful or any <a class="production css" data-link-type=type href=http://www.w3.org/TR/css-transforms-1/#typedef-transform-function title="<transform-function>"><transform-function></a> has <a class="production css" data-link-type=type href=http://www.w3.org/TR/css3-values/#length-value title="<length>"><length></a> values without <a data-link-spec=css-values data-link-type=dfn href=http://dev.w3.org/csswg/css-values-3/#absolute-length title="absolute length">absolute length</a> units, throw a <a data-link-spec=html5 data-link-type=dfn href=https://html.spec.whatwg.org/#js-syntaxerror title=SyntaxError>SyntaxError</a> exception.</li>
<li>Let <var>2dTransform</var> track the 2D/3D dimension status of the <a class="production css" data-link-type=type href=http://www.w3.org/TR/css-transforms-1/#typedef-transform-list title="<transform-list>"><transform-list></a>.
<dl class=switch>
<dt>If the <a class="production css" data-link-type=type href=http://www.w3.org/TR/css-transforms-1/#typedef-transform-list title="<transform-list>"><transform-list></a> consists of any <a href=http://www.w3.org/TR/css-transforms-1/#three-d-transform-functions>3D Transform functions</a></dt>
<dd>Set <var>2dTransform</var> to <span class=css>false</span>.</dd>
<dt>Otherwise</dt>
<dd>Set <var>2dTransform</var> to <span class=css>true</span>.</dd>
</dl>
</li>
<li>Transform all <a class="production css" data-link-type=type href=http://www.w3.org/TR/css-transforms-1/#typedef-transform-function title="<transform-function>"><transform-function></a>s to 4x4 matrices by following the “<a href=http://www.w3.org/TR/css-transforms-1/#mathematical-description>Mathematical Description of Transform Functions</a>” <a data-biblio-type=normative data-link-type=biblio href=#biblio-css3-transforms title=CSS3-TRANSFORMS>[CSS3-TRANSFORMS]</a>.</li>
<li>Let <var>matrix</var> be a 4x4 matrix as shown in the initial figure of this section. Post-multiply all matrices from left to right and set <var>matrix</var> to this product.</li>
<li>Call the constructor of <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> as follows
<dl class=switch>
<dt>If <var>2dTransform</var> is set to <span class=css>true</span></dt>
<dd>Call the constructor of <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> with a sequence of numbers, the values being the 16 elements of <var>matrix</var>.</dd>
<dt>If <var>2dTransform</var> is set to <span class=css>false</span></dt>
<dd>Call the constructor of <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> with a sequence of numbers, the values being the elements <var>m11</var>, <var>m12</var>, <var>21</var>, <var>m22</var>, <var>m41</var> and <var>m42</var> of <var>matrix</var> of <var>matrix</var>.</dd>
</dl>
</li>
<li>Return the new <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> object.</li>
</ol>
</dd>
<dt>If invoked with a <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> argument <var>other</var></dt>
<dd>
<dl class=switch>
<dt>If the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-is2d title=is2D>is2D</a> attribute of <var>other</var> returns <span class=css>true</span></dt>
<dd>Call the constructor of <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> with a sequence of numbers, the values being the 16 elements <a data-link-type=dfn href=#m11-element title="m11 element">m11 element</a>, <a data-link-type=dfn href=#m12-element title="m12 element">m12 element</a>, <a data-link-type=dfn href=#m13-element title="m13 element">m13 element</a>, ..., <a data-link-type=dfn href=#m44-element title="m44 element">m44 element</a> of <var>other</var> in the given order.</dd>
<dt>Otherwise</dt>
<dd>Call the constructor of <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> with a sequence of numbers, the values being the 6 elements <a data-link-type=dfn href=#m11-element title="m11 element">m11 element</a>, <a data-link-type=dfn href=#m12-element title="m12 element">m12 element</a>, <a data-link-type=dfn href=#m21-element title="m21 element">m21 element</a>, <a data-link-type=dfn href=#m22-element title="m22 element">m22 element</a>, <a data-link-type=dfn href=#m41-element title="m41 element">m41 element</a> and <a data-link-type=dfn href=#m42-element title="m42 element">m42 element</a> of <var>other</var> in the given order.</dd>
</dl>
</dd>
<dt>If invoked with a <a class=idl-code data-link-type=interface href=https://html.spec.whatwg.org/#float32array title=Float32Array>Float32Array</a> argument <var>array32</var></dt>
<dd>
<dl class=switch>
<dt>If <var>array32</var> has 6 elements</dt>
<dt>If <var>array32</var> has 16 elements</dt>
<dd>
<ol>
<li>Call the constructor of <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> with a sequence of numbers taking the values from <var>array32</var> in the provided order.</li>
<li>Return the new <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> object.</li>
</ol>
</dd>
<dt>Otherwise</dt>
<dd>Throw a <code>TypeError</code> exception.</dd>
</dl>
</dd>
<dt>If invoked with a <a class=idl-code data-link-type=interface href=https://html.spec.whatwg.org/#float64array title=Float64Array>Float64Array</a> argument <var>array64</var></dt>
<dd>
<dl class=switch>
<dt>If <var>array64</var> has 6 elements</dt>
<dt>If <var>array64</var> has 16 elements</dt>
<dd>
<ol>
<li>Call the constructor of <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> with sequence of numbers taking the values from <var>array64</var> in the provided order.</li>
<li>Return the new <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> object.</li>
</ol>
</dd>
<dt>Otherwise</dt>
<dd>Throw a <code>TypeError</code> exception.</dd>
</dl>
</dd>
<dt>If invoked with a sequence<unrestricted double> argument <var>numberSequence</var></dt>
<dd>
<dl class=switch>
<dt>If <var>array64</var> has 6 elements</dt>
<dt>If <var>array64</var> has 16 elements</dt>
<dd>
<ol>
<li>Call the constructor of <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> with <var>numberSequence</var> as argument.</li>
<li>Return the new <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> object.</li>
</ol>
</dd>
<dt>Otherwise</dt>
<dd>Throw a <code>TypeError</code> exception.</dd>
</dl>
</dd>
</dl>
<h3 class="heading settled" data-level=6.3 id=dommatrix-attributes><span class=secno>6.3. </span><span class=content>DOMMatrix attributes</span><a class=self-link href=#dommatrix-attributes></a></h3>
<p>The following attributes <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m11 title=m11>m11</a> to <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m44 title=m44>m44</a> correspond to the 16 items of the matrix interfaces. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, if the attributes <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m31 title=m31>m31</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m32 title=m32>m32</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m13 title=m13>m13</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m23 title=m23>m23</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m43 title=m43>m43</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m14 title=m14>m14</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m24 title=m24>m24</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m34 title=m34>m34</a> are set to something else than <span class=css>0</span> or <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m33 title=m33>m33</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m44 title=m44>m44</a> are set to something else than <span class=css>1</span> set <a data-link-type=dfn href=#is2d title=is2D>is2D</a> to <span class=css>false</span>.</p>
<div data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute>
The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m11>m11<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m11></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m11-element title="m11 element">m11 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m11 title=m11>m11</a> attribute must set the <a data-link-type=dfn href=#m11-element title="m11 element">m11 element</a> value of the object it was invoked on to the new value.
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m12>m12<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m12></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m12-element title="m12 element">m12 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m12 title=m12>m12</a> attribute must set the <a data-link-type=dfn href=#m12-element title="m12 element">m12 element</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m13>m13<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m13></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m13-element title="m13 element">m13 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m13 title=m13>m13</a> attribute must set the <a data-link-type=dfn href=#m13-element title="m13 element">m13 element</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m14>m14<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m14></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m14-element title="m14 element">m14 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m14 title=m14>m14</a> attribute must set the <a data-link-type=dfn href=#m14-element title="m14 element">m14 element</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m21>m21<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m21></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m21-element title="m21 element">m21 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m21 title=m21>m21</a> attribute must set the <a data-link-type=dfn href=#m21-element title="m21 element">m21 element</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m22>m22<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m22></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m22-element title="m22 element">m22 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m22 title=m22>m22</a> attribute must set the <a data-link-type=dfn href=#m22-element title="m22 element">m22 element</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m23>m23<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m23></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m23-element title="m23 element">m23 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m23 title=m23>m23</a> attribute must set the <a data-link-type=dfn href=#m23-element title="m23 element">m23 element</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m24>m24<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m24></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m24-element title="m24 element">m24 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m24 title=m24>m24</a> attribute must set the <a data-link-type=dfn href=#m24-element title="m24 element">m24 element</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m31>m31<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m31></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m31-element title="m31 element">m31 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m31 title=m31>m31</a> attribute must set the <a data-link-type=dfn href=#m31-element title="m31 element">m31 element</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m32>m32<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m32></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m32-element title="m32 element">m32 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m32 title=m32>m32</a> attribute must set the <a data-link-type=dfn href=#m32-element title="m32 element">m32 element</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m33>m33<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m33></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m33-element title="m33 element">m33 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m33 title=m33>m33</a> attribute must set the <a data-link-type=dfn href=#m33-element title="m33 element">m33 element</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m34>m34<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m34></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m34-element title="m34 element">m34 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m34 title=m34>m34</a> attribute must set the <a data-link-type=dfn href=#m34-element title="m34 element">m34 element</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m41>m41<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m41></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m41-element title="m41 element">m41 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m41 title=m41>m41</a> attribute must set the <a data-link-type=dfn href=#m41-element title="m41 element">m41 element</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m42>m42<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m42></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m42-element title="m42 element">m42 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m42 title=m42>m42</a> attribute must set the <a data-link-type=dfn href=#m42-element title="m42 element">m42 element</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m43>m43<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m43></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m43-element title="m43 element">m43 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m43 title=m43>m43</a> attribute must set the <a data-link-type=dfn href=#m43-element title="m43 element">m43 element</a> value of the object it was invoked on to the new value.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-m44>m44<a class=self-link href=#dom-dommatrixreadonly-dommatrix-m44></a></dfn> attribute, on getting, must return the <a data-link-type=dfn href=#m44-element title="m44 element">m44 element</a> value of the object it was invoked on. For the <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> interface, setting the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m44 title=m44>m44</a> attribute must set the <a data-link-type=dfn href=#m44-element title="m44 element">m44 element</a> value of the object it was invoked on to the new value.</p>
</div>
<div data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute>
The following attributes <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-a title=a>a</a> to <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-f title=f>f</a> correspond to the 2D components of the matrix interfaces.
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-a>a<a class=self-link href=#dom-dommatrixreadonly-dommatrix-a></a></dfn> attribute is an alias to the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m11 title=m11>m11</a> attribute.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-b>b<a class=self-link href=#dom-dommatrixreadonly-dommatrix-b></a></dfn> attribute is an alias to the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m12 title=m12>m12</a> attribute.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-c>c<a class=self-link href=#dom-dommatrixreadonly-dommatrix-c></a></dfn> attribute is an alias to the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m21 title=m21>m21</a> attribute.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-d>d<a class=self-link href=#dom-dommatrixreadonly-dommatrix-d></a></dfn> attribute is an alias to the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m22 title=m22>m22</a> attribute.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-e>e<a class=self-link href=#dom-dommatrixreadonly-dommatrix-e></a></dfn> attribute is an alias to the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m41 title=m41>m41</a> attribute.</p>
<p>The <dfn class=idl-code data-dfn-for="DOMMatrixReadOnly DOMMatrix" data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-dommatrix-f>f<a class=self-link href=#dom-dommatrixreadonly-dommatrix-f></a></dfn> attribute is an alias to the <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m42 title=m42>m42</a> attribute.</p>
</div>
<p>The following attributes provide status information about <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a>.</p>
<dl data-dfn-for=DOMMatrixReadOnly data-dfn-type=attribute>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-is2d>is2D<a class=self-link href=#dom-dommatrixreadonly-is2d></a></dfn></dt>
<dd>
<p>Every <a class=idl-code data-link-type=interface href=#dom-dommatrixreadonly title=DOMMatrixReadOnly>DOMMatrixReadOnly</a> object must be flagged with a boolean <dfn data-dfn-type=dfn data-noexport="" id=is2d>is2D<a class=self-link href=#is2d></a></dfn>. This flag indicates that
<ol>
<li>The current matrix was initialized as a 2D matrix. See individual <a href=#dommatrix-constructors>constructors</a> for more details.</li>
<li>Only 2D transformation operations were applied. Each <a href=#mutable-transformation-methods>mutable</a> or <a href=#immutable-transformation-methods>immutable transformation method</a> defines if <a data-link-type=dfn href=#is2d title=is2D>is2D</a> must be set to <span class=css>false</span>.</li>
</ol>
<p></p>
<p class=note><a data-link-type=dfn href=#is2d title=is2D>is2D</a> can never be set to <span class=css>true</span> when it was set to <span class=css>false</span> before on a <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> object with the exception of calling the <a data-link-type=functionish href=#dom-dommatrix-setmatrixvalue title=setMatrixValue()>setMatrixValue()</a> method.</p>
<p>Returns the value of <a data-link-type=dfn href=#is2d title=is2D>is2D</a>.</p>
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=attribute data-export="" id=dom-dommatrixreadonly-isidentity>isIdentity<a class=self-link href=#dom-dommatrixreadonly-isidentity></a></dfn></dt>
<dd>
Returns <span class=css>true</span> if <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m12 title=m12>m12</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m13 title=m13>m13</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m14 title=m14>m14</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m21 title=m21>m21</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m23 title=m23>m23</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m24 title=m24>m24</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m31 title=m31>m31</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m32 title=m32>m32</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m34 title=m34>m34</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m41 title=m41>m41</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m42 title=m42>m42</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m43 title=m43>m43</a> are <span class=css>0</span> and <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m11 title=m11>m11</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m22 title=m22>m22</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m33 title=m33>m33</a>, <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m44 title=m44>m44</a> are <span class=css>1</span>. Otherwise returns <span class=css>false</span>.
</dd>
</dl>
<h3 class="heading settled" data-level=6.4 id=immutable-transformation-methods><span class=secno>6.4. </span><span class=content>Immutable transformation methods</span><a class=self-link href=#immutable-transformation-methods></a></h3>
<p>The following methods do not modify the current matrix and return a new <a class=idl-code data-link-type=interface href=#dom-dommatrix title=DOMMatrix>DOMMatrix</a> object.</p>
<dl data-dfn-for=DOMMatrixReadOnly data-dfn-type=method>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-translate title=translate()>translate(<var>tx</var>, <var>ty</var>, <var>tz</var>)<a class=self-link href=#dom-dommatrixreadonly-translate></a></dfn></dt>
<dd>
<ol>
<li>Let <em>result</em> be the resulting matrix initialized to the values of the current matrix.</li>
<li>Perform a <a class=idl-code data-link-type=method href=#dom-dommatrix-translateself title=translateSelf()>translateSelf()</a> transformation on <em>result</em> with the arguments <var>tx</var>, <var>ty</var>, <var>tz</var>.</li>
<li>Return <em>result</em>.</li>
</ol>
<p>The current matrix is not modified.</p>
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-scale title=scale()>scale(<var>scale</var>, <var>originX</var>, <var>originY</var>)<a class=self-link href=#dom-dommatrixreadonly-scale></a></dfn></dt>
<dd>
<ol>
<li>Let <em>other</em> be the resulting matrix initialized to the values of the current matrix.</li>
<li>Perform a <a class=idl-code data-link-type=method href=#dom-dommatrix-scaleself title=scaleSelf()>scaleSelf()</a> transformation on <em>result</em> with the arguments <var>scale</var>, <var>originX</var>, <var>originY</var>.</li>
<li>Return <em>result</em>.</li>
</ol>
<p>The current matrix is not modified.</p>
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-scale3d title=scale3d()>scale3d(<var>scale</var>, <var>originX</var>, <var>originY</var>, <var>originZ</var>)<a class=self-link href=#dom-dommatrixreadonly-scale3d></a></dfn></dt>
<dd>
<ol>
<li>Let <em>result</em> be the resulting matrix initialized to the values of the current matrix.</li>
<li>Perform a <a class=idl-code data-link-type=method href=#dom-dommatrix-scale3dself title=scale3dSelf()>scale3dSelf()</a> transformation on <em>result</em> with the arguments <var>scale</var>, <var>originX</var>, <var>originY</var>, <var>originZ</var>.</li>
<li>Return <em>result</em>.</li>
</ol>
<p>The current matrix is not modified.</p>
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-scalenonuniform title=scaleNonUniform()>scaleNonUniform(<var>scaleX</var>, <var>scaleY</var>, <var>scaleZ</var>, <var>originX</var>, <var>originY</var>, <var>originZ</var>)<a class=self-link href=#dom-dommatrixreadonly-scalenonuniform></a></dfn></dt>
<dd>
<ol>
<li>Let <em>result</em> be the resulting matrix initialized to the values of the current matrix.</li>
<li>Perform a <a class=idl-code data-link-type=method href=#dom-dommatrix-scalenonuniformself title=scaleNonUniformSelf()>scaleNonUniformSelf()</a> transformation on <em>result</em> with the arguments <var>scaleX</var>, <var>scaleY</var>, <var>scaleZ</var>, <var>originX</var>, <var>originY</var>, <var>originZ</var>.</li>
<li>Return <em>result</em>.</li>
</ol>
<p>The current matrix is not modified.</p>
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-rotate title=rotate()>rotate(<var>angle</var>, <var>originX</var>, <var>originY</var>)<a class=self-link href=#dom-dommatrixreadonly-rotate></a></dfn></dt>
<dd>
<ol>
<li>Let <em>result</em> be the resulting matrix initialized to the values of the current matrix.</li>
<li>Perform a <a class=idl-code data-link-type=method href=#dom-dommatrix-rotateself title=rotateSelf()>rotateSelf()</a> transformation on <em>result</em> with the arguments <var>angle</var>, <var>originX</var>, <var>originY</var>.</li>
<li>Return <em>result</em>.</li>
</ol>
<p>The current matrix is not modified.</p>
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-rotatefromvector title=rotateFromVector()>rotateFromVector(<var>x</var>, <var>y</var>)<a class=self-link href=#dom-dommatrixreadonly-rotatefromvector></a></dfn></dt>
<dd>
<ol>
<li>Let <em>result</em> be the resulting matrix initialized to the values of the current matrix.</li>
<li>Perform a <a class=idl-code data-link-type=method href=#dom-dommatrix-rotatefromvectorself title=rotateFromVectorSelf()>rotateFromVectorSelf()</a> transformation on <em>result</em> with the arguments <var>x</var>, <var>y</var>.</li>
<li>Return <em>result</em>.</li>
</ol>
<p>The current matrix is not modified.</p>
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-rotateaxisangle title=rotateAxisAngle()>rotateAxisAngle(<var>x</var>, <var>y</var>, <var>z</var>, <var>angle</var>)<a class=self-link href=#dom-dommatrixreadonly-rotateaxisangle></a></dfn></dt>
<dd>
<ol>
<li>Let <em>result</em> be the resulting matrix initialized to the values of the current matrix.</li>
<li>Perform a <a class=idl-code data-link-type=method href=#dom-dommatrix-rotateaxisangleself title=rotateAxisAngleSelf()>rotateAxisAngleSelf()</a> transformation on <em>result</em> with the arguments <var>x</var>, <var>y</var>, <var>z</var>, <var>angle</var>.</li>
<li>Return <em>result</em>.</li>
</ol>
<p>The current matrix is not modified.</p>
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-skewx title=skewX()>skewX(<var>sx</var>)<a class=self-link href=#dom-dommatrixreadonly-skewx></a></dfn></dt>
<dd>
<ol>
<li>Let <em>result</em> be the resulting matrix initialized to the values of the current matrix.</li>
<li>Perform a <a class=idl-code data-link-type=method href=#dom-dommatrix-skewxself title=skewXSelf()>skewXSelf()</a> transformation on <em>result</em> with the argument <var>sx</var>.</li>
<li>Return <em>result</em>.</li>
</ol>
<p>The current matrix is not modified.</p>
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-skewy title=skewY()>skewY(<var>sy</var>)<a class=self-link href=#dom-dommatrixreadonly-skewy></a></dfn></dt>
<dd>
<ol>
<li>Let <em>result</em> be the resulting matrix initialized to the values of the current matrix.</li>
<li>Perform a <a class=idl-code data-link-type=method href=#dom-dommatrix-skewyself title=skewYSelf()>skewYSelf()</a> transformation on <em>result</em> with the argument <var>sy</var>.</li>
<li>Return <em>result</em>.</li>
</ol>
<p>The current matrix is not modified.</p>
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-multiply title=multiply()>multiply(<var>other</var>)<a class=self-link href=#dom-dommatrixreadonly-multiply></a></dfn></dt>
<dd>
<ol>
<li>Let <em>result</em> be the resulting matrix initialized to the values of the current matrix.</li>
<li>Perform a <a class=idl-code data-link-type=method href=#dom-dommatrixreadonly-multiply title=multiply()>multiply()</a> transformation on <em>result</em> with the argument <var>other</var>.</li>
<li>Return <em>result</em>.</li>
</ol>
<p>The current matrix is not modified.</p>
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-flipx>flipX()<a class=self-link href=#dom-dommatrixreadonly-flipx></a></dfn></dt>
<dd>
<ol>
<li>Let <em>result</em> be the resulting matrix initialized to the values of the current matrix.</li>
<li>Post-multiply <em>result</em> with <code>DOMMatrix(-1, 0, 0, 1, 0, 0)</code>.</li>
<li>Return <em>result</em>.</li>
</ol>
<p>The current matrix is not modified.</p>
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-flipy>flipY()<a class=self-link href=#dom-dommatrixreadonly-flipy></a></dfn></dt>
<dd>
<ol>
<li>Let <em>result</em> be the resulting matrix initialized to the values of the current matrix.</li>
<li>Post-multiply <em>result</em> with <code>DOMMatrix(1, 0, 0, -1, 0, 0)</code>.</li>
<li>Return <em>result</em>.</li>
</ol>
<p>The current matrix is not modified.</p>
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-inverse>inverse()<a class=self-link href=#dom-dommatrixreadonly-inverse></a></dfn></dt>
<dd>
<ol>
<li>Let <em>result</em> be the resulting matrix initialized to the values of the current matrix.</li>
<li>Perform a <a class=idl-code data-link-type=method href=#dom-dommatrix-invertself title=invertSelf()>invertSelf()</a> transformation on <em>result</em>.</li>
<li>Return <em>result</em>.</li>
</ol>
<p>The current matrix is not modified.</p>
</dd>
</dl>
<p>The following methods do not modify the current matrix.</p>
<dl data-dfn-for=DOMMatrixReadOnly data-dfn-type=method>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-transformpoint title=transformPoint()>transformPoint(<var>point</var>)<a class=self-link href=#dom-dommatrixreadonly-transformpoint></a></dfn></dt>
<dd>
The point argument is post-multiplied to the current matrix and returns the resulting point. The passed argument does not get modified.
<p class=note>Note: Even if <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-is2d title=is2D>is2D</a> of the current matrix may return <span class=css>true</span>, a 4x4 matrix multiplication must be performed if the <a class=idl-code data-link-type=attribute href=#dom-dompointreadonly-dompoint-z title=z>z</a> attribute of <var>point</var> is not <span class=css>0</span> or the <a class=idl-code data-link-type=attribute href=#dom-dompointreadonly-dompoint-w title=w>w</a> attribute of <var>point</var> is not <span class=css>1</span>.</p>
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-tofloat32array>toFloat32Array()<a class=self-link href=#dom-dommatrixreadonly-tofloat32array></a></dfn></dt>
<dd>
Returns the serialized 16 elements <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m11 title=m11>m11</a> to <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m44 title=m44>m44</a> of the current matrix in column-major order as <a class=idl-code data-link-type=interface href=https://html.spec.whatwg.org/#float32array title=Float32Array>Float32Array</a> <a data-biblio-type=informative data-link-type=biblio href=#biblio-typedarray title=typedarray>[typedarray]</a>.
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-tofloat64array>toFloat64Array()<a class=self-link href=#dom-dommatrixreadonly-tofloat64array></a></dfn></dt>
<dd>
Returns the serialized 16 elements <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m11 title=m11>m11</a> to <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m44 title=m44>m44</a> of the current matrix in column-major order as <a class=idl-code data-link-type=interface href=https://html.spec.whatwg.org/#float64array title=Float64Array>Float64Array</a> <a data-biblio-type=informative data-link-type=biblio href=#biblio-typedarray title=typedarray>[typedarray]</a>.
</dd>
<dt><dfn class=idl-code data-dfn-for=DOMMatrixReadOnly data-dfn-type=method data-export="" id=dom-dommatrixreadonly-stringifier>stringifier()<a class=self-link href=#dom-dommatrixreadonly-stringifier></a></dfn></dt>
<dd>
<dl class=switch>
<dt>If <a data-link-type=dfn href=#is2d title=is2D>is2D</a> is <span class=css>true</span></dt>
<dd>
Return a DOMString in the form of a CSS Transforms <a class="production css" data-link-type=function href=http://www.w3.org/TR/css-transforms-1/#funcdef-matrix title=matrix()><matrix()></a> function where <var>a</var> is <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-a title=a>a</a> attribute, <var>b</var> is <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-b title=b>b</a> attribute, <var>c</var> is <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-c title=c>c</a> attribute, <var>d</var> is <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-d title=d>d</a> attribute, <var>e</var> is <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-e title=e>e</a> attribute, <var>f</var> is <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-f title=f>f</a> attribute, <a data-biblio-type=normative data-link-type=biblio href=#biblio-css3-transforms title=CSS3-TRANSFORMS>[CSS3-TRANSFORMS]</a>.
</dd>
<dt>Otherwise</dt>
<dd>
Return a DOMString in the form of a CSS Transforms <a class="production css" data-link-type=function href=http://www.w3.org/TR/css-transforms-1/#funcdef-matrix3d title=matrix3d()><matrix3d()></a> function where <var>m11</var> to <var>m44</var> are set to <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m11 title=m11>m11</a> to <a class=idl-code data-link-type=attribute href=#dom-dommatrixreadonly-dommatrix-m44 title=m44>m44</a> attributes <a data-biblio-type=normative data-link-type=biblio href=#biblio-css3-transforms title=CSS3-TRANSFORMS>[CSS3-TRANSFORMS]</a>.
</dd>
</dl>
<div class=example>
<p>In this example, a matrix is created and several 2D transformation methods are called:</p>
<pre><code>var matrix = new DOMMatrix();
matrix.scaleSelf(2);
matrix.translateSelf(20,20);</code></pre>
<p>Calling <code>matrix.toString()</code> returns the DOMString:</p>
<pre><code>"matrix(2, 0, 0, 2, 20, 20)"</code></pre>
<p>In the following example, a matrix is created and several 3D transformation methods are called:</p>
<pre><code>var matrix = new DOMMatrix();
matrix.scale3dSelf(2);</code></pre>
<p>For 3D operations, the <var>stringifier</var> returns a DOMString representing a 3D matrix.</p>
<p>Calling <code>matrix.toString()</code> after the snippet above returns the DOMString:</p>
<pre><code>"matrix3d(2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1)"</code></pre>
</div>
</dd>
</dl>
<h3 class="heading settled" data-level=6.5 id=mutable-transformation-methods><span class=secno>6.5. </span><span class=content>Mutable transformation methods</span><a class=self-link href=#mutable-transformation-methods></a></h3>
<p>The following methods modify the current matrix, so that each method returns the matrix where it was invoked on. The primary benefit of this is allowing content creators to chain method calls.</p>
<div class=example>
<p>The following code example:</p>
<pre><code>var matrix = new DOMMatrix();
matrix.translateSelf(20, 20);
matrix.scaleSelf(2);
matrix.translateSelf(-20, -20);
</code></pre>
<p>is equivalent to:</p>
<pre><code>var matrix = new DOMMatrix();
matrix.translateSelf(20, 20).scaleSelf(2).translateSelf(-20, -20);
</code></pre>
</div>
<p class=note>Note: Authors who use chained method calls are recommended to use mutable transformation methods to avoid unnecessary memory allocations due to creation of intermediate DOMMatrix objects in User Agents.</p>