OffsetPoint class
Extended Offset point with timestamp and optional pressure.
Properties
-
direction
→ double
-
The angle of this offset as radians clockwise from the positive x-axis, in
the range -pi to pi, assuming positive values of the x-axis go to the
right and positive values of the y-axis go down.
no setterinherited
-
distance
→ double
-
The magnitude of the offset.
no setterinherited
-
distanceSquared
→ double
-
The square of the magnitude of the offset.
no setterinherited
-
dx
→ double
-
The x component of the offset.
no setterinherited
-
dy
→ double
-
The y component of the offset.
no setterinherited
-
hashCode
→ int
-
The hash code for this object.
no setteroverride
-
isFinite
→ bool
-
Whether both components are finite (neither infinite nor NaN).
no setterinherited
-
isInfinite
→ bool
-
Returns true if either component is double.infinity, and false if both
are finite (or negative infinity, or NaN).
no setterinherited
-
pressure
→ double?
-
The pressure value at this point, if available.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
timestamp
→ int
-
Timestamp of this point. Used to determine velocity to other points.
final
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
scale(double scaleX, double scaleY)
→ OffsetPoint
-
Returns a new offset with the x component scaled by
scaleX
and the y
component scaled by scaleY
.
override
-
toMap()
→ Map<String, dynamic>
-
Converts this OffsetPoint to a map of data, typically used for serialization.
-
toString()
→ String
-
A string representation of this object.
inherited
-
translate(double translateX, double translateY)
→ OffsetPoint
-
Returns a new offset with translateX added to the x component and
translateY added to the y component.
override
-
velocityFrom(OffsetPoint other)
→ double
-
Calculates the velocity between this point and a
other
(previous) point.
Returns 0.0 if timestamps are the same to avoid division by zero.
Operators
-
operator %(double operand)
→ Offset
-
Modulo (remainder) operator.
inherited
-
operator &(Size other)
→ Rect
-
Rectangle constructor operator.
inherited
-
operator *(double operand)
→ Offset
-
Multiplication operator.
inherited
-
operator +(Offset other)
→ Offset
-
Binary addition operator.
inherited
-
operator -(Offset other)
→ Offset
-
Binary subtraction operator.
inherited
-
operator /(double operand)
→ Offset
-
Division operator.
inherited
-
operator <(OffsetBase other)
→ bool
-
Less-than operator. Compares an Offset or Size to another Offset or
Size, and returns true if both the horizontal and vertical values of the
left-hand-side operand are smaller than the horizontal and vertical values
of the right-hand-side operand respectively. Returns false otherwise.
inherited
-
operator <=(OffsetBase other)
→ bool
-
Less-than-or-equal-to operator. Compares an Offset or Size to another
Offset or Size, and returns true if both the horizontal and vertical
values of the left-hand-side operand are smaller than or equal to the
horizontal and vertical values of the right-hand-side operand
respectively. Returns false otherwise.
inherited
-
operator ==(Object other)
→ bool
-
Compares two Offsets for equality.
override
-
operator >(OffsetBase other)
→ bool
-
Greater-than operator. Compares an Offset or Size to another Offset
or Size, and returns true if both the horizontal and vertical values of
the left-hand-side operand are bigger than the horizontal and vertical
values of the right-hand-side operand respectively. Returns false
otherwise.
inherited
-
operator >=(OffsetBase other)
→ bool
-
Greater-than-or-equal-to operator. Compares an Offset or Size to
another Offset or Size, and returns true if both the horizontal and
vertical values of the left-hand-side operand are bigger than or equal to
the horizontal and vertical values of the right-hand-side operand
respectively. Returns false otherwise.
inherited
-
operator unary-()
→ Offset
-
Unary negation operator.
inherited
-
operator ~/(double operand)
→ Offset
-
Integer (truncating) division operator.
inherited