.. oe:namespace:: OEGrapheme


.. meta::
   :keywords: OEAtomGlyphCircle, AtomGlyphCircle


.. _OEGrapheme_OEAtomGlyphCircle:

.. oe:class:: OEAtomGlyphCircle

   .. oe:api::

      class OEAtomGlyphCircle : public OEAtomGlyphBase

   By using the :ref:`OEAtomGlyphCircle <OEGrapheme_OEAtomGlyphCircle>` class, atoms
   can be annotated by drawing a circle around them.

   .. seealso::

      * :ref:`chapter_annotation` chapter
      * :oe:constns:`OEGrapheme::OECircleStyle` namespace

   The following methods are publicly inherited from :ref:`OEAtomGlyphBase <OEGrapheme_OEAtomGlyphBase>`:

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

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

   .. oe:method:: Constructors

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

         .. oe:api::

            OEAtomGlyphCircle(const OEDepict::OEPen& pen,
                              unsigned int circlestyle = OECircleStyle::Default,
                              double circleRadiusScale = 1.0,
                              unsigned int layer = OEDepict::OELayerPosition::Below)

      .. oe:language:: python

         .. oe:api:: python

            OEAtomGlyphCircle(pen: OEPen, circlestyle: int,
                              circleRadiusScale: float = 1.0, layer: int) -> OEAtomGlyphCircle

      Creates an :ref:`OEAtomGlyphCircle <OEGrapheme_OEAtomGlyphCircle>` object with the
      specified parameters

      .. _figure_OEAtomGlyphCircle:

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

         **Example of atom annotations**

      *pen*
         The pen used when drawing a circle around an atom.

         See example (A) and (B) in :ref:`Figure: Example of atom annotations<figure_OEAtomGlyphCircle>`.

      *circlestyle*
         The style of the drawn circle from the 
         :oe:constns:`OEGrapheme::OECircleStyle` namespace.

         See examples (C) and (D) in :ref:`Figure: Example of atom annotations<figure_OEAtomGlyphCircle>`.

      *circleRadiusScale*
         The multiplier used to modify the radius of the drawn circles 

         See examples (D) and (E) in :ref:`Figure: Example of atom annotations<figure_OEAtomGlyphCircle>`.

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

         See examples (B) and (F) in :ref:`Figure: Example of atom annotations<figure_OEAtomGlyphCircle>`.


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

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OEAtomGlyphBase* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEAtomGlyphCircle

      Deep copy constructor that returns a copy of the object.
      The memory for the returned :ref:`OEAtomGlyphCircle <OEGrapheme_OEAtomGlyphCircle>`
      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::OEAtomBase* atom) const

      .. oe:language:: python

         .. oe:api:: python

            RenderGlyph(disp: OE2DMolDisplay, atom: OEAtomBase) -> bool

      Draws a glyph (in this case a circle) around the given atom.

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

      *atom*
         The :ref:`OEAtomBase <OEChem_OEAtomBase>` object being annotated.
