.. index:: 
  !DetectedFace.translate Method
  
.. _id3_face_detected_face_translate_class_method:

===============================================================================
DetectedFace.translate Method
===============================================================================

Module: :ref:`DetectedFace<id3_face_detected_face_class>`

Definition
----------

Translates the face object.


.. tab-set::

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

      .. code:: Python

        translate(self, tx: int, ty: int) -> None

      **Parameters**

        .. line-block::

          ``tx`` int
          :guilabel:`in` Translation to apply to the face object alongside the x-axis.

          ``ty`` int
          :guilabel:`in` Translation to apply to the face object alongside the y-axis.


      **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 translate(int tx, int ty)

      **Parameters**

        .. line-block::

          ``tx`` int
          :guilabel:`in` Translation to apply to the face object alongside the x-axis.

          ``ty`` int
          :guilabel:`in` Translation to apply to the face object alongside the y-axis.


      **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 Translate(int tx, int ty)

      **Parameters**

        .. line-block::

          ``tx`` int
          :guilabel:`in` Translation to apply to the face object alongside the x-axis.

          ``ty`` int
          :guilabel:`in` Translation to apply to the face object alongside the y-axis.


      **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 translate(int tx, int ty) throws FaceException

      **Parameters**

        .. line-block::

          ``tx`` int
          :guilabel:`in` Translation to apply to the face object alongside the x-axis.

          ``ty`` int
          :guilabel:`in` Translation to apply to the face object alongside the y-axis.


      **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 translate(tx: Int32, ty: Int32) throws

      **Parameters**

        .. line-block::

          ``tx`` Int32
          :guilabel:`in` Translation to apply to the face object alongside the x-axis.

          ``ty`` Int32
          :guilabel:`in` Translation to apply to the face object alongside the y-axis.


      **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_Translate (
            ID3_DETECTED_FACE hDetectedFace, 
            int tx, 
            int ty)

      **Parameters**

        .. line-block::

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

          ``tx`` int
          :guilabel:`in` Translation to apply to the face object alongside the x-axis.

          ``ty`` int
          :guilabel:`in` Translation to apply to the face object alongside the y-axis.


      **Returns**

        .. line-block::

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


