diff options
| author | crupest <crupest@outlook.com> | 2023-10-12 20:10:07 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2023-10-12 20:10:07 +0800 |
| commit | ab484b2f0a8541cc5c5a172e4f5ea2620d91c8ba (patch) | |
| tree | e69c02dd76350c17fb9645c216ec2bae69da6c21 /include/cru/platform/GraphicsBase.h | |
| parent | 8739c5d1c544015d0a7e998859a78d4ac3afc8b9 (diff) | |
| download | cru-ab484b2f0a8541cc5c5a172e4f5ea2620d91c8ba.tar.gz cru-ab484b2f0a8541cc5c5a172e4f5ea2620d91c8ba.tar.bz2 cru-ab484b2f0a8541cc5c5a172e4f5ea2620d91c8ba.zip | |
SvgGeometryBuilder done!
Diffstat (limited to 'include/cru/platform/GraphicsBase.h')
| -rw-r--r-- | include/cru/platform/GraphicsBase.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/include/cru/platform/GraphicsBase.h b/include/cru/platform/GraphicsBase.h index f134e74d..88dc6ee2 100644 --- a/include/cru/platform/GraphicsBase.h +++ b/include/cru/platform/GraphicsBase.h @@ -5,11 +5,7 @@ #include "cru/common/Range.h" #include "cru/common/String.h" -#include <cstdint> #include <limits> -#include <optional> -#include <string> -#include <utility> namespace cru::platform { struct Size; @@ -47,10 +43,6 @@ constexpr bool operator!=(const Point& left, const Point& right) { return !(left == right); } -inline String ToString(const Point& point) { - return Format(u"(x: {}, y: {})", point.x, point.y); -} - struct CRU_PLATFORM_API Size final { static const Size kMax; static const Size kZero; @@ -88,10 +80,6 @@ constexpr bool operator!=(const Size& left, const Size& right) { return !(left == right); } -inline String ToString(const Size& size) { - return Format(u"(width: {}, height: {})", size.width, size.height); -} - struct Thickness final { constexpr Thickness() : Thickness(0) {} @@ -290,3 +278,14 @@ constexpr bool operator!=(const Ellipse& left, const Ellipse& right) { using TextRange = Range; } // namespace cru::platform + +namespace cru { + +inline String ToString(const platform::Point& point) { + return Format(u"(x: {}, y: {})", point.x, point.y); +} +inline String ToString(const platform::Size& size) { + return Format(u"(width: {}, height: {})", size.width, size.height); +} + +} // namespace cru |
