DOMPointReadOnly class
The interface specifies the coordinate and perspective fields used by DOMPoint to define a 2D or 3D point in a coordinate system. Note: This feature is available in Web Workers
There are two ways to create a new instance. First, you can use its constructor, passing in the values of the parameters for each dimension and, optionally, the perspective: [/* 2D */ const point = new DOMPointReadOnly(50, 50);
/* 3D */ const point = new DOMPointReadOnly(50, 50, 25);
/* 3D with perspective */
const point = new DOMPointReadOnly(100, 100, 100, 1.0);
]
The other option is to use the static
DOMPointReadOnly.fromPoint() method:
const point = DOMPointReadOnly.fromPoint({x: 100, y: 100, z:
50; w: 1.0});
- Implementers
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- DOMPointReadOnly([dynamic x = 0, dynamic y = 0, dynamic z = 0, dynamic w = 1])
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- w → dynamic
-
Available on DOMPointReadOnly, provided by the PropsDOMPointReadOnly extension
no setter - x → dynamic
-
Available on DOMPointReadOnly, provided by the PropsDOMPointReadOnly extension
no setter - y → dynamic
-
Available on DOMPointReadOnly, provided by the PropsDOMPointReadOnly extension
no setter - z → dynamic
-
Available on DOMPointReadOnly, provided by the PropsDOMPointReadOnly extension
no setter
Methods
-
matrixTransform(
[DOMMatrixInit? matrix]) → DOMPoint -
Available on DOMPointReadOnly, provided by the PropsDOMPointReadOnly extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJSON(
) → dynamic -
Available on DOMPointReadOnly, provided by the PropsDOMPointReadOnly extension
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromPoint(
[DOMPointInit? other]) → dynamic