TweakableShape(float[][] vertex)
The constructor with the given vertex data.

TweakableShape(float[][] vertex,
float[][] tangent)
The constructor with the given vertex and tangent data.

TweakableShape(float[][] vertex,
float[][] tangent,
Path.Strategy pathstrategy)
The constructor with the given vertex and tangent data
and the given path strategy.

TweakableShape(float[][] vertex,
float[][] tangent,
Path.Strategy pathstrategy,
ClosureMode closuremode)
The constructor with the given vertex and tangent data,
the given path strategy,
and the given closure mode.

TweakableShape(float[][] vertex,
float[][] tangent,
Path.Strategy pathstrategy,
ClosureMode closuremode,
WindingRule windingrule)
The constructor with the given vertex and tangent data,
the given path strategy,
the given closure mode,
and the given winding rule.

Method Summary

void

addVertexTangent(int index,
float[] array)
Adds a new vertex and tangent at the given index with
the given array of point and displacement coordinates
and makes a new path.

void

addVertexTangent(int index,
float[] point,
float[] delta)
Adds a new vertex and tangent at the given index using
the given point and delta arrays and makes a new path.

void

addVertexTangent(int index,
float x,
float y,
float dx,
float dy)
Adds a new vertex and tangent at the given index with the
given point and displacement coordinates x, y, dx, dy.

void

addVerticesTangents(int index,
float[][] array)
Adds a new sequence of vertices and tangents at the
given index extracting data from the given array of
type float[K][4] and then makes a new path.

void

addVerticesTangents(int index,
float[][] points,
float[][] deltas)
Adds a new sequence of vertices and tangents at the
given index using copies of the given points and deltas
and then makes a new path.

void

appendVertexTangent(float[] array)
Appends a new vertex and tangent with
the given array of point and displacement coordinates
and makes a new path.

void

appendVertexTangent(float[] point,
float[] delta)
Appends a new vertex and tangent using
the given point and delta arrays and makes a new path.

void

appendVertexTangent(float x,
float y,
float dx,
float dy)
Appends a new vertex and tangent with the
given point and displacement coordinates x, y, dx, dy.

void

appendVerticesTangents(float[][] array)
Appends a new sequence of vertices and tangents
extracting data from the given array of
type float[K][4] and then makes a new path.

void

appendVerticesTangents(float[][] points,
float[][] deltas)
Appends a new sequence of vertices and tangents
using copies of the given points and deltas
and then makes a new path.

float[][]

removeAllVerticesTangents()
Removes all vertices and tangents, makes a new path,
and returns an array float[N][4] with the
vertices and tangents that were removed.

float[]

removeVertexTangent(int index)
Removes the vertex/tangent at the given index, makes
a new path, and returns an array with the data from the
removed vertex/tangent as x, y, dx, dy.

float[][]

removeVerticesTangents(int m,
int n)
Removes the vertices and tangents starting at the given
index m inclusive and ending at the given index n exclusive,
makes a new path, and returns an array float[K][4]
with the vertices and tangents that were removed.

void

setTangent(int index,
float[] delta)
Sets the tangent at the given index to the given
displacement and makes a new path.

void

setTangent(int index,
float dx,
float dy)
Sets the tangent at the given index to the given
displacement coordinates and makes a new path.

void

setTangentData(float[][] tangent)
Sets the tangent data of the shape using a 2-dimensional array
of single precision numbers and makes a new path.

void

setTangentViaControlA(int index,
float[] control)
Sets the tangent at the given index to using the given
ahead control point and makes a new path.

void

setTangentViaControlA(int index,
float x,
float y)
Sets the tangent at the given index using the given
coordinates for the ahead control point and makes a new path.

void

setTangentViaControlB(int index,
float[] control)
Sets the tangent at the given index to using the given
behind control point and makes a new path.

void

setTangentViaControlB(int index,
float x,
float y)
Sets the tangent at the given index using the given
coordinates for the behind control point and makes a new path.

void

setVertex(int index,
float[] point)
Sets the vertex at the given index to the given point
and makes a new path.

void

setVertex(int index,
float x,
float y)
Sets the vertex at the given index to the given point coordinates
and makes a new path.

void

setVertexData(float[][] vertex)
Sets the vertex data of the shape using a 2-dimensional array
of single precision numbers and makes a new path.

void

setVertexTangent(int index,
float[] array)
Sets the vertex and tangent at the given index to the
given array of point and displacement coordinates and
makes a new path.

void

setVertexTangent(int index,
float[] point,
float[] delta)
Sets the vertex and tangent at the given index using the
given point and delta arrays and makes a new path.

void

setVertexTangent(int index,
float x,
float y,
float dx,
float dy)
Sets the vertex and tangent at the given index to the
given point and displacement coordinates and makes a new
path.

void

setVertexTangentData(float[][] vertex_tangent)
Sets the vertex and tangent data of the shape using a
2-dimensional array of single precision numbers and makes
a new path.

void

setVertexTangentData(float[][] vertex,
float[][] tangent)
Sets the vertex and tangent data of the shape using a pair
of 2-dimensional arrays of single precision numbers and makes
a new path.

appendVerticesTangents

Appends a new sequence of vertices and tangents
using copies of the given points and deltas
and then makes a new path.

Does nothing if the given arrays are null
or do not have the form float[K][2] for the
same K.

Fires property change: ADD_VERTEX_TANGENT.

Parameters:

points - the new vertices to append

deltas - the new tangents to append

appendVerticesTangents

public final void appendVerticesTangents(float[][] array)

Appends a new sequence of vertices and tangents
extracting data from the given array of
type float[K][4] and then makes a new path.

Conceptually, the each row of the array should
contain 4 items (x, y, dx, dy).

Does nothing if the given array is null
or does not have the form float[K][4].

Fires property change: ADD_VERTEX_TANGENT.

Parameters:

array - the new vertices and tangents to append

removeVertexTangent

public final float[] removeVertexTangent(int index)

Removes the vertex/tangent at the given index, makes
a new path, and returns an array with the data from the
removed vertex/tangent as x, y, dx, dy.

If the index is not in [0, vertex.length) then removes
nothing and returns null.

Fires property change: REMOVE_VERTEX_TANGENT.

Parameters:

index - the vertex index

removeVerticesTangents

public final float[][] removeVerticesTangents(int m,
int n)

Removes the vertices and tangents starting at the given
index m inclusive and ending at the given index n exclusive,
makes a new path, and returns an array float[K][4]
with the vertices and tangents that were removed.

Conceptually, the each row of the array returned should
contain 4 items (x, y, dx, dy).

Forces m and n into range if needed.

Returns an array of length 0 if no nodes are removed.

Fires property change: REMOVE_VERTEX_TANGENT.

Parameters:

m - the starting index inclusive

n - the ending index exclusive

removeAllVerticesTangents

public final float[][] removeAllVerticesTangents()

Removes all vertices and tangents, makes a new path,
and returns an array float[N][4] with the
vertices and tangents that were removed.

Conceptually, the each row of the array returned should
contain 4 items (x, y, dx, dy).