aboutsummaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-05-10 11:33:22 +0800
committercrupest <crupest@outlook.com>2022-05-10 11:33:22 +0800
commit5947b34096c7162bad4e17091f2a798c788b231b (patch)
tree2cb7949e5eee17223383e37e45f817d2c8ee87ee /demos
parent58e37eee64b13df9cf24cdfc97906e19b2898869 (diff)
downloadcru-5947b34096c7162bad4e17091f2a798c788b231b.tar.gz
cru-5947b34096c7162bad4e17091f2a798c788b231b.tar.bz2
cru-5947b34096c7162bad4e17091f2a798c788b231b.zip
...
Diffstat (limited to 'demos')
-rw-r--r--demos/graphics/DrawCircle.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/demos/graphics/DrawCircle.cpp b/demos/graphics/DrawCircle.cpp
index 9f1eb253..13a7367a 100644
--- a/demos/graphics/DrawCircle.cpp
+++ b/demos/graphics/DrawCircle.cpp
@@ -22,9 +22,10 @@ int main() {
painter->EndDraw();
}
- cru::io::FileStream file_stream(
- u"./test_image.png",
- cru::io::OpenFileFlags::Write | cru::io::OpenFileFlags::Create);
+ cru::io::FileStream file_stream(u"./test_image.png",
+ cru::io::OpenFileFlags::Write |
+ cru::io::OpenFileFlags::Create |
+ cru::io::OpenFileFlags::Truncate);
graphics_factory->GetImageFactory()->EncodeToStream(
image.get(), &file_stream, cru::platform::graphics::ImageFormat::Png,