[libcamera-devel] libcamera: transform: Document Transform enumerators as such
diff mbox series

Message ID 20210704130546.21396-1-laurent.pinchart@ideasonboard.com
State Accepted
Commit fb970d9cde339b89971465b854945798c27db7bf
Delegated to: Laurent Pinchart
Headers show
Series
  • [libcamera-devel] libcamera: transform: Document Transform enumerators as such
Related show

Commit Message

Laurent Pinchart July 4, 2021, 1:05 p.m. UTC
Due to a bug in Doxygen that didn't properly handle enum class
enumerators when defined in a namespace, the Transform enumerators were
documented with free-formed text.

The issue has been fixed in Doxygen commit 309b397be106 ("issue #8281:
Out-of-line documentation of scoped enums in the same namespace"). We
can now fix the documentation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/libcamera/transform.cpp | 38 ++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

Comments

David Plowman July 5, 2021, 11:22 a.m. UTC | #1
Hi Laurent

Thanks for fixing this, I remember scratching my head over it at the
time. I'm glad Doxygen have finally sorted out the problem!

On Sun, 4 Jul 2021 at 14:06, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Due to a bug in Doxygen that didn't properly handle enum class
> enumerators when defined in a namespace, the Transform enumerators were
> documented with free-formed text.
>
> The issue has been fixed in Doxygen commit 309b397be106 ("issue #8281:
> Out-of-line documentation of scoped enums in the same namespace"). We
> can now fix the documentation.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: David Plowman <david.plowman@raspberrypi.com>

> ---
>  src/libcamera/transform.cpp | 38 ++++++++++++++++++-------------------
>  1 file changed, 19 insertions(+), 19 deletions(-)
>
> diff --git a/src/libcamera/transform.cpp b/src/libcamera/transform.cpp
> index f3e37f313041..99a043ba14d3 100644
> --- a/src/libcamera/transform.cpp
> +++ b/src/libcamera/transform.cpp
> @@ -43,7 +43,15 @@ namespace libcamera {
>   * couple of them have additional synonyms for convenience). We illustrate each
>   * with its nominal effect on a rectangle with vertices labelled A, B, C and D.
>   *
> - * **Identity**
> + * \sa https://en.wikipedia.org/wiki/Examples_of_groups#dihedral_group_of_order_8
> + *
> + * The set of 2D plane transforms is also known as the symmetry group of a
> + * square, described in the link. Note that the group can be generated by
> + * only 2 elements (the horizontal flip and a 90 degree rotation, for
> + * example), however, the encoding used here makes the presence of the vertical
> + * flip explicit.
> + *
> + * \var Transform::Identity
>   *
>   * Identity transform.
>  ~~~
> @@ -53,11 +61,11 @@ Input image   | |   goes to output image   | |
>  ~~~
>   * Numeric value: 0 (no bits set).
>   *
> - * **Rot0**
> + * \var Transform::Rot0
>   *
> - * Synonym for `Identity` (zero degree rotation).
> + * Synonym for Transform::Identity (zero degree rotation).
>   *
> - * **HFlip**
> + * \var Transform::HFlip
>   *
>   * Horizontal flip.
>  ~~~
> @@ -67,7 +75,7 @@ Input image   | |   goes to output image   | |
>  ~~~
>   * Numeric value: 1 (horizontal flip bit set only).
>   *
> - * **VFlip**
> + * \var Transform::VFlip
>   *
>   * Vertical flip.
>  ~~~
> @@ -77,7 +85,7 @@ Input image   | |   goes to output image   | |
>  ~~~
>   * Numeric value: 2 (vertical flip bit set only).
>   *
> - * **HVFlip**
> + * \var Transform::HVFlip
>   *
>   * Horizontal and vertical flip (identical to a 180 degree rotation).
>  ~~~
> @@ -87,11 +95,11 @@ Input image   | |   goes to output image   | |
>  ~~~
>   * Numeric value: 3 (horizontal and vertical flip bits set).
>   *
> - * **Rot180**
> + * \var Transform::Rot180
>   *
>   * Synonym for `HVFlip` (180 degree rotation).
>   *
> - * **Transpose**
> + * \var Transform::Transpose
>   *
>   * Transpose (about the main diagonal).
>  ~~~
> @@ -101,7 +109,7 @@ Input image   | |   goes to output image   | |
>  ~~~
>   * Numeric value: 4 (transpose bit set only).
>   *
> - * **Rot270**
> + * \var Transform::Rot270
>   *
>   * Rotation by 270 degrees clockwise (90 degrees anticlockwise).
>  ~~~
> @@ -111,7 +119,7 @@ Input image   | |   goes to output image   | |
>  ~~~
>   * Numeric value: 5 (transpose and horizontal flip bits set).
>   *
> - * **Rot90**
> + * \var Transform::Rot90
>   *
>   * Rotation by 90 degrees clockwise (270 degrees anticlockwise).
>  ~~~
> @@ -121,7 +129,7 @@ Input image   | |   goes to output image   | |
>  ~~~
>   * Numeric value: 6 (transpose and vertical flip bits set).
>   *
> - * **Rot180Transpose**
> + * \var Transform::Rot180Transpose
>   *
>   * Rotation by 180 degrees followed by transpose (alternatively, transposition
>   * about the "opposite diagonal").
> @@ -131,14 +139,6 @@ Input image   | |   goes to output image   | |
>                C-D                          C-A
>  ~~~
>   * Numeric value: 7 (all bits set).
> - *
> - * \sa https://en.wikipedia.org/wiki/Examples_of_groups#dihedral_group_of_order_8
> - *
> - * The set of 2D plane transforms is also known as the symmetry group of a
> - * square, described in the link. Note that the group can be generated by
> - * only 2 elements (the horizontal flip and a 90 degree rotation, for
> - * example), however, the encoding used here makes the presence of the vertical
> - * flip explicit.
>   */
>
>  /**
> --
> Regards,
>
> Laurent Pinchart
>

Patch
diff mbox series

diff --git a/src/libcamera/transform.cpp b/src/libcamera/transform.cpp
index f3e37f313041..99a043ba14d3 100644
--- a/src/libcamera/transform.cpp
+++ b/src/libcamera/transform.cpp
@@ -43,7 +43,15 @@  namespace libcamera {
  * couple of them have additional synonyms for convenience). We illustrate each
  * with its nominal effect on a rectangle with vertices labelled A, B, C and D.
  *
- * **Identity**
+ * \sa https://en.wikipedia.org/wiki/Examples_of_groups#dihedral_group_of_order_8
+ *
+ * The set of 2D plane transforms is also known as the symmetry group of a
+ * square, described in the link. Note that the group can be generated by
+ * only 2 elements (the horizontal flip and a 90 degree rotation, for
+ * example), however, the encoding used here makes the presence of the vertical
+ * flip explicit.
+ *
+ * \var Transform::Identity
  *
  * Identity transform.
 ~~~
@@ -53,11 +61,11 @@  Input image   | |   goes to output image   | |
 ~~~
  * Numeric value: 0 (no bits set).
  *
- * **Rot0**
+ * \var Transform::Rot0
  *
- * Synonym for `Identity` (zero degree rotation).
+ * Synonym for Transform::Identity (zero degree rotation).
  *
- * **HFlip**
+ * \var Transform::HFlip
  *
  * Horizontal flip.
 ~~~
@@ -67,7 +75,7 @@  Input image   | |   goes to output image   | |
 ~~~
  * Numeric value: 1 (horizontal flip bit set only).
  *
- * **VFlip**
+ * \var Transform::VFlip
  *
  * Vertical flip.
 ~~~
@@ -77,7 +85,7 @@  Input image   | |   goes to output image   | |
 ~~~
  * Numeric value: 2 (vertical flip bit set only).
  *
- * **HVFlip**
+ * \var Transform::HVFlip
  *
  * Horizontal and vertical flip (identical to a 180 degree rotation).
 ~~~
@@ -87,11 +95,11 @@  Input image   | |   goes to output image   | |
 ~~~
  * Numeric value: 3 (horizontal and vertical flip bits set).
  *
- * **Rot180**
+ * \var Transform::Rot180
  *
  * Synonym for `HVFlip` (180 degree rotation).
  *
- * **Transpose**
+ * \var Transform::Transpose
  *
  * Transpose (about the main diagonal).
 ~~~
@@ -101,7 +109,7 @@  Input image   | |   goes to output image   | |
 ~~~
  * Numeric value: 4 (transpose bit set only).
  *
- * **Rot270**
+ * \var Transform::Rot270
  *
  * Rotation by 270 degrees clockwise (90 degrees anticlockwise).
 ~~~
@@ -111,7 +119,7 @@  Input image   | |   goes to output image   | |
 ~~~
  * Numeric value: 5 (transpose and horizontal flip bits set).
  *
- * **Rot90**
+ * \var Transform::Rot90
  *
  * Rotation by 90 degrees clockwise (270 degrees anticlockwise).
 ~~~
@@ -121,7 +129,7 @@  Input image   | |   goes to output image   | |
 ~~~
  * Numeric value: 6 (transpose and vertical flip bits set).
  *
- * **Rot180Transpose**
+ * \var Transform::Rot180Transpose
  *
  * Rotation by 180 degrees followed by transpose (alternatively, transposition
  * about the "opposite diagonal").
@@ -131,14 +139,6 @@  Input image   | |   goes to output image   | |
               C-D                          C-A
 ~~~
  * Numeric value: 7 (all bits set).
- *
- * \sa https://en.wikipedia.org/wiki/Examples_of_groups#dihedral_group_of_order_8
- *
- * The set of 2D plane transforms is also known as the symmetry group of a
- * square, described in the link. Note that the group can be generated by
- * only 2 elements (the horizontal flip and a 90 degree rotation, for
- * example), however, the encoding used here makes the presence of the vertical
- * flip explicit.
  */
 
 /**