2023-01-11 10:21:18 +00:00
|
|
|
#include "TestFramework.h"
|
|
|
|
#include "TestUtils.h"
|
2023-01-12 10:58:43 +00:00
|
|
|
#include "TestRenderUtils.h"
|
2023-01-11 10:21:18 +00:00
|
|
|
|
|
|
|
#include "RectangleNode.h"
|
2023-01-12 10:58:43 +00:00
|
|
|
|
2023-01-11 10:21:18 +00:00
|
|
|
|
|
|
|
TEST_CASE(TestD2dOffScreenRendering, "graphics")
|
|
|
|
{
|
2023-01-12 10:58:43 +00:00
|
|
|
TestRenderer renderer(800, 800);
|
2023-01-11 10:21:18 +00:00
|
|
|
|
2023-01-12 09:18:16 +00:00
|
|
|
auto rect = std::make_unique<RectangleNode>(Point(10, 10), 200.0, 200.0);
|
2023-01-11 10:21:18 +00:00
|
|
|
|
2023-01-12 10:58:43 +00:00
|
|
|
auto scene = renderer.getScene();
|
2023-01-12 09:18:16 +00:00
|
|
|
//scene->setBackgroundColor(Color(100, 100, 0));
|
2023-01-11 10:21:18 +00:00
|
|
|
scene->addNode(rect.get());
|
|
|
|
|
2023-01-12 10:58:43 +00:00
|
|
|
renderer.write(TestUtils::getTestOutputDir(__FILE__) / "out.png");
|
2023-01-11 10:21:18 +00:00
|
|
|
};
|