Search completed in 1.48 seconds.
5 results for "dommatrixinit":
CanvasRenderingContext2D.setTransform() - Web APIs
Web › API › CanvasRenderingContext2D › setTransform
to set: a (m11) Horizontal scaling. A value of 1 results in no scaling. b (m12) Vertical skewing. c (m21) Horizontal skewing. d (m22) Vertical scaling. A value of 1 results in no scaling. e (dx) Horizontal translation (moving). f (dy) Vertical translation (moving). The newer type consists of a single parameter, matrix, representing a 2D transformation matrix to set (technically, a DOMMatrixInit object; any object will do as long as it contains the above components as properties). Examples Skewing a shape This example skews a rectangle both vertically (.2) and horizontally (.8). Scaling and translation remain unchanged. HTML <canvas id="canvas"></canvas> JavaScript const canvas = document.getElementById('canvas'); const ctx = canvas.getContext('2d'); ctx.setTransform(1, .2, .8, ...
DOMMatrix - Web APIs
Web › API › DOMMatrix
a TypeError exception is thrown. fromFloat64Array() Creates a new mutable DOMMatrix object given an array of double-precision (64-bit) floating-point values. If the array has six values, the result is a 2D matrix; if the array has 16 values, the result is a 3D matrix. Otherwise, a TypeError exception is thrown. fromMatrix() Creates a new mutable DOMMatrix object given an existing matrix or a DOMMatrixInit dictionary which provides the values for its properties. Usage notes The matrix defined by the DOMMatrix interface is comprised of four rows of four columns each. While it's beyond the scope of this article to explain the mathematics involved, this 4x4 size is enough to describe any transformation you might apply to either 2D or 3D geometries. [m11m21m31m41m12m22m32m42m13m23m33m43m14m24m34m...
DOMMatrixReadOnly - Web APIs
Web › API › DOMMatrixReadOnly
a TypeError exception is thrown. fromFloat64Array() Creates a new mutable DOMMatrix object given an array of double-precision (64-bit) floating-point values. If the array has six values, the result is a 2D matrix; if the array has 16 values, the result is a 3D matrix. Otherwise, a TypeError exception is thrown. fromMatrix() Creates a new mutable DOMMatrix object given an existing matrix or a DOMMatrixInit dictionary which provides the values for its properties. If no matrix is specified, the matrix is initialized with every element set to 0 except the bottom-right corner and the element immediately above and to its left: m33 and m34. These have the default value of 1. Specifications Specification Status Comment Geometry Interfaces Module Level 1The definition of 'DOM...
DOMPointReadOnly - Web APIs
Web › API › DOMPointReadOnly
l coordinate, y. DOMPointReadOnly.z Read only The point's depth coordinate, z. DOMPointReadOnly.w Read only The point's perspective value, w. Static methods DOMPointReadOnly.fromPoint() A static method that creates a new DOMPointReadOnly object given the coordinates provided in the specified DOMPointInit object. Methods matrixTransform() Applies a matrix transform specified as a DOMMatrixInit object to the DOMPointReadOnly object. toJSON() Returns a JSON representation of the DOMPointReadOnly object. Specifications Specification Status Comment Geometry Interfaces Module Level 1The definition of 'DOMPoint' in that specification. Candidate Recommendation Latest spec version is an ED. ...
Path2D.addPath() - Web APIs
Web › API › Path2D › addPath
Examples Adding a path to an existing path This example adds one path to another. ...