Start implementing the SVG animation library (and tool)
This commit is contained in:
parent
e1af823502
commit
4e87a67296
5 changed files with 298 additions and 11 deletions
35
Libraries/Kanimaji/Source/SVG.hpp
Normal file
35
Libraries/Kanimaji/Source/SVG.hpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#ifndef KANIMAJI_SVG_HPP
|
||||
#define KANIMAJI_SVG_HPP
|
||||
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
namespace Kanimaji::SVG
|
||||
{
|
||||
class Error : public std::runtime_error
|
||||
{
|
||||
using std::runtime_error::runtime_error;
|
||||
};
|
||||
|
||||
class Path
|
||||
{
|
||||
public:
|
||||
class Element;
|
||||
public:
|
||||
Path(std::string_view definition);
|
||||
|
||||
Path(const Path&) = delete;
|
||||
Path& operator=(const Path&) = delete;
|
||||
Path(Path&&) = default;
|
||||
Path& operator=(Path&&) = default;
|
||||
~Path();
|
||||
|
||||
double Length() const;
|
||||
private:
|
||||
std::vector<std::unique_ptr<Element>> mSegments;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // KANIMAJI_SVG_HPP
|
Loading…
Add table
Add a link
Reference in a new issue