Age | Commit message (Collapse) | Author |
|
It's common for code to check if a rectangle is null. Add a helper function
to do so and test the function in test/geometry.cpp
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
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>
|
|
Pipeline handlers commonly have to calculate the minimum or maximum of
multiple sizes, or align a size's width and height. Add helper functions
to the Size class to perform those tasks.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|
|
It's common for code to check if a size is null. Add a helper function
to do so.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|
|
Add a test that exercises all the comparison operators for the Size
class.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|