8 #ifndef __LIBCAMERA_GEOMETRY_H__ 9 #define __LIBCAMERA_GEOMETRY_H__ 36 Size(
unsigned int w,
unsigned int h)
51 static inline bool operator!=(
const Size &lhs,
const Size &rhs)
56 static inline bool operator<=(
const Size &lhs,
const Size &rhs)
58 return lhs < rhs || lhs == rhs;
61 static inline bool operator>(
const Size &lhs,
const Size &rhs)
66 static inline bool operator>=(
const Size &lhs,
const Size &rhs)
80 : min(size), max(size), hStep(1), vStep(1)
85 : min(minSize), max(maxSize), hStep(1), vStep(1)
90 unsigned int hstep,
unsigned int vstep)
91 : min(minSize), max(maxSize), hStep(hstep), vStep(vstep)
95 bool contains(
const Size &size)
const;
108 return !(lhs == rhs);
bool operator==(const Rectangle &lhs, const Rectangle &rhs)
Compare rectangles for equality.
Definition: geometry.cpp:69
unsigned int width
The distance between the left and right sides.
Definition: geometry.h:18
unsigned int vStep
The vertical step.
Definition: geometry.h:102
SizeRange(const Size &size)
Construct a size range representing a single size.
Definition: geometry.h:79
Definition: bound_method.h:15
unsigned int hStep
The horizontal step.
Definition: geometry.h:101
Size(unsigned int w, unsigned int h)
Construct a Size with given width and height.
Definition: geometry.h:36
SizeRange(const Size &minSize, const Size &maxSize, unsigned int hstep, unsigned int vstep)
Construct a size range with specified min, max and step.
Definition: geometry.h:89
unsigned int height
The Size height.
Definition: geometry.h:42
Size()
Construct a Size with width and height set to 0.
Definition: geometry.h:31
Describe a two-dimensional size.
Definition: geometry.h:30
SizeRange()
Construct a size range initialized to 0.
Definition: geometry.h:74
int x
The horizontal coordinate of the rectangle's top-left corner.
Definition: geometry.h:16
unsigned int width
The Size width.
Definition: geometry.h:41
Describe a rectangle's position and dimensions.
Definition: geometry.h:15
bool operator<(const Size &lhs, const Size &rhs)
Compare sizes for smaller than order.
Definition: geometry.cpp:145
Size min
The minimum size.
Definition: geometry.h:99
const std::string toString() const
Assemble and return a string describing the rectangle.
Definition: geometry.cpp:56
int y
The vertical coordinate of the rectangle's top-left corner.
Definition: geometry.h:17
bool isNull() const
Check if the size is null.
Definition: geometry.h:44
SizeRange(const Size &minSize, const Size &maxSize)
Construct a size range with specified min and max, and steps of 1.
Definition: geometry.h:84
Describe a range of sizes.
Definition: geometry.h:71
Size max
The maximum size.
Definition: geometry.h:100
unsigned int height
The distance between the top and bottom sides.
Definition: geometry.h:19