.. index:: 
  !DetectedFace.rotate Method
  
.. _id3_face_detected_face_rotate_class_method:

===============================================================================
DetectedFace.rotate Method
===============================================================================

Module: :ref:`DetectedFace<id3_face_detected_face_class>`

Definition
----------

Rotates the face object by a given angle in degrees from a given center.


.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        rotate(self, angle: int, center: Point) -> None

      **Parameters**

        .. line-block::

          ``angle`` int
          :guilabel:`in` Angle of the rotation to apply to the face object.

          ``center`` :ref:`Point<id3_face_point_struct>`
          :guilabel:`in` Center of the rotation to apply to the face object.


      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        void rotate(int angle, Point center)

      **Parameters**

        .. line-block::

          ``angle`` int
          :guilabel:`in` Angle of the rotation to apply to the face object.

          ``center`` :ref:`Point<id3_face_point_struct>`
          :guilabel:`in` Center of the rotation to apply to the face object.


      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: C#
      :sync: C#

      .. code:: C#

        public void Rotate(int angle, Point center)

      **Parameters**

        .. line-block::

          ``angle`` int
          :guilabel:`in` Angle of the rotation to apply to the face object.

          ``center`` :ref:`Point<id3_face_point_struct>`
          :guilabel:`in` Center of the rotation to apply to the face object.


      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        public void rotate(int angle, Point center) throws FaceException

      **Parameters**

        .. line-block::

          ``angle`` int
          :guilabel:`in` Angle of the rotation to apply to the face object.

          ``center`` :ref:`Point<id3_face_point_struct>`
          :guilabel:`in` Center of the rotation to apply to the face object.


      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        public func rotate(angle: Int32, center: Point) throws

      **Parameters**

        .. line-block::

          ``angle`` Int32
          :guilabel:`in` Angle of the rotation to apply to the face object.

          ``center`` :ref:`Point<id3_face_point_struct>`
          :guilabel:`in` Center of the rotation to apply to the face object.


      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: C
      :sync: C

      .. code:: C

        int id3DetectedFace_Rotate (
            ID3_DETECTED_FACE hDetectedFace, 
            int angle, 
            const id3FacePoint * sCenter)

      **Parameters**

        .. line-block::

          ``hDetectedFace`` :ref:`ID3_DETECTED_FACE<id3_face_detected_face_class>`
          :guilabel:`in` Handle to the DetectedFace object.

          ``angle`` int
          :guilabel:`in` Angle of the rotation to apply to the face object.

          ``sCenter`` :ref:`const id3FacePoint *<id3_face_point_struct>`
          :guilabel:`in` Center of the rotation to apply to the face object.


      **Returns**

        .. line-block::

          ``int``
          An error code.
          See :ref:`id3FaceError<id3_face_face_error_enum>` file for the list of possible error codes.


