diff options
author | crupest <crupest@outlook.com> | 2021-08-21 23:15:43 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-08-21 23:15:43 +0800 |
commit | c0616e3892e4f713bea7abd217191b8713a1d1bf (patch) | |
tree | fd1baef5d9752b36a065a2e9677b46676f60c0f9 /include/cru/osx | |
parent | e2e8ba559b0e7a797c083684b382ac4cbb2fdd5f (diff) | |
download | cru-c0616e3892e4f713bea7abd217191b8713a1d1bf.tar.gz cru-c0616e3892e4f713bea7abd217191b8713a1d1bf.tar.bz2 cru-c0616e3892e4f713bea7abd217191b8713a1d1bf.zip |
...
Diffstat (limited to 'include/cru/osx')
-rw-r--r-- | include/cru/osx/graphics/quartz/Convert.hpp | 9 | ||||
-rw-r--r-- | include/cru/osx/graphics/quartz/Painter.hpp | 4 |
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 |