summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/geometry.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/libcamera/geometry.h b/include/libcamera/geometry.h
index f3088d33..380248ac 100644
--- a/include/libcamera/geometry.h
+++ b/include/libcamera/geometry.h
@@ -127,6 +127,21 @@ static inline bool operator!=(const SizeRange &lhs, const SizeRange &rhs)
}
struct Rectangle {
+ Rectangle()
+ : Rectangle(0, 0, 0, 0)
+ {
+ }
+
+ Rectangle(int xpos, int ypos, const Size &size)
+ : x(xpos), y(ypos), width(size.width), height(size.height)
+ {
+ }
+
+ Rectangle(int xpos, int ypos, unsigned int w, unsigned int h)
+ : x(xpos), y(ypos), width(w), height(h)
+ {
+ }
+
int x;
int y;
unsigned int width;