aboutsummaryrefslogtreecommitdiff
path: root/include/cru/osx/graphics/quartz/TextLayout.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/osx/graphics/quartz/TextLayout.hpp')
-rw-r--r--include/cru/osx/graphics/quartz/TextLayout.hpp10
1 files changed, 9 insertions, 1 deletions
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<Rect> 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<Rect> 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<CGPoint> line_origins_;
std::vector<CTLineRef> lines_;
+
+ Matrix transform_;
};
} // namespace cru::platform::graphics::osx::quartz