Required to generate proper CSS classes and other class related IDs.
The UID of this drawable object.
Get the angle between this and the passed line (in radians).
(optional) The line to calculate the angle to. If null the baseline (x-axis) will be used.
Create a deep clone of this instance.
A type safe clone if this instance.
This function should invalidate any installed listeners and invalidate this object. After calling this function the object might not hold valid data any more and should not be used.
Get the closest position T from this line to the specified point.
The counterpart for this function is Line.vertAt(Number).
The point (vertex) to measure the distance to.
The line position t of minimal distance to p.
Check if the given point is located on this line. Optionally also check if
that point is located between point
The point to check.
If set to to true (default=false) the point must be between start and end point of the line.
True if the given point is on this line.
This function computes the inverse of the vector, which means 'a' stays untouched.
this for chaining.
The inverse of a vector is a vector witht the same magnitude but oppose direction.
Please not that the origin of this vector changes here: a->b becomes b->a.
Get the length of this line.
Get the perpendicular of this vector which is located at a.
A new vector being the perpendicular of this vector sitting on a.
The the minimal distance between this line and the specified point.
The point (vertex) to measre the distance to.
The absolute minimal distance.
Create a string representation of this line.
The string representing this line.
Get line point at position t in [0 ... 1]:
The position scalar.
The vertex a position t.
Generate a four-point arrow head, starting at the vector end minus the arrow head length.
The first vertex in the returned array is guaranteed to be the located at the vector line end minus the arrow head length.
Due to performance all params are required.
The params scaleX and scaleY are required for the case that the scaling is not uniform (x and y scaling different). Arrow heads should not look distored on non-uniform scaling.
If unsure use 1.0 for scaleX and scaleY (=no distortion). For headlen use 8, it's a good arrow head size.
Example: buildArrowHead( new Vertex(0,0), new Vertex(50,100), 8, 1.0, 1.0 )
The start vertex of the vector to calculate the arrow head for.
The end vertex of the vector.
The length of the arrow head (along the vector direction. A good value is 12).
The horizontal scaling during draw.
the vertical scaling during draw.
Generated using TypeDoc