Describe a two-dimensional size.
More...
Describe a two-dimensional size.
The Size structure defines a two-dimensional size with integer precision.
◆ Size()
libcamera::Size::Size |
( |
unsigned int |
width, |
|
|
unsigned int |
height |
|
) |
| |
|
inline |
Construct a Size with given width and height.
- Parameters
-
[in] | width | The Size width |
[in] | height | The Size height |
◆ alignedDownTo()
libcamera::Size::alignedDownTo |
( |
unsigned int |
hAlignment, |
|
|
unsigned int |
vAlignment |
|
) |
| const |
|
inline |
Align the size down horizontally and vertically.
- Parameters
-
[in] | hAlignment | Horizontal alignment |
[in] | vAlignment | Vertical alignment |
- Returns
- A Size whose width and height are equal to the width and height of this size rounded down to the nearest multiple of hAlignment and vAlignment respectively
◆ alignedUpTo()
libcamera::Size::alignedUpTo |
( |
unsigned int |
hAlignment, |
|
|
unsigned int |
vAlignment |
|
) |
| const |
|
inline |
Align the size up horizontally and vertically.
- Parameters
-
[in] | hAlignment | Horizontal alignment |
[in] | vAlignment | Vertical alignment |
- Returns
- A Size whose width and height are equal to the width and height of this size rounded up to the nearest multiple of hAlignment and vAlignment respectively
◆ boundedTo()
libcamera::Size::boundedTo |
( |
const Size & |
bound | ) |
const |
|
inline |
Bound the size to bound.
- Parameters
-
[in] | bound | The maximum size |
- Returns
- A Size whose width and height are the minimum of the width and height of this size and the bound size
◆ expandedTo()
libcamera::Size::expandedTo |
( |
const Size & |
expand | ) |
const |
|
inline |
Expand the size to expand.
- Parameters
-
[in] | expand | The minimum size |
- Returns
- A Size whose width and height are the maximum of the width and height of this size and the expand size
◆ isNull()
bool libcamera::Size::isNull |
( |
| ) |
const |
|
inline |
Check if the size is null.
- Returns
- True if both the width and height are 0, or false otherwise
◆ toString()
const std::string libcamera::Size::toString |
( |
| ) |
const |
Assemble and return a string describing the size.
- Returns
- A string describing the size
The documentation for this struct was generated from the following files:
- include/libcamera/geometry.h
- src/libcamera/geometry.cpp