Point class

Inheritance
Annotations

Constructors

Point(double x, double y, [double? pressure])
const

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
Returns a hash of the x and y values. This matches the hashcode of an Offset with those same values.
no setterinherited
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
p double
Deprecated non-nullable pressure value.
no setterinherited
pressure double?
The pressure of the point, between 0 and 1, or null if the pressure is unknown.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
x double
Identical to dx
finalinherited
y double
Identical to dy
finalinherited

Methods

copyWith({double? x, double? y, double? pressure}) PointVector
inherited
distanceSquaredTo(PointVector point) double
inherited
distanceTo(PointVector point) double
inherited
dpr(PointVector other) double
Dot product
inherited
lerp(double t, PointVector other) PointVector
Linearly interpolate between two offsets.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
perpendicular() PointVector
Perpendicular rotation of the vector
inherited
project(PointVector direction, double distance) PointVector
Project this point in the direction of direction by a scalar distance.
inherited
rotAround(PointVector center, double r) PointVector
Rotate a vector around another vector by r radians
inherited
scale(double scaleX, double scaleY) Offset
Returns a new offset with the x component scaled by scaleX and the y component scaled by scaleY.
inherited
toString() String
A string representation of this object.
inherited
translate(double translateX, double translateY) Offset
Returns a new offset with translateX added to the x component and translateY added to the y component.
inherited
unit() PointVector
Get the normalized / unit vector.
inherited
unitVectorTo(PointVector other) PointVector
inherited

Operators

operator %(double operand) Offset
Modulo (remainder) operator.
inherited
operator &(Size other) Rect
Rectangle constructor operator.
inherited
operator *(double operand) PointVector
Multiplication operator.
inherited
operator +(Offset other) PointVector
Binary addition operator.
inherited
operator -(Offset other) PointVector
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 this PointVector to an Offset or PointVector other for equality.
inherited
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-() PointVector
Negates the vector.
inherited
operator ~/(double operand) Offset
Integer (truncating) division operator.
inherited