summaryrefslogtreecommitdiff
path: root/src/libcamera/geometry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/geometry.cpp')
-rw-r--r--src/libcamera/geometry.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp
index b6b6592b..6dc8e74d 100644
--- a/src/libcamera/geometry.cpp
+++ b/src/libcamera/geometry.cpp
@@ -5,6 +5,8 @@
* geometry.cpp - Geometry-related structures
*/
+#include <sstream>
+
#include "geometry.h"
/**
@@ -47,6 +49,20 @@ namespace libcamera {
*/
/**
+ * \brief Assemble and return a string describing the rectangle
+ *
+ * \return A string describing the Rectangle
+ */
+const std::string Rectangle::toString() const
+{
+ std::stringstream ss;
+
+ ss << "(" << x << "x" << y << ")/" << w << "x" << h;
+
+ return ss.str();
+}
+
+/**
* \struct SizeRange
* \brief Describe a range of image sizes
*