/*
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/

#include "stitchs/OE_staticstitch.h"

OE_staticstitch::OE_staticstitch(OE_thread* thread)
{
	this->thread = thread;
}

void OE_staticstitch::persist(Pakal::Archive* archive)
{
	OE_stitchs::persist(archive);
	archive->set_type_name("OE_staticstitch");
	archive->value("pts", pts);
}

void OE_staticstitch::move(vector_2d offset)
{
	for (unsigned i=0; i<pts.size(); i++)
	{
		pts[i] = pts[i] + offset;
	}
	setNeedRefresh();
}

