.. include:: ../substitutions

.. oe:namespace:: OEGrapheme

.. meta::
   :keywords: OEGetNearestAtom

.. oe:function:: OEGetNearestAtom

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

      .. oe:api::

         OEDepict::OENearestAtom OEGetNearestAtom(const OE2DActiveSiteDisplay& disp,
                                                  const OEDepict::OE2DPoint& point)

   .. oe:language:: python

      .. oe:api:: python

         OEGetNearestAtom(disp: OE2DActiveSiteDisplay, p: OE2DPoint) -> OENearestAtom

   Returns an :ref:`OENearestAtom <OEDepict_OENearestAtom>` object that stores a pointer
   of the atom which is depicted nearest to a given 2D display coordinates.

   *disp*
      The :ref:`OE2DActiveSiteDisplay <OEGrapheme_OE2DActiveSiteDisplay>` object of which atoms are being
      considered.

   *point*
      Specifies the 2D display coordinates.

   .. seealso::

      * :ref:`OENearestAtom <OEDepict_OENearestAtom>` class
      * :oe:func:`OEGrapheme::OEGetNearbyAtom` function
