#include <plot.h>
Any drawable element.
Each element can draw to three layers: fill, stroke and label. Child elements are drawn in reverse order, so the earliest ones are drawn on top of each layer.
Copy/assign is disabled, to prevent accidental copying when you should be holding a reference.
Inherited by signalsmith::plot::HeatMap::EmbeddedHeatMap, signalsmith::plot::HeatMap::RetainedMap, signalsmith::plot::Image, signalsmith::plot::Line2D, signalsmith::plot::SvgFileDrawable, and signalsmith::plot::TextLabel.
Methods | |
SvgDrawable (const SvgDrawable &other)=delete | |
SvgDrawable & | operator= (const SvgDrawable &other)=delete |
Bounds | layoutIfNeeded (const PlotStyle &style) |
void | addChild (SvgDrawable *child, bool front=false) |
Takes ownership of the child. More... | |
virtual void | writeData (SvgWriter &svg, const PlotStyle &style) |
virtual void | writeLabel (SvgWriter &svg, const PlotStyle &style) |
virtual void | toFrame (double time, bool clear=true) |
Creates a frame from the current stat, and optionally clears the state ready for the next frame. More... | |
virtual void | loopFrame (double loopTime) |
Sets loop time (or < 0 to disable) More... | |
virtual void | clearFrames () |
Removes all animation frames. Mostly useful if re-using the diagram for multiple animations. More... | |
Protected Member Functions | |
void | invalidateLayout () |
virtual void | layout (const PlotStyle &style) |
void | addLayoutChild (SvgDrawable *child) |
These children are removed when the layout is invalidated. More... | |
Protected Attributes | |
Bounds | bounds |
|
inline |
Takes ownership of the child.
|
inlineprotected |
These children are removed when the layout is invalidated.
|
inlinevirtual |
Removes all animation frames. Mostly useful if re-using the diagram for multiple animations.
Reimplemented in signalsmith::plot::Grid, and signalsmith::plot::Line2D.
|
inlinevirtual |
Sets loop time (or < 0 to disable)
Reimplemented in signalsmith::plot::Grid, and signalsmith::plot::Line2D.
|
inlinevirtual |
Creates a frame from the current stat, and optionally clears the state ready for the next frame.
The time is the start-time of the frame being created.
Reimplemented in signalsmith::plot::Grid, and signalsmith::plot::Line2D.