libcamera: Add transpose() function to size
Add a transpose() function to size that applies the Transformation::Transpose operation in the size. This is useful when handling orientation adjustments. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
@@ -108,6 +108,12 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
Size &transpose()
|
||||
{
|
||||
std::swap(width, height);
|
||||
return *this;
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr Size alignedDownTo(unsigned int hAlignment,
|
||||
unsigned int vAlignment) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user