From f246877698e5b9aa98e99f3fd3d2247998008695 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 29 Sep 2021 20:45:36 +0800 Subject: ... --- include/cru/platform/GraphicsBase.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/cru/platform') diff --git a/include/cru/platform/GraphicsBase.hpp b/include/cru/platform/GraphicsBase.hpp index e7201ec0..aee718a1 100644 --- a/include/cru/platform/GraphicsBase.hpp +++ b/include/cru/platform/GraphicsBase.hpp @@ -182,6 +182,11 @@ struct Rect final { return Point(left + width / 2.0f, top + height / 2.0f); } + constexpr void SetSize(const Size& size) { + width = size.width; + height = size.height; + } + constexpr Size GetSize() const { return Size(width, height); } constexpr Rect Expand(const Thickness& thickness) const { -- cgit v1.2.3