diff --git a/src/Composite.cpp b/src/Composite.cpp index 5c109a01..b80a4c50 100644 --- a/src/Composite.cpp +++ b/src/Composite.cpp @@ -137,3 +137,10 @@ std::string Composite::str (bool blend) const } //////////////////////////////////////////////////////////////////////////////// +// So the same instance can be reused. +void Composite::clear () +{ + _layers.clear (); +} + +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/Composite.h b/src/Composite.h index 1167d426..645bcfd0 100644 --- a/src/Composite.h +++ b/src/Composite.h @@ -38,6 +38,7 @@ public: Composite () = default; void add (const std::string&, std::string::size_type, const Color&); std::string str (bool blend = false) const; + void clear (); private: std::vector > _layers;