.. # split from OEGraphemeFunctions.rst:121

.. include:: ../substitutions

.. oe:namespace:: OEGrapheme

.. meta::
   :keywords: OEAddGlyph

.. oe:function:: OEAddGlyph

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

      .. oe:api::

         void OEAddGlyph(OEDepict::OE2DMolDisplay& disp,
                         const OEAtomGlyphBase& atomglyph,
                         const OEChem::OEMatchBase& match)
         void OEAddGlyph(OEDepict::OE2DMolDisplay& disp,
                         const OEAtomGlyphBase& atomglyph,
                         const OEChem::OEAtomBondSet& abset)
         void OEAddGlyph(OEDepict::OE2DMolDisplay& disp,
                         const OEAtomGlyphBase& atomglyph,
                         const OESystem::OEUnaryPredicate<OEChem::OEAtomBase>& pred)

   .. oe:language:: python

      .. oe:api:: python

         OEAddGlyph(disp: OE2DMolDisplay, atomglyph: OEAtomGlyphBase,
                    match: OEMatchBase) -> None
         OEAddGlyph(disp: OE2DMolDisplay, atomglyph: OEAtomGlyphBase,
                    abset: OEAtomBondSet) -> None
         OEAddGlyph(disp: OE2DMolDisplay, atomglyph: OEAtomGlyphBase,
                    pred: OEUnaryAtomPred) -> None


   Annotates atoms with the style implemented in the given
   :ref:`OEAtomGlyphBase <OEGrapheme_OEAtomGlyphBase>` object.
   The atoms being annotated can be specified either by an
   :ref:`OEMatchBase <OEChem_OEMatchBase>` or an :ref:`OEAtomBondSet <OEChem_OEAtomBondSet>`
   object or by an atom predicate.

   *disp*
      The :ref:`OE2DMolDisplay <OEDepict_OE2DMolDisplay>` object whose atoms are being
      annotated.

   *atomglyph*
      Specifies the style of the annotation.
      Each atom is being annotated by calling the
      :oe:meth:`OEGrapheme::OEAtomGlyphBase::RenderGlyph` method.

   *match*
      :oe:func:`OEGrapheme::OEAddGlyph` function annotates the
      target atoms of the :ref:`OEMatchBase <OEChem_OEMatchBase>` object.

   *abset*
      :oe:func:`OEGrapheme::OEAddGlyph` function annotates the
      atoms returned by the :oe:cls:`OEChem::OEAtomBondSet::GetAtoms`
      method.

   *pred*
      :oe:func:`OEGrapheme::OEAddGlyph` function annotates
      only atoms for which the given atom predicate returns `true`.

   .. seealso::

      * :ref:`chapter_annotation` chapter
      * :ref:`OEAtomGlyphBase <OEGrapheme_OEAtomGlyphBase>` class
      * :ref:`OEAtomGlyphCircle <OEGrapheme_OEAtomGlyphCircle>` class

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

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

      .. oe:api::

         void OEAddGlyph(OEDepict::OE2DMolDisplay& disp,
                         const OEBondGlyphBase& bondglyph,
                         const OEChem::OEMatchBase& match)
         void OEAddGlyph(OEDepict::OE2DMolDisplay& disp,
                         const OEBondGlyphBase& bondglyph,
                         const OEChem::OEAtomBondSet& abset)
         void OEAddGlyph(OEDepict::OE2DMolDisplay& disp,
                         const OEBondGlyphBase& bondglyph,
                         const OESystem::OEUnaryPredicate<OEChem::OEBondBase>& pred)

   .. oe:language:: python

      .. oe:api:: python

         OEAddGlyph(disp: OE2DMolDisplay, bondglyph: OEBondGlyphBase,
                    match: OEMatchBase) -> None
         OEAddGlyph(disp: OE2DMolDisplay, bondglyph: OEBondGlyphBase,
                    abset: OEAtomBondSet) -> None
         OEAddGlyph(disp: OE2DMolDisplay, bondglyph: OEBondGlyphBase,
                    pred: OEUnaryBondPred) -> None

   Annotates bonds with the style implemented in the given
   :ref:`OEBondGlyphBase <OEGrapheme_OEBondGlyphBase>` object.
   The bond being annotated can be specified either by an
   :ref:`OEMatchBase <OEChem_OEMatchBase>` or an :ref:`OEAtomBondSet <OEChem_OEAtomBondSet>`
   object or by a bond predicate.

   *disp*
      The :ref:`OE2DMolDisplay <OEDepict_OE2DMolDisplay>` object whose bonds are being
      annotated.

   *bondglyph*
      Specifies the style of the annotation.
      Each bond is being annotated by calling the
      :oe:meth:`OEGrapheme::OEBondGlyphBase::RenderGlyph` method.

   *match*
      :oe:func:`OEGrapheme::OEAddGlyph` function annotates the
      target bonds of the :ref:`OEMatchBase <OEChem_OEMatchBase>` object.

   *abset*
      :oe:func:`OEGrapheme::OEAddGlyph` function annotates the
      bonds returned by the :oe:cls:`OEChem::OEAtomBondSet::GetBonds`
      method.

   *pred*
      :oe:func:`OEGrapheme::OEAddGlyph` function annotates
      only bonds for which the given bond predicate returns `true`.

   .. seealso::

      * :ref:`chapter_annotation` chapter
      * :ref:`OEBondGlyphBase <OEGrapheme_OEBondGlyphBase>` class
      * :ref:`OEBondGlyphArrow <OEGrapheme_OEBondGlyphArrow>`
      * :ref:`OEBondGlyphCircle <OEGrapheme_OEBondGlyphCircle>`
      * :ref:`OEBondGlyphCross <OEGrapheme_OEBondGlyphCross>` class
      * :ref:`OEBondGlyphCurvedArrow <OEGrapheme_OEBondGlyphCurvedArrow>` class
      * :ref:`OEBondGlyphScissors <OEGrapheme_OEBondGlyphScissors>` class

