aboutsummaryrefslogtreecommitdiff
path: root/include/cru/osx/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/osx/graphics')
-rw-r--r--include/cru/osx/graphics/quartz/Convert.hpp9
-rw-r--r--include/cru/osx/graphics/quartz/Painter.hpp4
2 files changed, 11 insertions, 2 deletions
diff --git a/include/cru/osx/graphics/quartz/Convert.hpp b/include/cru/osx/graphics/quartz/Convert.hpp
new file mode 100644
index 00000000..9706dc00
--- /dev/null
+++ b/include/cru/osx/graphics/quartz/Convert.hpp
@@ -0,0 +1,9 @@
+#pragma once
+#include "cru/platform/Matrix.hpp"
+
+#include <CoreGraphics/CoreGraphics.h>
+
+namespace cru::platform::graphics::osx::quartz {
+ CGAffineTransform Convert(const Matrix& matrix);
+ Matrix Convert(const CGAffineTransform& matrix);
+}
diff --git a/include/cru/osx/graphics/quartz/Painter.hpp b/include/cru/osx/graphics/quartz/Painter.hpp
index 2d77ab3a..7f775210 100644
--- a/include/cru/osx/graphics/quartz/Painter.hpp
+++ b/include/cru/osx/graphics/quartz/Painter.hpp
@@ -8,7 +8,7 @@ namespace cru::platform::graphics::osx::quartz {
class QuartzCGContextPainter : public OsxQuartzResource,
public virtual IPainter {
public:
- explicit QuartzCGContextPainter(CGContext* cg_context)
+ explicit QuartzCGContextPainter(CGContextRef cg_context)
: cg_context_(cg_context) {}
public:
@@ -36,6 +36,6 @@ class QuartzCGContextPainter : public OsxQuartzResource,
void EndDraw() override;
private:
- CGContext* cg_context_;
+ CGContextRef cg_context_;
};
} // namespace cru::platform::graphics::osx::quartz