From 1dca2841da6f024f613d6dc16de456d5035f8fce Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 31 Oct 2021 22:53:11 +0800 Subject: ... --- include/cru/osx/graphics/quartz/TextLayout.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/cru/osx/graphics/quartz/TextLayout.hpp') diff --git a/include/cru/osx/graphics/quartz/TextLayout.hpp b/include/cru/osx/graphics/quartz/TextLayout.hpp index 95e3d1be..35bcc32d 100644 --- a/include/cru/osx/graphics/quartz/TextLayout.hpp +++ b/include/cru/osx/graphics/quartz/TextLayout.hpp @@ -30,19 +30,25 @@ class OsxCTTextLayout : public OsxQuartzResource, public virtual ITextLayout { Rect GetTextBounds(bool includingTrailingSpace = false) override; std::vector TextRangeRect(const TextRange& text_range) override; - Point TextSinglePoint(Index position, bool trailing) override; + Rect TextSinglePoint(Index position, bool trailing) override; TextHitTestResult HitTest(const Point& point) override; CTFrameRef GetCTFrameRef() const { return ct_frame_; } CTFrameRef CreateFrameWithColor(const Color& color); + Matrix GetTransform() { return transform_; } + String GetDebugString() override; private: void ReleaseResource(); void RecreateFrame(); + Rect DoGetTextBounds(bool includingTrailingSpace = false); + std::vector DoTextRangeRect(const TextRange& text_range); + Rect DoTextSinglePoint(Index position, bool trailing); + private: float max_width_; float max_height_; @@ -58,5 +64,7 @@ class OsxCTTextLayout : public OsxQuartzResource, public virtual ITextLayout { int line_count_; std::vector line_origins_; std::vector lines_; + + Matrix transform_; }; } // namespace cru::platform::graphics::osx::quartz -- cgit v1.2.3