diff options
Diffstat (limited to 'include/cru/osx/graphics/quartz/TextLayout.hpp')
-rw-r--r-- | include/cru/osx/graphics/quartz/TextLayout.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
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_; |