aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/GraphicsBase.h
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-12-14 20:46:18 +0800
committerYuqian Yang <crupest@crupest.life>2025-12-14 20:46:18 +0800
commit3b6a59e7f163b2d2f8a07ae187b392f71b074cc4 (patch)
treeb9d3063c35a46148e1bb3c5d4a68d99c705d747b /include/cru/platform/GraphicsBase.h
parentabc02cfae45c86519a795da6d14d8c85d57ae6f5 (diff)
downloadcru-3b6a59e7f163b2d2f8a07ae187b392f71b074cc4.tar.gz
cru-3b6a59e7f163b2d2f8a07ae187b392f71b074cc4.tar.bz2
cru-3b6a59e7f163b2d2f8a07ae187b392f71b074cc4.zip
Use infinite size for 0 size window.
Diffstat (limited to 'include/cru/platform/GraphicsBase.h')
-rw-r--r--include/cru/platform/GraphicsBase.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/include/cru/platform/GraphicsBase.h b/include/cru/platform/GraphicsBase.h
index 78a1c1a6..0c391b11 100644
--- a/include/cru/platform/GraphicsBase.h
+++ b/include/cru/platform/GraphicsBase.h
@@ -1,6 +1,4 @@
#pragma once
-#include "Base.h"
-
#include <cru/base/Range.h>
#include <cru/base/StringUtil.h>
@@ -42,9 +40,6 @@ constexpr Point operator-(const Point& left, const Point& right) {
}
struct Size final {
- static CRU_PLATFORM_API const Size kMax;
- static CRU_PLATFORM_API const Size kZero;
-
constexpr Size() = default;
constexpr Size(const float width, const float height)
: width(width), height(height) {}
@@ -64,7 +59,7 @@ struct Size final {
return {std::max(width, other.width), std::max(height, other.height)};
}
- constexpr Size AtLeast0() const { return Max(kZero); }
+ constexpr Size AtLeast0() const { return this->Max({}); }
std::string ToString() const {
return std::format("Size(width: {}, height: {})", width, height);