.. include:: ../substitutions

.. oe:namespace:: OEDepict

.. meta::
   :keywords: OEOffsetMolDisplay

.. _OEDepict_OEOffsetMolDisplay:


.. oe:function:: OEOffsetMolDisplay


   .. oe:language:: c++ java csharp

      .. oe:api::

         void OEOffsetMolDisplay(OE2DMolDisplay& disp, const OE2DPoint& offset)
         void OEOffsetMolDisplay(OE2DMolDisplay& disp,
                                 const OE2DMolDisplay& refdisp)

   .. oe:language:: python

      .. oe:api:: python

         OEOffsetMolDisplay(disp: OE2DMolDisplay, offset: OE2DPoint) -> None
         OEOffsetMolDisplay(disp: OE2DMolDisplay, refdisp: OE2DMolDisplay) -> None

   When an :ref:`OE2DMolDisplay <OEDepict_OE2DMolDisplay>` object is created, the
   depicted molecule is positioned in the middle of the *canvas*.
   The :oe:func:`OEDepict::OEOffsetMolDisplay` function can be used to
   translate the depicted molecule either by specifying an *offset*
   vector or another :ref:`OE2DMolDisplay <OEDepict_OE2DMolDisplay>` object that is
   used as a reference that defines the translation.

   .. figure:: ../images/OEOffsetMolDisplay.*
      :align:  center

      **Example of translating the depiction of a molecule by using
      offset vector (red arrows)**
