#include "MaterialNode.h"

MaterialNode::MaterialNode(const Transform& transform)
    : AbstractVisualNode(transform),
        mMaterial(std::make_unique<BasicMaterial>())
{

}

MaterialNode::~MaterialNode()
{

}

const BasicMaterial* MaterialNode::getMaterial() const
{
    return mMaterial.get();
}

void MaterialNode::setHasStrokeColor(bool hasStroke)
{
    mMaterialIsDirty = mMaterial->setHasStrokeColor(hasStroke);
}

void MaterialNode::setHasFillColor(bool hasFill)
{
    mMaterialIsDirty = mMaterial->setHasFillColor(hasFill);
}

void MaterialNode::setFillColor(const Color& color)
{
    mMaterialIsDirty = mMaterial->setFillColor(color);
}

void MaterialNode::setStrokeColor(const Color& color)
{
    mMaterialIsDirty = mMaterial->setStrokeColor(color);
}
