diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-07-15 01:41:07 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-07-15 17:29:59 +0300 |
commit | 4f509caa8ed0166ef2e99846f12b7997a37c3a7e (patch) | |
tree | 5ff55b3f5a5948e3a0d00333143f71f1ce97f0a8 /src/libcamera/geometry.cpp | |
parent | 935aec66ae50ec2448e052c95757b2a83e3999ba (diff) |
libcamera: geometry: Give constructors to Rectangle
Rectangle, unlike Size, has no constructor, requiring the users to
explicitly initialize the instances. This is error-prone, add
constructors.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/geometry.cpp')
-rw-r--r-- | src/libcamera/geometry.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp index 5a0bcf7c..3a3784df 100644 --- a/src/libcamera/geometry.cpp +++ b/src/libcamera/geometry.cpp @@ -298,6 +298,28 @@ bool operator==(const SizeRange &lhs, const SizeRange &rhs) */ /** + * \fn Rectangle::Rectangle() + * \brief Construct a Rectangle with all coordinates set to 0 + */ + +/** + * \fn Rectangle::Rectangle(int x, int y, const Size &size) + * \brief Construct a Rectangle with the given position and size + * \param[in] x The horizontal coordinate of the top-left corner + * \param[in] y The vertical coordinate of the top-left corner + * \param[in] size The size + */ + +/** + * \fn Rectangle::Rectangle(int x, int y, unsigned int width, unsigned int height) + * \brief Construct a Rectangle with the given position and size + * \param[in] x The horizontal coordinate of the top-left corner + * \param[in] y The vertical coordinate of the top-left corner + * \param[in] width The width + * \param[in] height The height + */ + +/** * \var Rectangle::x * \brief The horizontal coordinate of the rectangle's top-left corner */ |