- Closes #291 (closed)
- Closes #120 (closed)
- Closes #250 (closed) (which was never an issue to begin with, but a result of how the interpolation method works - that's why there is another one, I've clarified the interface)
- Closes inbox#3717 (closed)
- Closes #316 (closed)
I've refactored the interface for interpolation methods, cleaning up the spaghetti code in
interp-att-g.py. The idea is as follows: There are a multitude of derived classes from
AttributeInterpolator, which have to define
interpolate(self, time=0). They may also define a custom initializer. Types of interpolators are e.g.
UnitValueInterpolator and so on. If you don't know which interpolator to use, just call
AttributeInterpolator.create(snode, enode, path, svg) which deals with the rest.
The interface added by !183 (closed) (
style.interpolate(other, time)) still exists but defers to the new classes.
This makes the interpolation in
interp-att-g.py increadibly easy.
Also about half of the lines in this MR are comments. I tried to reverse-engineer some of the path interpolation methods.