From 32aa6f116acc6e3e20a1ec76cef45b29f7005ad7 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 17 Oct 2025 12:06:14 +0800 Subject: Remove String stage 1. --- src/platform/graphics/quartz/Factory.cpp | 2 +- src/platform/graphics/quartz/ImageFactory.cpp | 2 +- src/platform/graphics/quartz/Painter.cpp | 22 +++++++++++----------- src/platform/graphics/quartz/TextLayout.cpp | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/platform/graphics/quartz') diff --git a/src/platform/graphics/quartz/Factory.cpp b/src/platform/graphics/quartz/Factory.cpp index 5d5b48b5..862c0966 100644 --- a/src/platform/graphics/quartz/Factory.cpp +++ b/src/platform/graphics/quartz/Factory.cpp @@ -33,7 +33,7 @@ std::unique_ptr QuartzGraphicsFactory::CreateFont(String font_family, std::unique_ptr QuartzGraphicsFactory::CreateTextLayout( std::shared_ptr font, String text) { - auto f = CheckPlatform(font, GetPlatformIdUtf8()); + auto f = CheckPlatform(font, GetPlatformId()); return std::make_unique(this, f, text); } diff --git a/src/platform/graphics/quartz/ImageFactory.cpp b/src/platform/graphics/quartz/ImageFactory.cpp index 62229bcb..2090828c 100644 --- a/src/platform/graphics/quartz/ImageFactory.cpp +++ b/src/platform/graphics/quartz/ImageFactory.cpp @@ -49,7 +49,7 @@ void QuartzImageFactory::EncodeToStream(IImage* image, io::Stream* stream, throw Exception("Invalid quality value."); } - auto quartz_image = CheckPlatform(image, GetPlatformIdUtf8()); + auto quartz_image = CheckPlatform(image, GetPlatformId()); auto cg_image = quartz_image->GetCGImage(); auto uti = ToCFString(GetImageFormatUniformTypeIdentifier(format)); diff --git a/src/platform/graphics/quartz/Painter.cpp b/src/platform/graphics/quartz/Painter.cpp index fe0f5d43..45dee716 100644 --- a/src/platform/graphics/quartz/Painter.cpp +++ b/src/platform/graphics/quartz/Painter.cpp @@ -66,7 +66,7 @@ void QuartzCGContextPainter::DrawLine(const Point& start, const Point& end, CGContextMoveToPoint(cg_context_, start.x, start.y); CGContextAddLineToPoint(cg_context_, end.x, end.y); - QuartzBrush* b = CheckPlatform(brush, GetPlatformIdUtf8()); + QuartzBrush* b = CheckPlatform(brush, GetPlatformId()); b->Select(cg_context_); SetLineWidth(width); @@ -77,7 +77,7 @@ void QuartzCGContextPainter::StrokeRectangle(const Rect& rectangle, IBrush* brush, float width) { Validate(); - QuartzBrush* b = CheckPlatform(brush, GetPlatformIdUtf8()); + QuartzBrush* b = CheckPlatform(brush, GetPlatformId()); b->Select(cg_context_); CGContextStrokeRectWithWidth(cg_context_, Convert(rectangle), width); } @@ -86,7 +86,7 @@ void QuartzCGContextPainter::FillRectangle(const Rect& rectangle, IBrush* brush) { Validate(); - QuartzBrush* b = CheckPlatform(brush, GetPlatformIdUtf8()); + QuartzBrush* b = CheckPlatform(brush, GetPlatformId()); b->Select(cg_context_); CGContextFillRect(cg_context_, Convert(rectangle)); } @@ -95,7 +95,7 @@ void QuartzCGContextPainter::StrokeEllipse(const Rect& outline_rect, IBrush* brush, float width) { Validate(); - QuartzBrush* b = CheckPlatform(brush, GetPlatformIdUtf8()); + QuartzBrush* b = CheckPlatform(brush, GetPlatformId()); b->Select(cg_context_); SetLineWidth(width); @@ -106,7 +106,7 @@ void QuartzCGContextPainter::FillEllipse(const Rect& outline_rect, IBrush* brush) { Validate(); - QuartzBrush* b = CheckPlatform(brush, GetPlatformIdUtf8()); + QuartzBrush* b = CheckPlatform(brush, GetPlatformId()); b->Select(cg_context_); CGContextFillEllipseInRect(cg_context_, Convert(outline_rect)); } @@ -115,8 +115,8 @@ void QuartzCGContextPainter::StrokeGeometry(IGeometry* geometry, IBrush* brush, float width) { Validate(); - QuartzGeometry* g = CheckPlatform(geometry, GetPlatformIdUtf8()); - QuartzBrush* b = CheckPlatform(brush, GetPlatformIdUtf8()); + QuartzGeometry* g = CheckPlatform(geometry, GetPlatformId()); + QuartzBrush* b = CheckPlatform(brush, GetPlatformId()); b->Select(cg_context_); SetLineWidth(width); @@ -129,8 +129,8 @@ void QuartzCGContextPainter::StrokeGeometry(IGeometry* geometry, IBrush* brush, void QuartzCGContextPainter::FillGeometry(IGeometry* geometry, IBrush* brush) { Validate(); - QuartzGeometry* g = CheckPlatform(geometry, GetPlatformIdUtf8()); - QuartzBrush* b = CheckPlatform(brush, GetPlatformIdUtf8()); + QuartzGeometry* g = CheckPlatform(geometry, GetPlatformId()); + QuartzBrush* b = CheckPlatform(brush, GetPlatformId()); b->Select(cg_context_); CGContextBeginPath(cg_context_); @@ -142,7 +142,7 @@ void QuartzCGContextPainter::DrawText(const Point& offset, ITextLayout* text_layout, IBrush* brush) { Validate(); - auto tl = CheckPlatform(text_layout, GetPlatformIdUtf8()); + auto tl = CheckPlatform(text_layout, GetPlatformId()); Color color; @@ -169,7 +169,7 @@ void QuartzCGContextPainter::DrawText(const Point& offset, void QuartzCGContextPainter::DrawImage(const Point& offset, IImage* image) { Validate(); - auto i = CheckPlatform(image, GetPlatformIdUtf8()); + auto i = CheckPlatform(image, GetPlatformId()); auto cg_image = i->GetCGImage(); diff --git a/src/platform/graphics/quartz/TextLayout.cpp b/src/platform/graphics/quartz/TextLayout.cpp index 41a2f176..8c573c7a 100644 --- a/src/platform/graphics/quartz/TextLayout.cpp +++ b/src/platform/graphics/quartz/TextLayout.cpp @@ -31,7 +31,7 @@ OsxCTTextLayout::~OsxCTTextLayout() { } void OsxCTTextLayout::SetFont(std::shared_ptr font) { - font_ = CheckPlatform(font, GetPlatformIdUtf8()); + font_ = CheckPlatform(font, GetPlatformId()); RecreateFrame(); } -- cgit v1.2.3