SVG (SVG) Widget Control
This page lists the Widget Control (Property · Method · Event) you use to control the SVG widget from a script. To learn what the widget is and how to use it, visit SVG.
The svgID in the examples below is the name (ID) you assigned to the SVG widget on the canvas. In a script, access members as widgetID.member.
Widget Control summary
| Widget Control | Kind | Signature | Description |
|---|---|---|---|
play | Method | svgID.play() | Starts animation playback, or resumes it |
pause | Method | svgID.pause() | Pauses the animation at the current frame |
stop | Method | svgID.stop() | Stops the animation and returns it to the first frame |
Property
Not applicable — the SVG widget has no script-specific Property. From a script, read and write values with the common Widget Control below (getProperty / setProperty).
Method
play
Starts playing an animated SVG, or resumes playback from a paused state.
- Kind: Method
- Parameters: None
- Returns: None (
void) - Note: Does nothing on a static SVG whose
animatedproperty is turned off, or when the widget hasn't been rendered on screen yet.
Example
svgID.play();
pause
Stops the animation at the current frame. Call play() again and playback resumes from that point.
- Kind: Method
- Parameters: None
- Returns: None (
void)
Example
svgID.pause();
stop
Stops the animation and returns it to the first frame.
- Kind: Method
- Parameters: None
- Returns: None (
void)
Example
svgID.stop();
Event
Not applicable — the SVG widget has no dedicated Event.
Common Widget Control (all widgets)
Every widget supports name-based common Widget Control (Method) such as setProperty / getProperty / setStyleProperty. See the common reference doc (to be written).