aboutsummaryrefslogtreecommitdiff
path: root/src/osx/graphics/quartz
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-10-26 17:59:57 +0800
committercrupest <crupest@outlook.com>2021-10-26 17:59:57 +0800
commit253341d93d8e3cb38a204b539822ca1cc8597754 (patch)
treef692c9998dccd288c38871dcf43db9f8ddadc3b1 /src/osx/graphics/quartz
parent82431bd0b7e971b956a6a6942538adc8df2ac38c (diff)
downloadcru-253341d93d8e3cb38a204b539822ca1cc8597754.tar.gz
cru-253341d93d8e3cb38a204b539822ca1cc8597754.tar.bz2
cru-253341d93d8e3cb38a204b539822ca1cc8597754.zip
...
Diffstat (limited to 'src/osx/graphics/quartz')
-rw-r--r--src/osx/graphics/quartz/Brush.cpp5
-rw-r--r--src/osx/graphics/quartz/TextLayout.cpp6
2 files changed, 11 insertions, 0 deletions
diff --git a/src/osx/graphics/quartz/Brush.cpp b/src/osx/graphics/quartz/Brush.cpp
index b55ff4e8..83ac20a2 100644
--- a/src/osx/graphics/quartz/Brush.cpp
+++ b/src/osx/graphics/quartz/Brush.cpp
@@ -1,4 +1,5 @@
#include "cru/osx/graphics/quartz/Brush.hpp"
+#include "cru/common/String.hpp"
namespace cru::platform::graphics::osx::quartz {
QuartzSolidColorBrush::QuartzSolidColorBrush(IGraphicsFactory* graphics_factory,
@@ -27,4 +28,8 @@ void QuartzSolidColorBrush::Select(CGContextRef context) {
CGContextSetStrokeColorWithColor(context, cg_color_);
CGContextSetFillColorWithColor(context, cg_color_);
}
+
+String QuartzSolidColorBrush::GetDebugString() {
+ return Format(u"QuartzSolidColorBrush(Color: {})", color_);
+}
} // namespace cru::platform::graphics::osx::quartz
diff --git a/src/osx/graphics/quartz/TextLayout.cpp b/src/osx/graphics/quartz/TextLayout.cpp
index 29735606..41d04958 100644
--- a/src/osx/graphics/quartz/TextLayout.cpp
+++ b/src/osx/graphics/quartz/TextLayout.cpp
@@ -235,4 +235,10 @@ CTFrameRef OsxCTTextLayout::CreateFrameWithColor(const Color& color) {
return frame;
}
+
+String OsxCTTextLayout::GetDebugString() {
+ return Format(u"OsxCTTextLayout(text: {}, size: ({}, {}))", text_, max_width_,
+ max_height_);
+}
+
} // namespace cru::platform::graphics::osx::quartz