diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-05-26 18:27:09 +0200 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-06-19 01:44:51 +0200 |
commit | 85a9b66134d48a4f805c77079599056492576b0b (patch) | |
tree | ef1f12ff31ffbb9a07eb294c6e732578c90ce988 /include | |
parent | c6090542cd4623d39ec9affb7d127ea188933890 (diff) |
libcamera: geometry: SizeRange: Add constructor for a single size
The SizeRange can describe a single size where min == max. Add a
constructor to help create such a description.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/geometry.h | 5 |
1 files changed, 5 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) |