From 250577878bff825516ea5a942aea1b3339acb15c Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Thu, 19 Oct 2023 16:01:26 +0200 Subject: libcamera: transform: Add functions to convert Orientation Add two helper functions to the transform.cpp file that allows to convert to and from an Orientation. Signed-off-by: Jacopo Mondi Reviewed-by: David Plowman Signed-off-by: Laurent Pinchart --- include/libcamera/transform.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/libcamera/transform.h b/include/libcamera/transform.h index 2a6838c7..14f1db0e 100644 --- a/include/libcamera/transform.h +++ b/include/libcamera/transform.h @@ -11,6 +11,8 @@ namespace libcamera { +enum class Orientation; + enum class Transform : int { Identity = 0, Rot0 = Identity, @@ -69,6 +71,8 @@ constexpr Transform operator~(Transform t) } Transform transformFromRotation(int angle, bool *success = nullptr); +Transform transformFromOrientation(const Orientation &orientation); +Orientation transformToOrientation(const Transform &transform); const char *transformToString(Transform t); -- cgit v1.2.1