#include "TestFramework.h"
#include "TestUtils.h"
#include "TestRenderUtils.h"

#include "TextNode.h"

TEST_CASE(TestTextRendeing_WithBoundingBoxes, "graphics")
{
	TestRenderer renderer(800, 800);

	auto loc = Point(10, 10);

	TextNode text_node("abcdefgh", Transform(loc));
	text_node.setRenderNodeBounds(true);
	text_node.setRenderTextBounds(true);

	auto scene = renderer.getScene();
	scene->addNode(&text_node);

	renderer.writeSvg(TestUtils::getTestOutputDir(__FILE__) / "text_with_bounding_box.svg");
	renderer.write(TestUtils::getTestOutputDir(__FILE__) / "text_with_bounding_box.png");
};