diff options
author | crupest <crupest@outlook.com> | 2022-05-05 20:05:35 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-05-05 20:05:35 +0800 |
commit | 56a8047c4093c928b8551bbacda796382984512e (patch) | |
tree | 8891fef971686184511af6b98d111f1b68c13fd0 /include/cru/osx/graphics/quartz/Image.h | |
parent | 7b4b334e777e573040569801d3b4ab28a606a127 (diff) | |
download | cru-56a8047c4093c928b8551bbacda796382984512e.tar.gz cru-56a8047c4093c928b8551bbacda796382984512e.tar.bz2 cru-56a8047c4093c928b8551bbacda796382984512e.zip |
...
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 |