.. oe:namespace:: OEGrapheme



.. meta::
   :keywords: OEBondGlyphArrow, BondGlyphArrow


.. _OEGrapheme_OEBondGlyphArrow:

.. oe:class:: OEBondGlyphArrow

   .. oe:api::

      class OEBondGlyphArrow : public OEBondGlyphBase

   By using the :ref:`OEBondGlyphArrow <OEGrapheme_OEBondGlyphArrow>` class, bonds
   can be annotated by drawing an arrow across them.

   .. seealso::

      * :ref:`chapter_annotation` chapter
      * :ref:`OEBondGlyphCircle <OEGrapheme_OEBondGlyphCircle>` class
      * :ref:`OEBondGlyphCross <OEGrapheme_OEBondGlyphCross>` class
      * :ref:`OEBondGlyphCurvedArrow <OEGrapheme_OEBondGlyphCurvedArrow>` class
      * :ref:`OEBondGlyphScissors <OEGrapheme_OEBondGlyphScissors>` class
      * :ref:`OEBondGlyphStitch <OEGrapheme_OEBondGlyphStitch>` class
      * :ref:`OEBondGlyphZigZag <OEGrapheme_OEBondGlyphZigZag>` class

   The following methods are publicly inherited from :ref:`OEBondGlyphBase <OEGrapheme_OEBondGlyphBase>`:

   ============================================================== ================================================================
   :oe:meth:`CreateCopy<OEGrapheme::OEBondGlyphBase::CreateCopy>` :oe:meth:`RenderGlyph<OEGrapheme::OEBondGlyphBase::RenderGlyph>`
   ============================================================== ================================================================

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

   .. oe:method:: Constructors

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

         .. oe:api::

            OEBondGlyphArrow(const OEDepict::OEPen &,
                             double arrowLengthScale = 1.0,
                             unsigned int layer = OEDepict::OELayerPosition::Above)

      .. oe:language:: python

         .. oe:api:: python

            OEBondGlyphArrow(pen: OEPen, arrowLengthScale: float = 1.0,
                             layer: int) -> OEBondGlyphArrow

      Creates an :ref:`OEBondGlyphArrow <OEGrapheme_OEBondGlyphArrow>` object with the
      specified parameters.

      .. _figure_OEBondGlyphArrow:

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

         **Example of bond annotations**

      *pen*
         The pen used when drawing an arrow across the middle of the bond.

         See examples (A) and (B) in :ref:`Figure: Example of bond annotations<figure_OEBondGlyphArrow>`.

      *arrowLengthScale*
         The multiplier used to modify the length of the drawn arrows.

         See examples (A) and (C) in :ref:`Figure: Example of bond annotations<figure_OEBondGlyphArrow>`.

      *layer*
         Specifies whether the arrow is drawn above
         (:oe:const:`OEDepict::OELayerPosition::Above`) or below
         (:oe:const:`OEDepict::OELayerPosition::Below`) the molecule.

         See examples (B) and (D) in :ref:`Figure: Example of bond annotations<figure_OEBondGlyphArrow>`.

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

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OEBondGlyphBase* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEBondGlyphArrow

      Deep copy constructor that returns a copy of the object.
      The memory for the returned :ref:`OEBondGlyphArrow <OEGrapheme_OEBondGlyphArrow>`
      object is dynamically allocated and owned by the caller.

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

   .. oe:method:: RenderGlyph

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

         .. oe:api::

            bool RenderGlyph(OEDepict::OE2DMolDisplay& disp,
                             const OEChem::OEBondBase* bond) const

      .. oe:language:: python

         .. oe:api:: python

            RenderGlyph(disp: OE2DMolDisplay, bond: OEBondBase) -> bool

      Draws a glyph (in this case a straight arrow) in the middle of the given bond.

      *disp*
         The :ref:`OE2DMolDisplay <OEDepict_OE2DMolDisplay>` object that is modified
         to annotate the specified bond.

      *bond*
         The :ref:`OEBondBase <OEChem_OEBondBase>` object being annotated.
