#include "LogicGatePrimitiveShapes.h"

std::string LogicGatePrimitiveShapes::getAndGateShape()
{
	return "M4 8 h24 a16 16 0 0 1 0 32 h-24Z";
}

Point LogicGatePrimitiveShapes::getAndGateConnectionLocation(bool isInput, std::size_t idx)
{
	if (isInput)
	{
		if (idx == 0)
		{
			return { 4.0, 18.66 };
		}
		else
		{
			return { 4.0, 29.33 };
		}
	}
	else
	{
		return {44.0, 24.0};
	}
}

std::string LogicGatePrimitiveShapes::getOrGateShape()
{
	return "M4 8 h16 q16 2 24 16 q-12 16 -24 16 h-16 q12 -16 0 -32Z";
}

Point LogicGatePrimitiveShapes::getOrGateConnectionLocation(bool isInput, std::size_t idx)
{
	if (isInput)
	{
		if (idx == 0)
		{
			return { 8.0, 18.66 };
		}
		else
		{
			return { 8.0, 29.33 };
		}
	}
	else
	{
		return { 44.0, 24.0 };
	}
}