.. include:: ../../toolkit-substitutions
.. include:: ../substitutions

.. oe:namespace:: OEDepict


.. _OEDepict_OESVGGroup:

.. oe:class:: OESVGGroup

   .. oe:api::

      class OESVGGroup

   SVG `group <https://developer.mozilla.org/en-US/docs/Web/SVG/Element/g>`_
   is a container for grouping and naming collections of SVG drawing elements.

   .. seealso::

      * :oe:func:`OEDepict::OEIsValidSVGGroupId` function
      * :ref:`chapter_svg` chapter
      * :ref:`OESVGClass <OEDepict_OESVGClass>` class


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

   .. oe:method:: Constructors

      .. oe:api: DO NO DOCUMENT / SHOULD NOT BE CALLED DIRECTLY

         OESVGGroup(const OEImageBase *parent, const std::string &id)

      To create an :ref:`OESVGGroup <OEDepict_OESVGGroup>` object on an image
      use the :oe:meth:`OEDepict::OEImageBase::NewSVGGroup` method.


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

   .. oe:method:: AddSVGClass

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

         .. oe:api::

            bool AddSVGClass(const OESVGClass* svg_class)

      .. oe:language:: python

         .. oe:api:: python

            AddSVGClass(svg_class: OESVGClass) -> bool

      Adds an :ref:`OESVGClass <OEDepict_OESVGClass>` object to the group.
      The SVG class and the SVG group have to be created on the same
      image.


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

   .. oe:method:: GetId

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

         .. oe:api::

            std::string GetId() const

      .. oe:language:: python

         .. oe:api:: python

            GetId() -> str

      Returns the name of the :ref:`OESVGGroup <OEDepict_OESVGGroup>` object.


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

   .. oe:method:: IsVisible

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

         .. oe:api::

            bool IsVisible() const

      .. oe:language:: python

         .. oe:api:: python

            IsVisible() -> bool

      Returns whether the objects drawn inside the given
      :ref:`OESVGGroup <OEDepict_OESVGGroup>` will be visible
      when the image is opened.
