mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 08:35:07 +03:00
libcamera: geometry: Add Size structure
Add a simple Size structure that contains an image width and height. 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>
This commit is contained in:
parent
05a8608f1f
commit
289343a24a
2 changed files with 44 additions and 0 deletions
|
@ -105,4 +105,33 @@ const std::string Rectangle::toString() const
|
|||
* \brief The maximum image height
|
||||
*/
|
||||
|
||||
/**
|
||||
* \struct Size
|
||||
* \brief Describe a two-dimensional size
|
||||
*
|
||||
* The Size structure defines a two-dimensional size with integer precision.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn Size::Size()
|
||||
* \brief Construct a Size with width and height set to 0
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn Size::Size(unsigned int width, unsigned int height)
|
||||
* \brief Construct a Size with given \a width and \a height
|
||||
* \param width The Size width
|
||||
* \param height The Size height
|
||||
*/
|
||||
|
||||
/**
|
||||
* \var Size::width
|
||||
* \brief The Size width
|
||||
*/
|
||||
|
||||
/**
|
||||
* \var Size::height
|
||||
* \brief The Size height
|
||||
*/
|
||||
|
||||
} /* namespace libcamera */
|
||||
|
|
|
@ -40,6 +40,21 @@ struct SizeRange {
|
|||
unsigned int maxHeight;
|
||||
};
|
||||
|
||||
struct Size {
|
||||
Size()
|
||||
: Size(0, 0)
|
||||
{
|
||||
}
|
||||
|
||||
Size(unsigned int w, unsigned int h)
|
||||
: width(w), height(h)
|
||||
{
|
||||
}
|
||||
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
};
|
||||
|
||||
} /* namespace libcamera */
|
||||
|
||||
#endif /* __LIBCAMERA_GEOMETRY_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue