SvgAnimator Class

#include <vsvganim.h>

Public Functions

SvgAnimator(const std::string & svg)
~SvgAnimator()
SvgAnimator(SvgAnimator &&)
SvgAnimator & operator=(SvgAnimator &&)
SvgAnimator(const SvgAnimator &)
SvgAnimator & operator=(const SvgAnimator &)
bool animated()
double duration_ms()
std::string bake(double time_ms)

Detailed Description

Parses an SVG once, then re-bakes it to a static frame for any point in time.

Construction is the expensive step (parse + build animation tracks); bake() is cheap and meant to be called per frame. An instance is tied to one SVG document and is safe to keep for the life of the icon widget.

Member Function Documentation

SvgAnimator(const std::string & svg)

No description available.

~SvgAnimator()

No description available.

SvgAnimator(SvgAnimator &&)

No description available.

SvgAnimator & operator=(SvgAnimator &&)

No description available.

SvgAnimator(const SvgAnimator &)

No description available.

SvgAnimator & operator=(const SvgAnimator &)

No description available.

bool animated()

True when the document carries at least one time-varying track — i.e. the applier should run a per-frame clock. False for purely static documents (bake() still works, but every frame is identical, so call it once).

double duration_ms()

The longest track duration in milliseconds (0 when there are no tracks). Informational — handy for choosing a clock that loops cleanly.

std::string bake(double time_ms)

The original SVG with every track evaluated at time_ms baked onto its target as presentation attributes, and any fully-consumed