summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libcamera/geometry.h5
-rw-r--r--src/libcamera/geometry.cpp7
2 files changed, 12 insertions, 0 deletions
diff --git a/include/libcamera/geometry.h b/include/libcamera/geometry.h
index a87d65d3..ec5ed2be 100644
--- a/include/libcamera/geometry.h
+++ b/include/libcamera/geometry.h
@@ -72,6 +72,11 @@ struct SizeRange {
{
}
+ SizeRange(unsigned int width, unsigned int height)
+ : min(width, height), max(width, height)
+ {
+ }
+
SizeRange(unsigned int minW, unsigned int minH,
unsigned int maxW, unsigned int maxH)
: min(minW, minH), max(maxW, maxH)
diff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp
index fb8f628a..26a05b9e 100644
--- a/src/libcamera/geometry.cpp
+++ b/src/libcamera/geometry.cpp
@@ -197,6 +197,13 @@ bool operator<(const Size &lhs, const Size &rhs)
*/
/**
+ * \fn SizeRange::SizeRange(unsigned int width, unsigned int height)
+ * \brief Construct a size range representing a single size
+ * \param[in] width The size width
+ * \param[in] height The size height
+ */
+
+/**
* \fn SizeRange::SizeRange(unsigned int minW, unsigned int minH,
* unsigned int maxW, unsigned int maxH)
* \brief Construct an initialized size range