/** * Returns a zero value of this AnimatableValue's type. */ public AnimatableValue getZeroValue() { return new AnimatableMotionPointValue(target, 0f, 0f, 0f); }
/** * Returns a string representation of this object. */ public String toStringRep() { StringBuffer sb = new StringBuffer(); sb.append(formatNumber(x)); sb.append(','); sb.append(formatNumber(y)); sb.append(','); sb.append(formatNumber(angle)); sb.append("rad"); return sb.toString(); } }
/** * Updates a 'other' animation value in this target. */ public void updateOtherValue(String type, AnimatableValue val) { if (type.equals("motion")) { if (motionTransform == null) { motionTransform = new AffineTransform(); } if (val == null) { motionTransform.setToIdentity(); } else { AnimatableMotionPointValue p = (AnimatableMotionPointValue) val; motionTransform.setToTranslation(p.getX(), p.getY()); motionTransform.rotate(p.getAngle()); } SVGOMDocument d = (SVGOMDocument) ownerDocument; d.getAnimatedAttributeListener().otherAnimationChanged(this, type); } else { super.updateOtherValue(type, val); } } }
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 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 { path.moveTo(pt.getX(), pt.getY()); for (int i = 1; i < values.length; i++) { pt = (AnimatableMotionPointValue) values[i];
/** * Updates a 'other' animation value in this target. */ public void updateOtherValue(String type, AnimatableValue val) { if (type.equals("motion")) { if (motionTransform == null) { motionTransform = new AffineTransform(); } if (val == null) { motionTransform.setToIdentity(); } else { AnimatableMotionPointValue p = (AnimatableMotionPointValue) val; motionTransform.setToTranslation(p.getX(), p.getY()); motionTransform.rotate(p.getAngle()); } SVGOMDocument d = (SVGOMDocument) ownerDocument; d.getAnimatedAttributeListener().otherAnimationChanged(this, type); } else { super.updateOtherValue(type, val); } } }
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 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 { path.moveTo(pt.getX(), pt.getY()); for (int i = 1; i < values.length; i++) { pt = (AnimatableMotionPointValue) values[i];
/** * Updates a 'other' animation value in this target. */ public void updateOtherValue(String type, AnimatableValue val) { if (type.equals("motion")) { if (motionTransform == null) { motionTransform = new AffineTransform(); } if (val == null) { motionTransform.setToIdentity(); } else { AnimatableMotionPointValue p = (AnimatableMotionPointValue) val; motionTransform.setToTranslation(p.getX(), p.getY()); motionTransform.rotate(p.getAngle()); } SVGOMDocument d = (SVGOMDocument) ownerDocument; d.getAnimatedAttributeListener().otherAnimationChanged(this, type); } else { super.updateOtherValue(type, val); } } }
/** * Returns the underlying value of the animated attribute. Used for * composition of additive animations. */ public AnimatableValue getUnderlyingValue() { return new AnimatableMotionPointValue(animationTarget, 0f, 0f, 0f); }
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 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 { path.moveTo(pt.getX(), pt.getY()); for (int i = 1; i < values.length; i++) { pt = (AnimatableMotionPointValue) values[i];
/** * Returns a string representation of this object. */ public String toStringRep() { StringBuffer sb = new StringBuffer(); sb.append(formatNumber(x)); sb.append(','); sb.append(formatNumber(y)); sb.append(','); sb.append(formatNumber(angle)); sb.append("rad"); return sb.toString(); } }
/** * Updates a 'other' animation value in this target. */ public void updateOtherValue(String type, AnimatableValue val) { if (type.equals("motion")) { if (motionTransform == null) { motionTransform = new AffineTransform(); } if (val == null) { motionTransform.setToIdentity(); } else { AnimatableMotionPointValue p = (AnimatableMotionPointValue) val; motionTransform.setToTranslation(p.getX(), p.getY()); motionTransform.rotate(p.getAngle()); } SVGOMDocument d = (SVGOMDocument) ownerDocument; d.getAnimatedAttributeListener().otherAnimationChanged(this, type); } else { super.updateOtherValue(type, val); } } }
/** * Returns a zero value of this AnimatableValue's type. */ public AnimatableValue getZeroValue() { return new AnimatableMotionPointValue(target, 0f, 0f, 0f); }
/** * Returns a string representation of this object. */ public String toStringRep() { StringBuffer sb = new StringBuffer(); sb.append(formatNumber(x)); sb.append(','); sb.append(formatNumber(y)); sb.append(','); sb.append(formatNumber(angle)); sb.append("rad"); return sb.toString(); } }
/** * Updates a 'other' animation value in this target. */ public void updateOtherValue(String type, AnimatableValue val) { if (type.equals("motion")) { if (motionTransform == null) { motionTransform = new AffineTransform(); } if (val == null) { motionTransform.setToIdentity(); } else { AnimatableMotionPointValue p = (AnimatableMotionPointValue) val; motionTransform.setToTranslation(p.getX(), p.getY()); motionTransform.rotate(p.getAngle()); } SVGOMDocument d = (SVGOMDocument) ownerDocument; d.getAnimatedAttributeListener().otherAnimationChanged(this, type); } else { super.updateOtherValue(type, val); } } }
/** * Returns a zero value of this AnimatableValue's type. */ public AnimatableValue getZeroValue() { return new AnimatableMotionPointValue(target, 0f, 0f, 0f); }
/** * Updates a 'other' animation value in this target. */ public void updateOtherValue(String type, AnimatableValue val) { if (type.equals("motion")) { if (motionTransform == null) { motionTransform = new AffineTransform(); } if (val == null) { motionTransform.setToIdentity(); } else { AnimatableMotionPointValue p = (AnimatableMotionPointValue) val; motionTransform.setToTranslation(p.getX(), p.getY()); motionTransform.rotate(p.getAngle()); } SVGOMDocument d = (SVGOMDocument) ownerDocument; d.getAnimatedAttributeListener().otherAnimationChanged(this, type); } else { super.updateOtherValue(type, val); } } }
/** * Returns the underlying value of the animated attribute. Used for * composition of additive animations. */ public AnimatableValue getUnderlyingValue() { return new AnimatableMotionPointValue(animationTarget, 0f, 0f, 0f); }
/** * Returns the underlying value of the animated attribute. Used for * composition of additive animations. */ public AnimatableValue getUnderlyingValue() { return new AnimatableMotionPointValue(animationTarget, 0f, 0f, 0f); }
AnimatableMotionPointValue res; if (result == null) { res = new AnimatableMotionPointValue(target); } else { res = (AnimatableMotionPointValue) result;
AnimatableMotionPointValue res; if (result == null) { res = new AnimatableMotionPointValue(target); } else { res = (AnimatableMotionPointValue) result;