#include "classicnotegraphics.h"

ClassicNoteGraphics::ClassicNoteGraphics(ClassicNoteGraphics::Init&& init) :
    _reset_color(init.color),
    _shape(init.shape),
    _trail(init.trail)
{
    _shape->setColor(init.color);
    _trail->setColor(init.color);
}

void ClassicNoteGraphics::reset()
{
    _shape->setPosition(kku::Point{0, 0});
    _trail->setPosition(kku::Point{0, 0});

    _shape->setColor(_reset_color);
    _trail->setColor(_reset_color);
}

void ClassicNoteGraphics::setPosition(const kku::Point& position)
{
    _shape->setPosition(position);
}

void ClassicNoteGraphics::setTrailPosition(const kku::Point &position)
{
    _trail->setPosition(position);
}

kku::Point ClassicNoteGraphics::getPosition() const
{
    return _shape->getPosition();
}

kku::Point ClassicNoteGraphics::getTrailPosition() const
{
    return _trail->getPosition();
}

void ClassicNoteGraphics::setColor(const kku::Color& color)
{
    _shape->setColor(color);
}

void ClassicNoteGraphics::setTrailColor(const kku::Color& color)
{
    _trail->setColor(color);
}

kku::Color ClassicNoteGraphics::getColor() const
{
    return _shape->getColor();
}

kku::Color ClassicNoteGraphics::getTrailColor() const
{
    return _trail->getColor();
}

void ClassicNoteGraphics::display() const
{
    _shape->display();
    _trail->display();
}

std::shared_ptr<const kku::Rectangle> ClassicNoteGraphics::getRectangle() const
{
    return _shape;
}
