aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/graphics/SvgGeometryBuilderMixin.h
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-10-17 12:06:14 +0800
committerYuqian Yang <crupest@crupest.life>2025-10-17 12:06:14 +0800
commit32aa6f116acc6e3e20a1ec76cef45b29f7005ad7 (patch)
tree892b71060a88b58d9293d78033000b05818783df /include/cru/platform/graphics/SvgGeometryBuilderMixin.h
parentfaf77949e19dc0d01f75bf8abb783eda70328048 (diff)
downloadcru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.gz
cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.bz2
cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.zip
Remove String stage 1.
Diffstat (limited to 'include/cru/platform/graphics/SvgGeometryBuilderMixin.h')
-rw-r--r--include/cru/platform/graphics/SvgGeometryBuilderMixin.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/cru/platform/graphics/SvgGeometryBuilderMixin.h b/include/cru/platform/graphics/SvgGeometryBuilderMixin.h
index 32b665a5..586872b0 100644
--- a/include/cru/platform/graphics/SvgGeometryBuilderMixin.h
+++ b/include/cru/platform/graphics/SvgGeometryBuilderMixin.h
@@ -45,25 +45,24 @@ class CRU_PLATFORM_GRAPHICS_API SvgGeometryBuilderMixin
void CloseFigure(bool close) override;
- void ParseAndApplySvgPathData(StringView path_d) override;
+ void ParseAndApplySvgPathData(std::string_view path_d) override;
protected:
- String GetPathData() const { return current_; }
+ std::string GetPathData() const { return current_; }
private:
template <typename... Args>
- void Append(StringView format, Args&&... args) {
- current_ += String::FromUtf8(
- std::format(format.ToUtf8(), std::forward<Args>(args)...));
- current_ += u' ';
+ void Append(std::string_view format, Args&&... args) {
+ current_ += std::format(format, std::forward<Args>(args)...);
+ current_ += ' ';
}
- void AppendCommand(StringView command);
+ void AppendCommand(std::string_view command);
void Append(bool flag);
void Append(float number);
void Append(const Point& point);
private:
- String current_;
+ std::string current_;
};
} // namespace cru::platform::graphics