summaryrefslogtreecommitdiff
path: root/src/libcamera/include/geometry.h
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-03-22 13:01:49 +0100
committerJacopo Mondi <jacopo@jmondi.org>2019-04-02 11:02:38 +0200
commita20182310dc7d2ad56cf208269a05206580a9a94 (patch)
treeaf8b2cf7b12c4730560c778493dbd8e438f0f18f /src/libcamera/include/geometry.h
parent8dcd871fec82270c3bd8f0d0d02f39a9cb2ffc14 (diff)
libcamera: geometry: Add toString to Rectangle
Add toString() helpers to pretty print out the sizes of a Rectangle. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/include/geometry.h')
-rw-r--r--src/libcamera/include/geometry.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcamera/include/geometry.h b/src/libcamera/include/geometry.h
index eadc4ed4..b14f9732 100644
--- a/src/libcamera/include/geometry.h
+++ b/src/libcamera/include/geometry.h
@@ -8,6 +8,8 @@
#ifndef __LIBCAMERA_GEOMETRY_H__
#define __LIBCAMERA_GEOMETRY_H__
+#include <string>
+
namespace libcamera {
struct Rectangle {
@@ -15,6 +17,8 @@ struct Rectangle {
int y;
unsigned int w;
unsigned int h;
+
+ const std::string toString() const;
};
struct SizeRange {