Skip to content
OE_thread.cpp 1.21 KiB
Newer Older
3dsman's avatar
3dsman committed
* 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
*/
raoul's avatar
raoul committed
#include "Archive.h"
raoul's avatar
raoul committed
#include <ctype.h>
raoul's avatar
raoul committed
OE_color OE_thread::defaultColor = OE_color(.1, .1, .1, 1.0);
raoul's avatar
raoul committed
	width = defaultWidth;
	color = defaultColor;
OE_thread::OE_thread(OE_color color, float width)
	this->color = color;
raoul's avatar
raoul committed

OE_thread::OE_thread(unsigned char r, unsigned char g, unsigned char b, float width)
{
	setColor( r, g, b);
	this->width = width;
}
raoul's avatar
raoul committed

raoul's avatar
raoul committed
void OE_thread::persist(Pakal::Archive* archive)
raoul's avatar
raoul committed
{
raoul's avatar
raoul committed
	//archive->set_type_name("OE_thread");
	archive->value("color", color);
raoul's avatar
raoul committed
	archive->value("width", width);
raoul's avatar
raoul committed
OE_color OE_thread::getColor()
{
	return color;
}
void  OE_thread::setColor(OE_color color)
raoul's avatar
raoul committed
void  OE_thread::setWidth(float width)
{
	this->width = width;
}
raoul's avatar
raoul committed
float OE_thread::getWidth()
{
	return width;
}