Class: oVertex

$. oVertex

The $.oVertex class represents a single control point on a stroke. This class is used to get the index of the point in the stroke path sequence, as well as its position as a float along the stroke's length. The onCurve property describes wether this control point is a bezier handle or a point on the curve.

new $.oVertex(stroke, x, y, onCurve, index)

openHarmony/openHarmony_drawing.js, line 1938
The constructor for the $.oVertex class
Name Type Description
stroke $.oStroke the stroke that this vertex belongs to
x float the x coordinate of the vertex, in drawing space
y float the y coordinate of the vertex, in drawing space
onCurve bool whether the point is a bezier handle or situated on the curve
index int the index of the point on the stroke
Properties:
Name Type Description
stroke $.oStroke the stroke that this vertex belongs to
x float the x coordinate of the vertex, in drawing space
y float the y coordinate of the vertex, in drawing space
onCurve bool whether the point is a bezier handle or situated on the curve
index int the index of the point on the stroke

Members

readonlyangleLeftfloat

The angle of the line or bezier handle on the left of this vertex, compared to the x axis, counterclockwise. (In degrees, or null if the stroke is open ended on the left.)

readonlyangleRightfloat

The angle of the curve going through this vertex, compared to the x axis, counterclockwise. (In degrees, or null if the stroke is open ended on the right.)

readonlypositionoPoint

The position of the point on the drawing, as an oPoint

readonlystrokePositionfloat

The position of the point on the curve, from 0 to the maximum number of points