diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-07-15 12:55:17 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-07-15 17:33:54 +0300 |
commit | d5446e9f327ab4eaef38249b0907f11fbf52be45 (patch) | |
tree | b04b44b87a90f260e536d6b655ef82ca03f5427d /src/qcam/assets/feathericons/upload-cloud.svg | |
parent | b5f3b9915ca8bc049e1eec3e918c234330991a0e (diff) |
libcamera: geometry: Provide in-place versions of the Size helpers
Add alignDownTo(), alignUpTo(), boundTo() and expandTo() helper
functions to the Size class. These are in-place versions of the existing
alignedDownTo(), alignedUpTo(), boundedTo() and expandedTo() functions.
The new helpers return a reference to the size, to allow chaining the
functions. One can thus write
size.alignDownTo(16, 16).alignUpTo(32, 32)
.boundTo({ 40, 80 }).expandTo({ 16, 80 });
instead of
size.alignDownTo(16, 16);
size.alignUpTo(32, 32);
size.boundTo({ 40, 80 });
size.expandTo({ 16, 80 });
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/qcam/assets/feathericons/upload-cloud.svg')
0 files changed, 0 insertions, 0 deletions