diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-09-26 21:43:58 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-09-26 21:43:58 +0800 |
commit | 38aca5bc750b0679dd7f2b7bb5e5a0b6f983dd8b (patch) | |
tree | 1d5ed476d05fc277cf48215cf8037851259b45c3 /demos/platform/graphics/Base.h | |
parent | 57763bb30b86737810bdd8458ba62b378481b994 (diff) | |
download | cru-38aca5bc750b0679dd7f2b7bb5e5a0b6f983dd8b.tar.gz cru-38aca5bc750b0679dd7f2b7bb5e5a0b6f983dd8b.tar.bz2 cru-38aca5bc750b0679dd7f2b7bb5e5a0b6f983dd8b.zip |
Organize platform graphics demo.
Diffstat (limited to 'demos/platform/graphics/Base.h')
-rw-r--r-- | demos/platform/graphics/Base.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/demos/platform/graphics/Base.h b/demos/platform/graphics/Base.h new file mode 100644 index 00000000..6f4f4929 --- /dev/null +++ b/demos/platform/graphics/Base.h @@ -0,0 +1,25 @@ +#pragma once + +#include <cru/base/Base.h> +#include <cru/platform/graphics/Factory.h> +#include <cru/platform/graphics/Image.h> +#include <cru/platform/graphics/Painter.h> + +#include <memory> +#include <string> + +class CruPlatformGraphicsDemo : public cru::Object2 { + public: + CruPlatformGraphicsDemo(std::string file_name, int width, int height); + ~CruPlatformGraphicsDemo() override; + + cru::platform::graphics::IGraphicsFactory* GetFactory(); + cru::platform::graphics::IImage* GetImage(); + cru::platform::graphics::IPainter* GetPainter(); + + private: + std::string file_name_; + std::unique_ptr<cru::platform::graphics::IGraphicsFactory> factory_; + std::unique_ptr<cru::platform::graphics::IImage> image_; + std::unique_ptr<cru::platform::graphics::IPainter> painter_; +}; |