#include "SceneText.h"

SceneText::SceneText()
{
    mTextData.mFont = FontItem("Arial", 16);
}

SceneItem::Type SceneText::getType() const
{
    return SceneItem::Type::TEXT;
}

const TextData& SceneText::getTextData() const
{
    return mTextData;
}

void SceneText::setTextData(const TextData& data)
{
    if (mTextData != data)
    {
        mTextGeometryIsDirty = true;
        mTextData = data;
    }
}

double SceneText::getTextWidth() const
{
    return mTextWidth;
}

double SceneText::getTextHeight() const
{
    return mTextHeight;
}

void SceneText::setTextWidth(double width)
{
    if (mTextWidth != width)
    {
        mTextWidth = width;
        mTextGeometryIsDirty = true;
    }
}

void SceneText::setTextHeight(double height)
{
    if (mTextHeight != height)
    {
        mTextHeight = height;
        mTextGeometryIsDirty = true;
    }
}
