#pragma once

#include "SvgElement.h"
#include "Color.h"
#include "Transform.h"

class SvgShapeElement : public SvgElement
{
public:
    SvgShapeElement(const std::string& tagName, std::size_t precision = 0);

    Transform getTransform() const;
    
    bool hasTransform() const;

    void setFill(const Color& fill);

    void setNoFill();

    void setFillOpacity(float opacity);

    void setStrokeWidth(double width);

    void setStrokeColor(const Color& stroke);

    void setNoStroke();

protected:
    std::size_t mPrecision{ 0 };

private:
    std::string getLabelledContent(const std::string& key, const std::string& content) const;
    Point parsePoint(const std::string& pointString, double defaultVal = 0.0) const;
};
