diff options
author | crupest <crupest@outlook.com> | 2021-09-09 17:55:40 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-09-09 17:55:40 +0800 |
commit | 74aee8a6308445604b513ab37812ddc99365aa98 (patch) | |
tree | 4a0886df82af6baa248e62b97fa585e09be9470d /include/cru/osx | |
parent | 700751108257a00ab1a6134fe0ca570acb3269a8 (diff) | |
download | cru-74aee8a6308445604b513ab37812ddc99365aa98.tar.gz cru-74aee8a6308445604b513ab37812ddc99365aa98.tar.bz2 cru-74aee8a6308445604b513ab37812ddc99365aa98.zip |
...
Diffstat (limited to 'include/cru/osx')
-rw-r--r-- | include/cru/osx/graphics/quartz/Convert.hpp | 5 | ||||
-rw-r--r-- | include/cru/osx/graphics/quartz/TextLayout.hpp | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/cru/osx/graphics/quartz/Convert.hpp b/include/cru/osx/graphics/quartz/Convert.hpp index f217e549..f85fc20e 100644 --- a/include/cru/osx/graphics/quartz/Convert.hpp +++ b/include/cru/osx/graphics/quartz/Convert.hpp @@ -1,5 +1,7 @@ #pragma once #include "cru/platform/Matrix.hpp" +#include "cru/common/String.hpp" +#include "cru/common/Range.hpp" #include <CoreGraphics/CoreGraphics.h> @@ -12,4 +14,7 @@ Matrix Convert(const CGAffineTransform& matrix); CGRect Convert(const Rect& rect); Rect Convert(const CGRect& rect); + +CFRange Convert(const Range& range); +Range Convert(const CFRange& range); } // 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 4a3830db..36d5d25b 100644 --- a/include/cru/osx/graphics/quartz/TextLayout.hpp +++ b/include/cru/osx/graphics/quartz/TextLayout.hpp @@ -47,5 +47,9 @@ private: CTFramesetterRef ct_framesetter_; CTFrameRef ct_frame_; + int line_count_; + std::vector<CGPoint> line_origins_; + std::vector<CTLineRef> lines_; + std::vector<std::vector<float>> line_caret_offsets_; }; } // namespace cru::platform::graphics::osx::quartz |