Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For more information see also the Inkscape FAQ for this topic: http://wiki.inkscape.org/wiki/index.php/Frequently_asked_questions#What_about_flowed_text.3F

Text Colors

Sadly the Batik SVG Renderer that is used in KIELER does not handle text colors as well as Inkscape does. When setting the fill color directly on a text element in Inkscape, it will not be displayed in the Simulation Visualization View. The text will be black.

However there is a simple workaround: Select the text objects that should be colored, group them (Ctrl + G), then set the fill color on this group. The child elements will inherit the color and (for whatever reason) this does also work in Batik.

Creating a Configuration File

...

It is used to change the appearance of elements. The fill color, stroke color and with as well as opacity can be changed.

AttributeDomainDescription
fillColorString, either a color name of predefined colors,
or a hexadecimal rgb color
Sets the fill color
fillOpacityFloat, ranges from 0 (fully transparent) to 1 (fully visible)Sets the opacity of the filling
strokeColorSame as fillColorSets the color of the outline / stroke
strokeOpacitySame as fillOpacitySets the opacity of the outline / stroke
opacitySame as fillOpacitySets the overall transparency

Text Animation

This animation can be used for text objects in the SVG to set the font and text.

AttributeDomainDescription
textStringSets the text of the element
fontSizeIntegerSets the size of the text element
fontFamilyString, name of an installed font (e.g. "Arial Black" or "serif")Sets the font family

Move Animation

This animation changes the position of an SVG element relative to its original position.

AttributeDomainDescription
xFloatThe x coordinate relative to the original position
yFloatThe y coordinate relative to the original position

Rotate Animation

This animation changes the rotation of elements.

AttributeDomainDescription
angleIntegerThe angle in degrees that the object should be rotated
anchorXFloat, 0 to 1

Relative position inside the SVG element where the anchor point of the rotation will be.

0 is at the left side, 1 is at the right side. Default is 0.5, which is the middle.

anchorYFloat, 0 to 1

Relative position inside the SVG element where the anchor point of the rotation will be.

0 is at the top side, 1 is at the bottom side. Default is 0.5, which is the middle.

Walk Path Animation

This animation is used to position SVG elements on SVG paths. Therefore the start value of the path and the end value of the path have to be defined. The position is then interpolated linearly between start and end.

This is a powerful animation to position SVG elements, because the position can be drawn as path in the svg itself.

AttributeDomainDescription
nameStringThe id of the path in the SVG image
startFloat

The start position of the path.

When the position value is the same as the value of this attribute, the object will be position at the beginning of the path.

endFloat

The end position of the path.

When the position value is the same as the value of this, the object will be position at the end of the path.

lengthFloat

The length of the path.

Can be used instead the absolute end position. In this case the end position is calculated as
end = start+length

positionFloat

Used to set a fixed position on the path. Normally the position is taken from a variable in the simulation data pool, but it can also be set to a fixed value with this attribute.

The value should be between start and end of the path

autoOrientationBoolean, true / falseDetermines if the object should also align its rotation to the path
angleOffsetInteger

When autoOrientation is true, this offset in degrees is added to the calculated rotation on the path.

For example if the element is facing with in the wrong direction when it is walking the path, an offset of 180 can be used to turn it.

anglesee rotate animationsee rotate animation
anchorXsee rotate animation

see rotate animation

anchorYsee rotate animationsee rotate animation

Interaction with the Simulation

...