#include "Path.h"

#include "StringUtils.h"
#include "FileLogger.h"

#include "Line.h"
#include "LineSegment.h"
#include "PathPostScriptConverter.h"

GeometryPath::~GeometryPath()
{

}

const std::vector<GeometryPathFeaturePtr>& GeometryPath::getFeatures() const
{
	return mFeatures;
}

void GeometryPath::buildFromPostscript(const std::string& psString)
{
	PathPostScriptConverter converter;
	converter.fromPostScript(this, psString);
}

void GeometryPath::addFeature(GeometryPathFeaturePtr feature)
{
	mFeatures.push_back(std::move(feature));
}

const Point& GeometryPath::getLocation() const
{
	return mLocation;
}

Bounds GeometryPath::getBounds() const
{
	return {};
}

GeometryPath::Type GeometryPath::getType() const
{
	return GeometryPath::Type::PATH;
}

void GeometryPath::sample(SparseGrid<bool>*) const
{

}

std::string GeometryPath::getAsPostScript() const
{
	PathPostScriptConverter converter;
	return converter.toPostScript(this);
}
