aboutsummaryrefslogtreecommitdiff
path: root/demos/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'demos/graphics')
-rw-r--r--demos/graphics/CMakeLists.txt3
-rw-r--r--demos/graphics/DrawCircle.cpp31
2 files changed, 0 insertions, 34 deletions
diff --git a/demos/graphics/CMakeLists.txt b/demos/graphics/CMakeLists.txt
deleted file mode 100644
index b290ba13..00000000
--- a/demos/graphics/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-add_executable(CruDemoGraphicsDrawCircle DrawCircle.cpp)
-
-target_link_libraries(CruDemoGraphicsDrawCircle PRIVATE CruDemoBase)
diff --git a/demos/graphics/DrawCircle.cpp b/demos/graphics/DrawCircle.cpp
deleted file mode 100644
index 1ec06744..00000000
--- a/demos/graphics/DrawCircle.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include "cru/common/io/CFileStream.h"
-#include "cru/platform/Color.h"
-#include "cru/platform/bootstrap/Bootstrap.h"
-#include "cru/platform/graphics/Factory.h"
-#include "cru/platform/graphics/ImageFactory.h"
-#include "cru/platform/graphics/Painter.h"
-
-#include <memory>
-
-int main() {
- std::unique_ptr<cru::platform::graphics::IGraphicsFactory> graphics_factory(
- cru::platform::bootstrap::CreateGraphicsFactory());
-
- auto image = graphics_factory->GetImageFactory()->CreateBitmap(500, 500);
-
- {
- auto brush =
- graphics_factory->CreateSolidColorBrush(cru::platform::colors::skyblue);
- auto painter = image->CreatePainter();
- painter->FillEllipse(cru::platform::Rect{200, 200, 100, 100}, brush.get());
- painter->EndDraw();
- }
-
- cru::io::CFileStream file_stream("./test_image.png", "w");
-
- graphics_factory->GetImageFactory()->EncodeToStream(
- image.get(), &file_stream, cru::platform::graphics::ImageFormat::Png,
- 1.0f);
-
- return 0;
-}