public class MovingForms extends SvgSource
sig/examples/tscore/simple.moving
.
The score format is as follows:
SCORE x PARS y T 0 20 1'20 2'10 VOX a 0,0/ 99,99 / 99,0 // main parameter is the position of the center of the figure, integer from 0 to 99 // rendering makes viewport interpretation, eg. 20--70 -> 0--1024 // tscoreCoord -> physCoord // "-" means: hold value until next explicit value (is default) // "/" means: start linear interpolation P form 3 // param form is 0(circle), 3(triangle) or 4(square) P size 3/ 5 10 // size is diameter/side length, same units as position P color 0,0,99/ 0,99,0-/ // color is integer RGB, 99 is full, 0 is not present P alpha 0-/ // alpha is transparency, 0 is opaque, 99 is invisible // all values are integer.The sequential source order of voices defines the (decreasing) visbility z-stacking.
[g] [circle r=".." transform="scale(..)" fill=".."] [set attributeType='XML' attributeName='opacity' to='1.0' begin='SWITCH_ON_TIME' /] [animateTransform attributeType='XML' attributeName='transform' type='scale' from=".." to=".." begin=".." dur=".." /] [/circle] [animateTransform attributeType='XML' attributeName='transform' type='translate' from=".." to=".." begin=".." dur=".." /] [/g] [g] [polygon r=".." points=".. .. .." transform="scale(..)" fill=".."] ... [/polygon] [/g]
SvgSource.ParamTranslate, SvgSource.Process
Modifier and Type | Field and Description |
---|---|
(package private) Map<Event,Integer> |
event2alpha
Maps some events to the transparent value (called "alpha")
|
(package private) Map<Event,String> |
event2alpha_ipol
Maps some events to the interpolation mode to apply to the transparency.
|
(package private) Map<Event,Color_rgb_8> |
event2color
Evident
|
(package private) Map<Event,String> |
event2color_ipol
Maps some events to the interpolation mode to apply to the color.
|
(package private) Map<Event,Integer> |
event2form
Evident
|
(package private) Map<Event,String> |
event2pos_ipol
Maps some events to the interpolation mode to apply to the position.
|
(package private) Map<Event,Integer> |
event2size
Evident
|
(package private) Map<Event,String> |
event2size_ipol
Maps some events to the interpolation mode to apply to the size.
|
(package private) Map<Event,Integer> |
event2xpos
Evident
|
(package private) Map<Event,Integer> |
event2ypos
Evident
|
(package private) Translet.Parser<?> |
parse_alpha
Parser for the transparency,
plus an optional interpolation sign, see
parse_ipol . |
(package private) Translet.Parser<?> |
parse_color
Parser for the color, as defined by
Color_rgb_8.parser(String) ,
plus an optional interpolation sign, see parse_ipol . |
(package private) Translet.Parser<?> |
parse_form
Parser for the geometric form.
|
(package private) Translet.Parser<String> |
parse_ipol
Parser for the interpolation indication.
|
(package private) Translet.Parser<?> |
parse_pos
Parser for the main parameter value, which is x-pos and y-pos (both as non-negative
integers) plus an optional interpolation sign, see
parse_ipol . |
(package private) Translet.Parser<?> |
parse_size
Parser for the size (non-negative integer),
plus an optional interpolation sign, see
parse_ipol . |
static String |
TRACKNAME_alpha
Evident
|
static String |
TRACKNAME_color
Evident
|
static String |
TRACKNAME_form
Evident
|
static String |
TRACKNAME_pos
Evident
|
static String |
TRACKNAME_size
Evident
|
Constructor and Description |
---|
MovingForms(Part part,
MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
Only constructor for this tscore data processors, found and instantiated
by
MfMain by reflection. |
Modifier and Type | Method and Description |
---|---|
protected void |
convertData()
Must be overridden by the sub-class which realizes the specific conversion.
|
protected void |
convertVoice(Vox v)
Generate the complete svg/smil target text for one voice.
|
protected String |
polyPoints(int n)
Create a polygon with radius = 100 .
|
protected String |
posString(Event e)
Deliver the target svg text of the form's position, in svg coordinates.
|
protected String |
size2transformstring(int user)
Deliver the target svg text of the form's size, as a "scale()" svg command.
|
protected String |
sizeString(Event e)
Deliver the target svg text of the form's size.
|
void |
update()
Translate untyped tscore data into semantically sensible
"MovingForm" data, and verify that all constraints are met.
|
alpha2string, animateString_tp, animateString, animateTransformString, check_init_def, color2string, convertToSvg, height2device, height2device, printAlpha, printColor, setString, tp2device, when2device, width2device, width2device, x2device, y2device
public static final String TRACKNAME_pos
public static final String TRACKNAME_form
public static final String TRACKNAME_size
public static final String TRACKNAME_color
public static final String TRACKNAME_alpha
final Translet.Parser<String> parse_ipol
final Map<Event,Integer> event2alpha
final Map<Event,Color_rgb_8> event2color
final Map<Event,String> event2pos_ipol
final Map<Event,String> event2size_ipol
final Map<Event,String> event2color_ipol
final Map<Event,String> event2alpha_ipol
final Translet.Parser<?> parse_pos
parse_ipol
.final Translet.Parser<?> parse_form
final Translet.Parser<?> parse_size
parse_ipol
.final Translet.Parser<?> parse_color
Color_rgb_8.parser(String)
,
plus an optional interpolation sign, see parse_ipol
.final Translet.Parser<?> parse_alpha
parse_ipol
.
Transparency is encoded from 0=totally transparent=invisible to 100=totally opaque.public MovingForms(Part part, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
MfMain
by reflection.public void update()
protected String posString(Event e)
protected String sizeString(Event e)
protected String size2transformstring(int user)
protected String polyPoints(int n)
n
- number of edgesprotected void convertVoice(Vox v)
protected void convertData()
convertData
in class SvgSource