summaryrefslogtreecommitdiff
path: root/include/SFML/Graphics/Rect.inl
diff options
context:
space:
mode:
Diffstat (limited to 'include/SFML/Graphics/Rect.inl')
-rw-r--r--include/SFML/Graphics/Rect.inl14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/SFML/Graphics/Rect.inl b/include/SFML/Graphics/Rect.inl
index 7a82e46..604ad59 100644
--- a/include/SFML/Graphics/Rect.inl
+++ b/include/SFML/Graphics/Rect.inl
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
+// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
@@ -141,6 +141,18 @@ bool Rect<T>::intersects(const Rect<T>& rectangle, Rect<T>& intersection) const
}
}
+template <typename T>
+sf::Vector2<T> Rect<T>::getPosition() const
+{
+ return sf::Vector2<T>(left, top);
+}
+
+template <typename T>
+sf::Vector2<T> Rect<T>::getSize() const
+{
+ return sf::Vector2<T>(width, height);
+}
+
////////////////////////////////////////////////////////////
template <typename T>