|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdata.Shape
This class represents a shape, that consists of some amount of
Curves. It has a name, a position in its group, and a multiplier that
defines the relative size of its own coordinate system. Its own coordinate system
is like a normal math one, allowing negative values and having the positive side
of the axes up and to the right. The position of the shape identifies the origin
of its coordinate system. The multiplier "zooms in" on the curves, changing it
will make them appear larger or smaller. For example you could set it to 10, which
means that 10 pixels is 1 unit of the Shape coordinate system. This
way small Bezier curves with calculated coordinates that are inbetween integer
values (they are doubles) can be shown correctly on screens (cause they use
pixels).
| Field Summary | |
protected ArrayList |
curvelist
The List of Curves in this Shape. |
protected double |
multiplier
The multiplier for this Shape's coordinate system. |
protected String |
name
The name of this Shape. |
protected int |
x
The horizontal position of this Shape in Group
coordinates. |
protected int |
y
The vertical position of this Shape in Group
coordinates. |
| Constructor Summary | |
Shape(String name,
int x,
int y,
double multiplier)
Constructs a Shape with the given attributes. |
|
| Method Summary | |
void |
addCurve(Curve curve)
Adds the given Curve to this Shape. |
Curve |
getCurve(int index)
Returns the Curve at index. |
double |
getMultiplier()
Returns the multiplier of this Shape. |
String |
getName()
Returns the name of this Shape. |
int |
getNumberOfCurves()
Returns the number of Curves in this Shape. |
int |
getX()
Returns the horizontal position of this Shape. |
int |
getY()
Returns the vertical position of this Shape. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected String name
Shape.
protected int x
Shape in Group
coordinates.
protected int y
Shape in Group
coordinates.
protected double multiplier
Shape's coordinate system.
protected ArrayList curvelist
List of Curves in this Shape.
| Constructor Detail |
public Shape(String name,
int x,
int y,
double multiplier)
Shape with the given attributes.
name - The name of the to be constructed Shape.x - The horizontal position of this Shape.y - The vertical position of this Shape.multiplier - The multiplier for this Shape's coordinate
system.| Method Detail |
public String getName()
Shape.
Shape.public int getX()
Shape.
Shape.public int getY()
Shape.
Shape.public double getMultiplier()
Shape.
Shape.public Curve getCurve(int index)
Curve at index.
index - The index the Curve is at.
Curve at index.public void addCurve(Curve curve)
Curve to this Shape.
curve - The Curve to be added. May not be null.public int getNumberOfCurves()
Curves in this Shape.
Curves in this Shape.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||