.. oe:namespace:: OEDepict


.. meta::
   :keywords: OEImageFileCreatorBase, ImageFileCreatorBase


.. _OEDepict_OEImageFileCreatorBase:

.. oe:class:: OEImageFileCreatorBase

   .. oe:api::

      class OEImageFileCreatorBase

   The :ref:`OEImageFileCreatorBase <OEDepict_OEImageFileCreatorBase>` is an abstract class
   that is used to register concrete image types.

   .. seealso::

      * :oe:func:`OEDepict::OERegisterImageFile` function

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

   .. oe:method:: Constructors

      .. oe:api::

         OEImageFileCreatorBase(const std::string& ext, bool multi = false)

      Default constructor.

      *ext*
        The file extension that will be used to identify the concrete
        image type.
        For example, the Portable Document Format (:file:`PDF`) is registered
        with the "pdf" file extension.

      *multi*
        Determines whether the specific image type can be used to
        create multi-page images.

   .. ################################################################
      # CreateCopy
      ################################################################

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OEImageFileCreatorBase* CreateCopy() const = 0

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEImageFileCreatorBase

      Virtual const constructor which allows copying of concrete
      derived objects using a reference to this base class.

   .. ################################################################
      # CreateImage
      ################################################################

   .. oe:method:: CreateImage

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

         .. oe:api::

            OEImageFileBase* CreateImage(double width, double height) const = 0

      .. oe:language:: python

         .. oe:api:: python

            CreateImage(width: float, height: float) -> OEImageFileBase

      The :oe:meth:`OEDepict::OEImageFileCreatorBase::CreateImage` is
      a virtual method that has to be implemented in the concrete
      derived classes and it returns a pointer of concrete image 
      with the given dimensions.

      *width*
         The width of the returned image.

      *height*
         The height of the returned image. 

   .. ################################################################
      # GetExtension
      ################################################################

   .. oe:method:: GetExtension

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

         .. oe:api::

            const std::string GetExtension() const

      .. oe:language:: python

         .. oe:api:: python

            GetExtension() -> str

      Return the file extension of which the concrete image type is
      being registered.
    
   .. ################################################################
      # IsMultiPage
      ################################################################

   .. oe:method:: IsMultiPage

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

         .. oe:api::

            bool IsMultiPage() const

      .. oe:language:: python

         .. oe:api:: python

            IsMultiPage() -> bool

      Returns whether the image type registered as multi-page image.

