From 8ad2966933957ac5d6ff8dcd5e732736fd5e4dc6 Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 15 May 2022 14:08:06 +0800 Subject: ... --- .../cru/platform/graphics/quartz/ImageFactory.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 include/cru/platform/graphics/quartz/ImageFactory.h (limited to 'include/cru/platform/graphics/quartz/ImageFactory.h') 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 DecodeFromStream(io::Stream* stream) override; + void EncodeToStream(IImage* image, io::Stream* stream, ImageFormat format, + float quality) override; + std::unique_ptr CreateBitmap(int width, int height) override; +}; +} // namespace cru::platform::graphics::quartz -- cgit v1.2.3