Initial working Kanimaji implementation
This commit is contained in:
parent
4e87a67296
commit
99901b878a
8 changed files with 588 additions and 83 deletions
|
@ -13,6 +13,19 @@ namespace Kanimaji::SVG
|
|||
using std::runtime_error::runtime_error;
|
||||
};
|
||||
|
||||
class ParseError : public Error
|
||||
{
|
||||
public:
|
||||
ParseError(std::size_t current, std::string_view message);
|
||||
|
||||
std::size_t Position() const
|
||||
{
|
||||
return mPosition;
|
||||
}
|
||||
private:
|
||||
std::size_t mPosition;
|
||||
};
|
||||
|
||||
class Path
|
||||
{
|
||||
public:
|
||||
|
@ -27,6 +40,8 @@ namespace Kanimaji::SVG
|
|||
~Path();
|
||||
|
||||
double Length() const;
|
||||
|
||||
void Serialize(std::string& out) const;
|
||||
private:
|
||||
std::vector<std::unique_ptr<Element>> mSegments;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue