Composite: Added ::clear for reuse

This commit is contained in:
Paul Beckingham 2016-04-23 23:42:25 -04:00
parent b7688bd7ea
commit 5f42516f38
2 changed files with 8 additions and 0 deletions

View file

@ -137,3 +137,10 @@ std::string Composite::str (bool blend) const
}
////////////////////////////////////////////////////////////////////////////////
// So the same instance can be reused.
void Composite::clear ()
{
_layers.clear ();
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -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 <std::tuple <std::string, std::string::size_type, Color>> _layers;