aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/graphics/quartz/ImageFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/platform/graphics/quartz/ImageFactory.h')
-rw-r--r--include/cru/platform/graphics/quartz/ImageFactory.h22
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