aboutsummaryrefslogtreecommitdiff
path: root/demos/graphics
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2023-10-05 21:41:32 +0800
committercrupest <crupest@outlook.com>2023-10-05 21:41:32 +0800
commita5d07d55ef4395a5836fd0d2cd86b94290cb2d07 (patch)
tree93559c7402df97171b84e43a67aef82d36552da1 /demos/graphics
parentc1f491712ab071030ed8ca9587c896ca2856ab97 (diff)
downloadcru-a5d07d55ef4395a5836fd0d2cd86b94290cb2d07.tar.gz
cru-a5d07d55ef4395a5836fd0d2cd86b94290cb2d07.tar.bz2
cru-a5d07d55ef4395a5836fd0d2cd86b94290cb2d07.zip
...
Diffstat (limited to 'demos/graphics')
-rw-r--r--demos/graphics/DrawCircle.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/demos/graphics/DrawCircle.cpp b/demos/graphics/DrawCircle.cpp
index 61b4bd81..1ec06744 100644
--- a/demos/graphics/DrawCircle.cpp
+++ b/demos/graphics/DrawCircle.cpp
@@ -1,5 +1,4 @@
-#include "cru/common/io/FileStream.h"
-#include "cru/common/io/OpenFileFlag.h"
+#include "cru/common/io/CFileStream.h"
#include "cru/platform/Color.h"
#include "cru/platform/bootstrap/Bootstrap.h"
#include "cru/platform/graphics/Factory.h"
@@ -22,10 +21,7 @@ int main() {
painter->EndDraw();
}
- cru::io::FileStream file_stream(u"./test_image.png",
- cru::io::OpenFileFlags::Write |
- cru::io::OpenFileFlags::Create |
- cru::io::OpenFileFlags::Truncate);
+ cru::io::CFileStream file_stream("./test_image.png", "w");
graphics_factory->GetImageFactory()->EncodeToStream(
image.get(), &file_stream, cru::platform::graphics::ImageFormat::Png,