@Override public void evalParametric(AnimationTimeEval state, double curTime) { evalParametric(state, curTime, repeatCount, repeatDur == null ? Double.NaN : repeatDur.evalTime()); }
public void setCoords(double sx, double sy, double[] coords, int numCoords) { coord = new double[numCoords * 2 + 2]; coord[0] = sx; coord[1] = sy; for (int i = 0; i < numCoords; i++) { coord[i * 2 + 2] = coords[i * 2]; coord[i * 2 + 3] = coords[i * 2 + 1]; } calcLength(); }
public void setParentElement(AnimationElement ele) { t1.setParentElement(ele); t2.setParentElement(ele); } }
/** * Creates a track that would be valid for the name and type of element * passed in. Does not actually add this elemnt to the track. */ public TrackBase(SVGElement parent, AnimationElement ele) throws SVGElementException { this(parent, ele.getAttribName(), ele.getAttribType()); }
private void calcLength() { length = 0; for (int i = 2; i < coord.length; i += 2) { length += lineLength(coord[i - 2], coord[i - 1], coord[i], coord[i + 1]); } }
public TrackMotion(AnimationElement ele) throws SVGElementException { //The motion element implies a CSS attribute of transform // super(ele.getParent(), "transform", AnimationElement.AT_CSS); super(ele.getParent(), ele); }
@Override public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent) throws SAXException { super.loaderStartElement(helper, attrs, parent); }
@Override public void evalParametric(AnimationTimeEval state, double curTime) { evalParametric(state, curTime, repeatCount, repeatDur == null ? Double.NaN : repeatDur.evalTime()); }
/** * Creates a track that would be valid for the name and type of element * passed in. Does not actually add this elemnt to the track. */ public TrackBase(SVGElement parent, AnimationElement ele) throws SVGElementException { this(parent, ele.getAttribName(), ele.getAttribType()); }
/** * Evaluates the ending time of this element. Returns 0 if not specified. * * @see hasEndTime */ double evalEndTime() { return endTime == null ? Double.NaN : endTime.evalTime(); }
public void setCoords(double sx, double sy, double[] coords, int numCoords) { coord = new double[numCoords * 2 + 2]; coord[0] = sx; coord[1] = sy; for (int i = 0; i < numCoords; i++) { coord[i * 2 + 2] = coords[i * 2]; coord[i * 2 + 3] = coords[i * 2 + 1]; } calcLength(); }
@Override public void setParentElement(AnimationElement ele) { this.parent = ele; for (TimeBase timeEle : componentTimes) { timeEle.setParentElement(ele); } } }
private void calcLength() { length = 0; for (int i = 2; i < coord.length; i += 2) { length += lineLength(coord[i - 2], coord[i - 1], coord[i], coord[i + 1]); } }
public void evalParametric(AnimationTimeEval state, double curTime) { evalParametric(state, curTime, repeatCount, repeatDur == null ? Double.NaN : repeatDur.evalTime()); }
/** * Evaluates the ending time of this element. Returns 0 if not specified. * * @see hasEndTime */ double evalEndTime() { return endTime == null ? Double.NaN : endTime.evalTime(); }
public void setCoords(double sx, double sy, double[] coords, int numCoords) { coord = new double[numCoords * 2 + 2]; coord[0] = sx; coord[1] = sy; for (int i = 0; i < numCoords; i++) { coord[i * 2 + 2] = coords[i * 2]; coord[i * 2 + 3] = coords[i * 2 + 1]; } calcLength(); }
public void evalParametric(AnimationTimeEval state, double curTime) { evalParametric(state, curTime, repeatCount, repeatDur == null ? Double.NaN : repeatDur.evalTime()); }
@Override public double evalTime() { double agg = 0.0; for (TimeBase timeEle : componentTimes) { double time = timeEle.evalTime(); agg += time; } return agg; }
/** * Evaluates the ending time of this element. Returns 0 if not specified. * * @see hasEndTime */ double evalEndTime() { return endTime == null ? Double.NaN : endTime.evalTime(); }