8 #ifndef __LIBCAMERA_TRANSFORM_H__ 9 #define __LIBCAMERA_TRANSFORM_H__ 20 HVFlip = HFlip | VFlip,
23 Rot270 = HFlip | Transpose,
24 Rot90 = VFlip | Transpose,
25 Rot180Transpose = HFlip | VFlip | Transpose
30 return static_cast<Transform>(
static_cast<int>(t0) & static_cast<int>(t1));
35 return static_cast<Transform>(
static_cast<int>(t0) | static_cast<int>(t1));
40 return static_cast<Transform>(
static_cast<int>(t0) ^ static_cast<int>(t1));
64 return t == Transform::Identity;
69 return static_cast<Transform>(~static_cast<
int>(t) & 7);
constexpr Transform & operator &=(Transform &t0, Transform t1)
Apply bitwise AND-assignment operator between the bits in the two transforms.
Definition: transform.h:43
Transform transformFromRotation(int angle, bool *success=nullptr)
Return the transform representing a rotation of the given angle clockwise.
Definition: transform.cpp:276
constexpr Transform & operator|=(Transform &t0, Transform t1)
Apply bitwise OR-assignment operator between the bits in the two transforms.
Definition: transform.h:48
constexpr Transform operator|(Transform t0, Transform t1)
Apply bitwise OR operator between the bits in the two transforms.
Definition: transform.h:33
Transform operator*(Transform t0, Transform t1)
Compose two transforms together.
Definition: transform.cpp:207
constexpr Transform operator &(Transform t0, Transform t1)
Apply bitwise AND operator between the bits in the two transforms.
Definition: transform.h:28
Top-level libcamera namespace.
Definition: bound_method.h:15
Transform
Enum to represent a 2D plane transform.
Definition: transform.h:15
constexpr Transform operator~(Transform t)
Return the transform with all the bits inverted individually.
Definition: transform.h:67
constexpr bool operator!(Transform t)
Return true if the transform is the Identity, otherwise false
Definition: transform.h:62
constexpr Transform operator^(Transform t0, Transform t1)
Apply bitwise XOR operator between the bits in the two transforms.
Definition: transform.h:38
constexpr Transform & operator^=(Transform &t0, Transform t1)
Apply bitwise XOR-assignment operator between the bits in the two transforms.
Definition: transform.h:53
const char * transformToString(Transform t)
Return a character string describing the transform.
Definition: transform.cpp:306
Transform operator-(Transform t)
Invert a transform.
Definition: transform.cpp:233