aboutsummaryrefslogtreecommitdiff
path: root/src/engine/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/graphics')
-rw-r--r--src/engine/graphics/matrix.hpp2
-rw-r--r--src/engine/graphics/matrix_impl.hpp6
2 files changed, 8 insertions, 0 deletions
diff --git a/src/engine/graphics/matrix.hpp b/src/engine/graphics/matrix.hpp
index 58905ee..5964f0f 100644
--- a/src/engine/graphics/matrix.hpp
+++ b/src/engine/graphics/matrix.hpp
@@ -32,6 +32,8 @@ public:
[[nodiscard]] auto get_column_cnt() const noexcept -> std::uint32_t override;
+ [[nodiscard]] auto get_size() const noexcept -> Bounds override;
+
[[nodiscard]] auto begin() const noexcept -> MatrixIterator<Element> override;
[[nodiscard]] auto end() const noexcept -> MatrixIterator<Element> override;
diff --git a/src/engine/graphics/matrix_impl.hpp b/src/engine/graphics/matrix_impl.hpp
index 9105149..d2de795 100644
--- a/src/engine/graphics/matrix_impl.hpp
+++ b/src/engine/graphics/matrix_impl.hpp
@@ -82,6 +82,12 @@ auto Matrix<Element>::get_column_cnt() const noexcept -> std::uint32_t
}
template <typename Element>
+auto Matrix<Element>::get_size() const noexcept -> Bounds
+{
+ return Bounds({.width = _column_cnt, .height = _row_cnt});
+}
+
+template <typename Element>
auto Matrix<Element>::begin() const noexcept -> MatrixIterator<Element>
{
return MatrixIterator(_matrix, _column_cnt);