aboutsummaryrefslogtreecommitdiff
path: root/include/cru/osx/graphics/quartz/Image.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-30 20:40:59 +0800
committercrupest <crupest@outlook.com>2022-01-30 20:40:59 +0800
commitc1f8ea13524f398f8d1720e5f03a17dd66352ebf (patch)
tree0e27ed132cd82d1a690aa9534df38beec0c77d45 /include/cru/osx/graphics/quartz/Image.hpp
parenta6dd823a94f0e6338545a4885e9d428e83a56593 (diff)
downloadcru-c1f8ea13524f398f8d1720e5f03a17dd66352ebf.tar.gz
cru-c1f8ea13524f398f8d1720e5f03a17dd66352ebf.tar.bz2
cru-c1f8ea13524f398f8d1720e5f03a17dd66352ebf.zip
...
Diffstat (limited to 'include/cru/osx/graphics/quartz/Image.hpp')
-rw-r--r--include/cru/osx/graphics/quartz/Image.hpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/cru/osx/graphics/quartz/Image.hpp b/include/cru/osx/graphics/quartz/Image.hpp
new file mode 100644
index 00000000..66d7dca0
--- /dev/null
+++ b/include/cru/osx/graphics/quartz/Image.hpp
@@ -0,0 +1,24 @@
+#pragma once
+#include "Resource.hpp"
+#include "cru/platform/graphics/Image.hpp"
+#include "cru/platform/graphics/ImageFactory.hpp"
+
+#include <CoreGraphics/CoreGraphics.h>
+
+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);
+
+ CRU_DELETE_COPY(QuartzImage)
+ CRU_DELETE_MOVE(QuartzImage)
+
+ ~QuartzImage() override;
+
+ public:
+ private:
+ CGImageRef image_;
+ bool auto_release_ = false;
+};
+} // namespace cru::platform::graphics::osx::quartz