aboutsummaryrefslogtreecommitdiff
path: root/include/cru/osx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-30 22:23:59 +0800
committercrupest <crupest@outlook.com>2022-01-30 22:23:59 +0800
commitb9a553d4acc15ec981636b30db537be280d593e5 (patch)
treec909657f2bbd112abafc104db28034b67d895d45 /include/cru/osx
parent1909ee98b92ea993e6fbbdb628da0cf586db7d52 (diff)
downloadcru-b9a553d4acc15ec981636b30db537be280d593e5.tar.gz
cru-b9a553d4acc15ec981636b30db537be280d593e5.tar.bz2
cru-b9a553d4acc15ec981636b30db537be280d593e5.zip
...
Diffstat (limited to 'include/cru/osx')
-rw-r--r--include/cru/osx/graphics/quartz/Image.hpp2
-rw-r--r--include/cru/osx/graphics/quartz/Painter.hpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/cru/osx/graphics/quartz/Image.hpp b/include/cru/osx/graphics/quartz/Image.hpp
index 66d7dca0..16b1ca2c 100644
--- a/include/cru/osx/graphics/quartz/Image.hpp
+++ b/include/cru/osx/graphics/quartz/Image.hpp
@@ -17,6 +17,8 @@ class QuartzImage : public OsxQuartzResource, public virtual IImage {
~QuartzImage() override;
public:
+ CGImageRef GetCGImage() const { return image_; }
+
private:
CGImageRef image_;
bool auto_release_ = false;
diff --git a/include/cru/osx/graphics/quartz/Painter.hpp b/include/cru/osx/graphics/quartz/Painter.hpp
index 83f15516..c88987a0 100644
--- a/include/cru/osx/graphics/quartz/Painter.hpp
+++ b/include/cru/osx/graphics/quartz/Painter.hpp
@@ -48,6 +48,8 @@ class QuartzCGContextPainter : public OsxQuartzResource,
void DrawText(const Point& offset, ITextLayout* text_layout,
IBrush* brush) override;
+ void DrawImage(const Rect& rect, IImage* image) override;
+
void PushLayer(const Rect& bounds) override;
void PopLayer() override;