diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/cru/osx/graphics/quartz/Painter.hpp | 2 | ||||
-rw-r--r-- | include/cru/osx/graphics/quartz/TextLayout.hpp | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/include/cru/osx/graphics/quartz/Painter.hpp b/include/cru/osx/graphics/quartz/Painter.hpp index ea64c3d5..60a660a0 100644 --- a/include/cru/osx/graphics/quartz/Painter.hpp +++ b/include/cru/osx/graphics/quartz/Painter.hpp @@ -62,5 +62,7 @@ class QuartzCGContextPainter : public OsxQuartzResource, Size size_; std::function<void(QuartzCGContextPainter*)> on_end_draw_; + + std::vector<Rect> clip_stack_; }; } // namespace cru::platform::graphics::osx::quartz diff --git a/include/cru/osx/graphics/quartz/TextLayout.hpp b/include/cru/osx/graphics/quartz/TextLayout.hpp index dd170142..92e0c861 100644 --- a/include/cru/osx/graphics/quartz/TextLayout.hpp +++ b/include/cru/osx/graphics/quartz/TextLayout.hpp @@ -35,7 +35,10 @@ class OsxCTTextLayout : public OsxQuartzResource, public virtual ITextLayout { CTFrameRef GetCTFrameRef() const { return ct_frame_; } + CTFrameRef CreateFrameWithColor(const Color& color); + private: + void ReleaseResource(); void RecreateFrame(); private: @@ -45,10 +48,10 @@ class OsxCTTextLayout : public OsxQuartzResource, public virtual ITextLayout { std::shared_ptr<OsxCTFont> font_; String text_; - CFStringRef cf_text_; + CFAttributedStringRef cf_attributed_text_; - CTFramesetterRef ct_framesetter_; - CTFrameRef ct_frame_; + CTFramesetterRef ct_framesetter_ = nullptr; + CTFrameRef ct_frame_ = nullptr; int line_count_; std::vector<CGPoint> line_origins_; std::vector<CTLineRef> lines_; |