.. index:: 
  !DocumentImage.rotate Method
  
.. _id3_document_document_image_rotate_class_method:

===============================================================================
DocumentImage.rotate Method
===============================================================================

Module: :ref:`DocumentImage<id3_document_document_image_class>`

Definition
----------

Rotates the image in-place to the specified angle.

.. note:: The rotation is performed counter-clockwise.


.. tab-set::

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

      .. code:: Python

        rotate(self, angle: int) -> None

      **Parameters**

        .. line-block::

          ``angle`` int
          :guilabel:`in` The rotation angle, in degree. Supported values are [0, 90, 180, 270].


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


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

      .. code:: Dart

        void rotate(int angle)

      **Parameters**

        .. line-block::

          ``angle`` int
          :guilabel:`in` The rotation angle, in degree. Supported values are [0, 90, 180, 270].


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


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

      .. code:: C#

        public void Rotate(int angle)

      **Parameters**

        .. line-block::

          ``angle`` int
          :guilabel:`in` The rotation angle, in degree. Supported values are [0, 90, 180, 270].


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


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

      .. code:: Java

        public void rotate(int angle) throws DocumentException

      **Parameters**

        .. line-block::

          ``angle`` int
          :guilabel:`in` The rotation angle, in degree. Supported values are [0, 90, 180, 270].


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


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

      .. code:: Swift

        public func rotate(angle: Int32) throws

      **Parameters**

        .. line-block::

          ``angle`` Int32
          :guilabel:`in` The rotation angle, in degree. Supported values are [0, 90, 180, 270].


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


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

      .. code:: C

        int id3DocumentImage_Rotate (
            ID3_DOCUMENT_IMAGE hDocumentImage, 
            int angle)

      **Parameters**

        .. line-block::

          ``hDocumentImage`` :ref:`ID3_DOCUMENT_IMAGE<id3_document_document_image_class>`
          :guilabel:`in` Handle to the DocumentImage object.

          ``angle`` int
          :guilabel:`in` The rotation angle, in degree. Supported values are [0, 90, 180, 270].


      **Returns**

        .. line-block::

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


