diff options
author | crupest <crupest@outlook.com> | 2022-05-15 14:08:06 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-05-15 14:08:06 +0800 |
commit | 8ad2966933957ac5d6ff8dcd5e732736fd5e4dc6 (patch) | |
tree | 77e41cc14264060517c0f7ed95837012afb8342e /include/cru/platform/graphics/quartz/ImageFactory.h | |
parent | 9e0c9d3499bc50c3534b4dc500d8b5d0b5f22752 (diff) | |
download | cru-8ad2966933957ac5d6ff8dcd5e732736fd5e4dc6.tar.gz cru-8ad2966933957ac5d6ff8dcd5e732736fd5e4dc6.tar.bz2 cru-8ad2966933957ac5d6ff8dcd5e732736fd5e4dc6.zip |
...
Diffstat (limited to 'include/cru/platform/graphics/quartz/ImageFactory.h')
-rw-r--r-- | include/cru/platform/graphics/quartz/ImageFactory.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/cru/platform/graphics/quartz/ImageFactory.h b/include/cru/platform/graphics/quartz/ImageFactory.h new file mode 100644 index 00000000..bd2a929f --- /dev/null +++ b/include/cru/platform/graphics/quartz/ImageFactory.h @@ -0,0 +1,22 @@ +#pragma once +#include "Resource.h" +#include "cru/platform/graphics/ImageFactory.h" + +namespace cru::platform::graphics::quartz { +class QuartzImageFactory : public OsxQuartzResource, + public virtual IImageFactory { + public: + explicit QuartzImageFactory(IGraphicsFactory* graphics_factory); + + CRU_DELETE_COPY(QuartzImageFactory) + CRU_DELETE_MOVE(QuartzImageFactory) + + ~QuartzImageFactory() override; + + public: + std::unique_ptr<IImage> DecodeFromStream(io::Stream* stream) override; + void EncodeToStream(IImage* image, io::Stream* stream, ImageFormat format, + float quality) override; + std::unique_ptr<IImage> CreateBitmap(int width, int height) override; +}; +} // namespace cru::platform::graphics::quartz |