diff options
| author | crupest <crupest@outlook.com> | 2022-05-07 20:53:57 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-07 20:53:57 +0800 |
| commit | ee5aa17e44cb36b386e89032cab96caf87b5b524 (patch) | |
| tree | a7cef6c60f55e3870900016e0f1a4efe578efbf0 /include/cru/osx/graphics/quartz/Image.h | |
| parent | 5bc684dcc1d121bf6e02d0800174c7977c72d101 (diff) | |
| parent | cb850a6d6d13fc5b2c0cdd8773e368e23252c459 (diff) | |
| download | cru-ee5aa17e44cb36b386e89032cab96caf87b5b524.tar.gz cru-ee5aa17e44cb36b386e89032cab96caf87b5b524.tar.bz2 cru-ee5aa17e44cb36b386e89032cab96caf87b5b524.zip | |
Merge pull request #54 from crupest/create-image
Diffstat (limited to 'include/cru/osx/graphics/quartz/Image.h')
| -rw-r--r-- | include/cru/osx/graphics/quartz/Image.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/cru/osx/graphics/quartz/Image.h b/include/cru/osx/graphics/quartz/Image.h index 458f5db0..5b3aead9 100644 --- a/include/cru/osx/graphics/quartz/Image.h +++ b/include/cru/osx/graphics/quartz/Image.h @@ -9,7 +9,8 @@ namespace cru::platform::graphics::osx::quartz { class QuartzImage : public OsxQuartzResource, public virtual IImage { public: QuartzImage(IGraphicsFactory* graphics_factory, IImageFactory* image_factory, - CGImageRef image, bool auto_release); + CGImageRef image, bool auto_release, + unsigned char* buffer = nullptr); CRU_DELETE_COPY(QuartzImage) CRU_DELETE_MOVE(QuartzImage) @@ -22,11 +23,15 @@ class QuartzImage : public OsxQuartzResource, public virtual IImage { std::unique_ptr<IImage> CreateWithRect(const Rect& rect) override; + std::unique_ptr<IPainter> CreatePainter() override; + CGImageRef GetCGImage() const { return image_; } private: IImageFactory* image_factory_; CGImageRef image_; bool auto_release_ = false; + + unsigned char* buffer_; }; } // namespace cru::platform::graphics::osx::quartz |
