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

.. oe:namespace:: OEDepict

.. meta::
   :keywords: OEImageFileBase, ImageFileBase


.. _OEDepict_OEImageFileBase:

.. oe:class:: OEImageFileBase

   .. oe:api::

      class OEImageFileBase : public OEImageBase

   The :ref:`OEImageFileBase <OEDepict_OEImageFileBase>` is an abstract class
   that is used to write concrete image files.


   The following methods are publicly inherited from :ref:`OEImageBase <OEDepict_OEImageBase>`:

   ========================================================================= ========================================================================== =========================================================================
   :oe:meth:`Clear<OEDepict::OEImageBase::Clear>`                            :oe:meth:`DrawPoint<OEDepict::OEImageBase::DrawPoint>`                     :oe:meth:`GetHeight<OEDepict::OEImageBase::GetHeight>`
   :oe:meth:`DrawArc<OEDepict::OEImageBase::DrawArc>`                        :oe:meth:`DrawPolygon<OEDepict::OEImageBase::DrawPolygon>`                 :oe:meth:`GetMinFontSize<OEDepict::OEImageBase::GetMinFontSize>`
   :oe:meth:`DrawCircle<OEDepict::OEImageBase::DrawCircle>`                  :oe:meth:`DrawQuadraticBezier<OEDepict::OEImageBase::DrawQuadraticBezier>` :oe:meth:`GetWidth<OEDepict::OEImageBase::GetWidth>`
   :oe:meth:`DrawCubicBezier<OEDepict::OEImageBase::DrawCubicBezier>`        :oe:meth:`DrawRectangle<OEDepict::OEImageBase::DrawRectangle>`             :oe:meth:`SetMinFontSize<OEDepict::OEImageBase::SetMinFontSize>`
   :oe:meth:`DrawLine<OEDepict::OEImageBase::DrawLine>`                      :oe:meth:`DrawText<OEDepict::OEImageBase::DrawText>`
   :oe:meth:`DrawPie<OEDepict::OEImageBase::DrawPie>`                        :oe:meth:`DrawTriangle<OEDepict::OEImageBase::DrawTriangle>`
   ========================================================================= ========================================================================== =========================================================================

   .. ################################################################
      # Constructors
      ################################################################

   .. oe:method:: Constructors

      .. oe:api::

         OEImageFileBase(double width, double height)

      Default constructors that creates an image file with the
      given dimensions.


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

   .. oe:method:: GetExtension

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

         .. oe:api::

            std::string GetExtension() const = 0

      .. oe:language:: python

         .. oe:api:: python

            GetExtension() -> str

      Returns the file extension associated with the concrete image
      file type.

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

   .. oe:method:: IsVisible

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

         .. oe:api::

            virtual bool IsVisible() const

      .. oe:language:: python

         .. oe:api:: python

            IsVisible() -> bool

      Returns whether the top active SVG group is visible i.e.
      returns :oe:meth:`OEDepict::OESVGGroup::IsVisible`.

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

   .. oe:method:: PopGroup

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

         .. oe:api::

            virtual bool PopGroup (const OESVGGroup*)

      .. oe:language:: python

         .. oe:api:: python

            PopGroup(arg2: OESVGGroup) -> bool

      Pops the :ref:`OESVGGroup <OEDepict_OESVGGroup>` object.

      .. seealso::

         * :ref:`chapter_svg` chapter
         * :ref:`OESVGGroup <OEDepict_OESVGGroup>` class
         * :oe:meth:`OEDepict::OEImageFileBase::PushGroup` method


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

   .. oe:method:: PushGroup

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

         .. oe:api::

            virtual bool PushGroup(const OESVGGroup*)

      .. oe:language:: python

         .. oe:api:: python

            PushGroup(arg2: OESVGGroup) -> bool

      Pushes the :ref:`OESVGGroup <OEDepict_OESVGGroup>` object.

      .. seealso::

         * :ref:`chapter_svg` chapter
         * :ref:`OESVGGroup <OEDepict_OESVGGroup>` class
         * :oe:meth:`OEDepict::OEImageFileBase::PopGroup` method


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

   .. oe:method:: Write

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

         .. oe:api::

            bool Write(OEPlatform::oeostream& os)=0

      .. oe:language:: python

         .. oe:api:: python

            Write(os: oeostream) -> bool

      The :oe:meth:`OEDepict::OEImageFileBase::Write` is
      a virtual method that has to be implemented in the concrete
      derived classes and it writes the image into the given output
      stream.

