if (path == null) {
path = new ExtendedGeneralPath();
if (values == null || values.length == 0) {
if (from != null) {
AnimatableMotionPointValue fromPt = (AnimatableMotionPointValue) from;
float x = fromPt.getX();
float y = fromPt.getY();
path.moveTo(x, y);
if (to != null) {
AnimatableMotionPointValue toPt = (AnimatableMotionPointValue) to;
path.lineTo(toPt.getX(), toPt.getY());
} else if (by != null) {
AnimatableMotionPointValue byPt = (AnimatableMotionPointValue) by;
path.lineTo(x + byPt.getX(), y + byPt.getY());
} else {
throw timedElement.createException
("values.to.by.path.missing",
new Object[] { null });
}
} else {
if (to != null) {
AnimatableMotionPointValue unPt = (AnimatableMotionPointValue)
animatableElement.getUnderlyingValue();
AnimatableMotionPointValue toPt = (AnimatableMotionPointValue) to;
path.moveTo(unPt.getX(), unPt.getY());
path.lineTo(toPt.getX(), toPt.getY());
this.cumulative = false;
} else if (by != null) {
AnimatableMotionPointValue byPt = (AnimatableMotionPointValue) by;
path.moveTo(0, 0);
path.lineTo(byPt.getX(), byPt.getY());
this.additive = true;
} else {
throw timedElement.createException
("values.to.by.path.missing",
new Object[] { null });
}
}
} else {
AnimatableMotionPointValue pt = (AnimatableMotionPointValue) values[0];
path.moveTo(pt.getX(), pt.getY());
for (int i = 1; i < values.length; i++) {
pt = (AnimatableMotionPointValue) values[i];
path.lineTo(pt.getX(), pt.getY());
}
}
}
this.path = path;
pathLength = new PathLength(path);