.. # split from OEGraphemeFunctions.rst:279

.. include:: ../substitutions

.. oe:namespace:: OEGrapheme

.. meta::
   :keywords: OEDraw2DSurface

.. oe:function:: OEDraw2DSurface

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

      .. oe:api::

         bool OEDraw2DSurface(OEDepict::OE2DMolDisplay& disp)

   .. oe:language:: python

      .. oe:api:: python

         OEDraw2DSurface(disp: OE2DMolDisplay) -> bool

   Calculates the arc segments of the molecule surface and
   draws the arcs into the molecule display using the functor
   previously added to the atoms
   (by calling :oe:func:`OEGrapheme::OESetSurfaceArcFxn`).
   See :ref:`Figure: Example of drawing a molecule surface using the OEDraw2DSurface function<figure_OEDraw2DSurface>`.

   *disp*
      The molecule display on which the 2D molecule surface is drawn.

   .. note::

      If no surface drawing functor is set to the atoms, then
      the :ref:`OEDefaultArcFxn <OEGrapheme_OEDefaultArcFxn>` functor will be used
      by default.

   .. _figure_OEDraw2DSurface:

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

      **Example of drawing a molecule surface using the OEDraw2DSurface function**

   .. seealso::

      * :ref:`chapter_draw_surface` chapter
      * :oe:func:`OEGrapheme::OESetSurfaceArcFxn`

   .. ########################################################################

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

      .. oe:api::

         bool OEDraw2DSurface(OEDepict::OE2DMolDisplay& disp,
                              const OEDepict::OE2DMolDisplay& refdisp)

   .. oe:language:: python

      .. oe:api:: python

         OEDraw2DSurface(disp: OE2DMolDisplay, refdisp: OE2DMolDisplay) -> bool

   Allows a molecule surface to be generated on one molecule display but drawn
   into another display.
   See :ref:`Figure: Example of using OEDraw2DSurface with reference molecule display<figure_OEDraw2DSurfaceReference>`.

   *disp*
     The molecule display on which the 2D molecule surface is drawn.

   *refdisp*
     The molecule display for which the 2D molecule surface is calculated.

   .. _figure_OEDraw2DSurfaceReference:

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

      **Example of using OEDraw2DSurface with reference molecule display**

   .. seealso::

      * :ref:`chapter_draw_surface` chapter
      * :oe:func:`OEGrapheme::OESetSurfaceArcFxn`
