Package eu.bandm.music.top
Class SvgSource.ParamTranslate
java.lang.Object
eu.bandm.tools.util.java.Iterators.Pairwise<Event>
eu.bandm.music.top.SvgSource.ParamTranslate
- Enclosing class:
- SvgSource
Visits all events of a given iterator pairwise and writes out the Svg/Smil commands.
"animateColor()" seems not necessary (even in examples in the w3c SVG docu!-)
"set()" does NOT affect settings of "@transform".
In the code generation scheme, the target value of an interpolation process is already encoded with the command starting the interpoloation. In non-interpolation, a "set value" command is generated at the time of the event. Symbolically:
#0 #1 #2 #3 first(): prepare registers pairwise(): \-------/ ipol==true v0=====>v1... ipol==false v0!... pairwise(): \--------/ ipol==true v1=======>v2... left value == reachedValue --> NOP (No need for a command iff value simply STAYS!) ipol==false v1!... pairwise(): \--------/ etc. last() AND ipol=false: v3!...ATTENTION:
"animateColor()" seems not necessary (even in examples in the w3c SVG docu!-)
"set()" does NOT affect settings of "@transform".
-
Field Summary
Modifier and TypeFieldDescriptionprotected double
protected String
protected final String
protected boolean
Whether between the earlier and later event inpairwise(Event,Event)
an interpolation is requested by the tscore source data.protected final boolean
protected final String
protected final String
protected double
protected String
Value currently valid in the state of the Svg/Smil processor, either as the endpoint of an interpolation, or set and held as a constant.Fields inherited from class eu.bandm.tools.util.java.Iterators.Pairwise
_last, it, lit
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Can be overridden by the user to visit the very first element before the first pair is visited byIterators.Pairwise.pairwise(Object,Object)
.void
Can be overridden by the user to visit the very last element after the last pair is visited byIterators.Pairwise.pairwise(Object,Object)
.void
Must be overridden by the user to visit the define what to do with each pair of adjacent elements.protected double
protected void
writeSet()
Generate the source text which sets the parameter value only of the earlier event.Methods inherited from class eu.bandm.tools.util.java.Iterators.Pairwise
process
-
Field Details
-
ipoltable
-
paramType
-
paramName
-
indent
-
isTransform
protected final boolean isTransform -
getParamValue
-
reachedValue
Value currently valid in the state of the Svg/Smil processor, either as the endpoint of an interpolation, or set and held as a constant. -
predecValue
-
currentValue
-
predecTime
protected double predecTime -
currentTime
protected double currentTime -
ipol
protected boolean ipolWhether between the earlier and later event inpairwise(Event,Event)
an interpolation is requested by the tscore source data.
-
-
Constructor Details
-
ParamTranslate
-
-
Method Details
-
time
-
first
Can be overridden by the user to visit the very first element before the first pair is visited byIterators.Pairwise.pairwise(Object,Object)
. Here: Prepare the registers for the first call topairwise(Event,Event)
.- Overrides:
first
in classeu.bandm.tools.util.java.Iterators.Pairwise<Event>
-
writeSet
protected void writeSet()Generate the source text which sets the parameter value only of the earlier event.ATTENTION, HACK: "set" does not work with "@transform", so we use a VERY FAST animation.
-
pairwise
Must be overridden by the user to visit the define what to do with each pair of adjacent elements. These are visited in the sequential order of the underlying Iterator. On Execution, that has berformed aIterator.next()
, so that it "points" (e.g. with itsIterator.hasNext()
to the successor of the later of both visited elements. Here: Generate either the source text which describes the interpolation between both events, or one which sets the parameter value only of the earlier event. Before processing,predecTime
andpredecValue
correspond to the earlier event. After processing,predecTime
andpredecValue
correspond to the later event = are prepared for the next cyclic call of this method.- Specified by:
pairwise
in classeu.bandm.tools.util.java.Iterators.Pairwise<Event>
-
last
Can be overridden by the user to visit the very last element after the last pair is visited byIterators.Pairwise.pairwise(Object,Object)
.. Here: If the very last event's parameter is not reached by the last interpolation, then generate a "setValue" smil event.- Overrides:
last
in classeu.bandm.tools.util.java.Iterators.Pairwise<Event>
-