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

.. oe:namespace:: OEDepict

.. meta::
   :keywords: OEImageFrame, ImageFrame


.. _OEDepict_OEImageFrame:

.. oe:class:: OEImageFrame

   .. oe:api::

      class OEImageFrame : public OEImageBase

   :ref:`OEImageFrame <OEDepict_OEImageFrame>` class provides a convenient way
   to create a *frame* with a specific dimension and offset relative to
   an :ref:`OEImageBase <OEDepict_OEImageBase>` object.
   See :ref:`Figure: Schematic representation of OEImageFrame objects<figure_OEImageFrame>`.

   .. _figure_OEImageFrame:

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

      **Schematic representation of OEImageFrame objects**

   .. seealso::

      * :ref:`section_image_layout_frame` section

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

   ========================================================================= ========================================================================== =========================================================================
   :oe:meth:`Clear<OEDepict::OEImageBase::Clear>`                            :oe:meth:`DrawPie<OEDepict::OEImageBase::DrawPie>`                         :oe:meth:`DrawTriangle<OEDepict::OEImageBase::DrawTriangle>`
   :oe:meth:`DrawArc<OEDepict::OEImageBase::DrawArc>`                        :oe:meth:`DrawPoint<OEDepict::OEImageBase::DrawPoint>`                     :oe:meth:`GetGlobalOffset<OEDepict::OEImageBase::GetGlobalOffset>`
   :oe:meth:`DrawCircle<OEDepict::OEImageBase::DrawCircle>`                  :oe:meth:`DrawPolygon<OEDepict::OEImageBase::DrawPolygon>`                 :oe:meth:`GetHeight<OEDepict::OEImageBase::GetHeight>`
   :oe:meth:`DrawCubicBezier<OEDepict::OEImageBase::DrawCubicBezier>`        :oe:meth:`DrawQuadraticBezier<OEDepict::OEImageBase::DrawQuadraticBezier>` :oe:meth:`GetMinFontSize<OEDepict::OEImageBase::GetMinFontSize>`
   :oe:meth:`DrawLine<OEDepict::OEImageBase::DrawLine>`                      :oe:meth:`DrawRectangle<OEDepict::OEImageBase::DrawRectangle>`             :oe:meth:`GetWidth<OEDepict::OEImageBase::GetWidth>`
   :oe:meth:`DrawPath<OEDepict::OEImageBase::DrawPath>`                      :oe:meth:`DrawText<OEDepict::OEImageBase::DrawText>`                       :oe:meth:`GetSVGClass<OEDepict::OEImageBase::GetSVGClass>`
   :oe:meth:`GetSVGGroup<OEDepict::OEImageBase::GetSVGGroup>`                :oe:meth:`GetSVGGroups<OEDepict::OEImageBase::GetSVGGroups>`               :oe:meth:`NewSVGClass<OEDepict::OEImageBase::NewSVGClass>`
   :oe:meth:`NewSVGGroup<OEDepict::OEImageBase::NewSVGGroup>`                :oe:meth:`PopGroup<OEDepict::OEImageBase::PopGroup>`                       :oe:meth:`PushGroup<OEDepict::OEImageBase::PushGroup>`
   :oe:meth:`SetMinFontSize<OEDepict::OEImageBase::SetMinFontSize>`
   ========================================================================= ========================================================================== =========================================================================


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

   .. oe:method:: Constructors

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

         .. oe:api::

            OEImageFrame(OEImageBase& parent, double width, double height,
                         const OE2DPoint& offset)

      .. oe:language:: python

         .. oe:api:: python

            OEImageFrame(parent: OEImageBase, width: float, height: float,
                         offset: OE2DPoint) -> OEImageFrame

      Creates an :ref:`OEImageFrame <OEDepict_OEImageFrame>` object with the given
      dimension.

      *parent*
        The parent :ref:`OEImageBase <OEDepict_OEImageBase>` object in which the
        :ref:`OEImageFrame <OEDepict_OEImageFrame>` object is placed.

      *width*
        The width of the :ref:`OEImageFrame <OEDepict_OEImageFrame>` object.

      *height*
        The height of the :ref:`OEImageFrame <OEDepict_OEImageFrame>` object.

      *offset*
        The offset of the :ref:`OEImageFrame <OEDepict_OEImageFrame>` object relative
        to top/left corner of its :ref:`OEImageBase <OEDepict_OEImageBase>` parent.

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

         .. oe:api::

            OEImageFrame(OEImageBase& parent, double padding)

      .. oe:language:: python

         .. oe:api:: python

            OEImageFrame(parent: OEImageBase, padding: float) -> OEImageFrame

      Creates an :ref:`OEImageFrame <OEDepict_OEImageFrame>` object equal paddings
      around the given image positioning the image frame to the center
      of the image.

      *parent*
        The parent :ref:`OEImageBase <OEDepict_OEImageBase>` object in which the
        :ref:`OEImageFrame <OEDepict_OEImageFrame>` object is placed.

      *padding*
        The padding that applied in all four sides around the parent
        image. The padding is capped by the :math:`\frac{1}{3}` of
        width and height of the **parent** image.


   .. ################################################################
      # Clear
      ################################################################

   .. oe:method:: Clear

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

         .. oe:api::

            void Clear(const OESystem::OEColor& color)

      .. oe:language:: python

         .. oe:api:: python

            Clear(arg2: OEColor) -> None

      Clears the image with the given color.

      .. seealso::

         * :oe:meth:`OEDepict::OEImageBase::Clear` method
         * :ref:`OEColor <OESystem_OEColor>` class


   .. ################################################################
      # DrawArc
      ################################################################

   .. oe:method:: DrawArc

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

         .. oe:api::

            void DrawArc(const OE2DPoint& center, double bgnAngle,
                         double endAngle, double radius, const OEPen& pen)

      .. oe:language:: python

         .. oe:api:: python

            DrawArc(c: OE2DPoint, bgnAngle: float, endAngle: float, rad: float,
                    pen: OEPen) -> None

      Draws the outline of an arc.
      See example in :ref:`Figure: Example of drawing an arc<figure_OEImageFrame_DrawArc>`.

      .. _figure_OEImageFrame_DrawArc:

      .. figure:: ../images/OEImageBase-DrawArc.*
         :align:  center
         :scale:  100

         **Example of drawing an arc**

      .. seealso::

         * :oe:meth:`OEDepict::OEImageBase::DrawArc` method
         * :ref:`OE2DPoint <OEDepict_OE2DPoint>` class
         * :ref:`OEPen <OEDepict_OEPen>` class


   .. ################################################################
      # DrawCircle
      ################################################################

   .. oe:method:: DrawCircle

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

         .. oe:api::

            void DrawCircle(const OE2DPoint& center, double radius,
                            const OEPen& pen)

      .. oe:language:: python

         .. oe:api:: python

            DrawCircle(c: OE2DPoint, rad: float, pen: OEPen) -> None

      Draws a circle.
      See example in :ref:`Figure: Example of drawing a circle<figure_OEImageFrame_DrawCircle>`.

      .. _figure_OEImageFrame_DrawCircle:

      .. figure:: ../images/OEImageBase-DrawCircle.*
         :align:  center

         **Example of drawing a circle**

      .. seealso::

         * :oe:meth:`OEDepict::OEImageBase::DrawCircle` method
         * :ref:`OE2DPoint <OEDepict_OE2DPoint>` class
         * :ref:`OEPen <OEDepict_OEPen>` class


   .. ################################################################
      # DrawCubicBezier
      ################################################################


   .. oe:method:: DrawCubicBezier

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

         .. oe:api::

            void DrawCubicBezier(const OE2DPoint& bgn, const OE2DPoint& c1,
                                 const OE2DPoint& c2, const OE2DPoint& end,
                                 const OEPen& pen)

      .. oe:language:: python

         .. oe:api:: python

            DrawCubicBezier(bgn: OE2DPoint, c1: OE2DPoint, c2: OE2DPoint,
                            end: OE2DPoint, pen: OEPen) -> None


      Draws a cubic |Bezier| curve.
      See example in :ref:`Figure: Example of drawing a cubic Bezier curve<figure_OEImageFrame_DrawCubicBezier>`.

      .. _figure_OEImageFrame_DrawCubicBezier:

      .. figure:: ../images/OEImageBase-DrawCubicBezier.*
         :align:  center

         **Example of drawing a cubic Bezier curve**

      .. seealso::

         * :oe:meth:`OEDepict::OEImageBase::DrawCubicBezier` method
         * :ref:`OE2DPoint <OEDepict_OE2DPoint>` class
         * :ref:`OEPen <OEDepict_OEPen>` classes


   .. ################################################################
      # DrawLine
      ################################################################

   .. oe:method:: DrawLine

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

         .. oe:api::

            void DrawLine(const OE2DPoint& bgn, const OE2DPoint& end,
                          const OEPen& pen)

      .. oe:language:: python

         .. oe:api:: python

            DrawLine(bgn: OE2DPoint, end: OE2DPoint, pen: OEPen) -> None

      Draws a line.
      See example in :ref:`Figure: Example of drawing a line<figure_OEImageFrame_DrawLine>`.

      .. _figure_OEImageFrame_DrawLine:

      .. figure:: ../images/OEImageBase-DrawLine.*
         :align:  center

         **Example of drawing a line**

      .. seealso::

         * :oe:meth:`OEDepict::OEImageBase::DrawLine` method
         * :ref:`OE2DPoint <OEDepict_OE2DPoint>` class
         * :ref:`OEPen <OEDepict_OEPen>` classes


   .. ################################################################
      # DrawPath
      ################################################################

   .. oe:method:: DrawPath

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

         .. oe:api::

            void DrawPath(const OE2DPath& path, const OEPen& pen)

      .. oe:language:: python

         .. oe:api:: python

            DrawPath(path: OE2DPath, pen: OEPen) -> None

      Draws a path.
      See example in :ref:`Figure: Example of drawing a path<figure_OEImageFrame_DrawPath>`.

      .. _figure_OEImageFrame_DrawPath:

      .. figure:: ../images/OEImageBase-DrawPath.*
         :align:  center
         :scale:  100

         **Example of drawing a path**

     .. seealso::

         * :oe:meth:`OEDepict::OEImageBase::DrawPath` methods
         * :ref:`OE2DPath <OEDepict_OE2DPath>` class
         * :ref:`OEPen <OEDepict_OEPen>` classes


   .. ################################################################
      # DrawPie
      ################################################################

   .. oe:method:: DrawPie

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

         .. oe:api::

            void DrawPie(const OE2DPoint& center, double bgnAngle,
                         double endAngle, double radius, const OEPen& pen)

      .. oe:language:: python

         .. oe:api:: python

            DrawPie(c: OE2DPoint, bgnAngle: float, endAngle: float, rad: float,
                    pen: OEPen) -> None

      Draws a pie.
      See example in :ref:`Figure: Example of drawing a pie<figure_OEImageFrame_DrawPie>`.

      .. _figure_OEImageFrame_DrawPie:

      .. figure:: ../images/OEImageBase-DrawPie.*
         :align:  center
         :scale:  100

         **Example of drawing a pie**

      .. seealso::

         * :oe:meth:`OEDepict::OEImageBase::DrawPie` methods
         * :ref:`OE2DPoint <OEDepict_OE2DPoint>` class
         * :ref:`OEPen <OEDepict_OEPen>` classes


   .. ################################################################
      # DrawPoint
      ################################################################

   .. oe:method:: DrawPoint

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

         .. oe:api::

            void DrawPoint(const OE2DPoint& p, const OESystem::OEColor& color)

      .. oe:language:: python

         .. oe:api:: python

            DrawPoint(p: OE2DPoint, color: OEColor) -> None

      Draws a point.
      See example in :ref:`Figure: Example of drawing a point<figure_OEImageFrame_DrawPoint>`.

      .. _figure_OEImageFrame_DrawPoint:

      .. figure:: ../images/OEImageBase-DrawPoint.*
         :align:  center

         **Example of drawing a point**

      .. seealso::

         * :oe:meth:`OEDepict::OEImageBase::DrawPoint` method
         * :ref:`OE2DPoint <OEDepict_OE2DPoint>` class
         * :ref:`OEColor <OESystem_OEColor>` class


   .. ################################################################
      # DrawPolygon
      ################################################################

   .. oe:method:: DrawPolygon

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

         .. oe:api::

            void DrawPolygon(const std::vector<OE2DPoint>& points,
                             const OEPen& pen)

      .. oe:language:: python

         .. oe:api:: python

            DrawPolygon(p: OE2DPointVector, pen: OEPen) -> None

      Draws a closed polygon.
      See example in :ref:`Figure: Example of drawing a polygon<figure_OEImageFrame_DrawPolygon>`.

      .. _figure_OEImageFrame_DrawPolygon:

      .. figure:: ../images/OEImageBase-DrawPolygon.*
         :align:  center

         **Example of drawing a polygon**

      .. seealso::

         * :oe:meth:`OEDepict::OEImageBase::DrawPolygon` method
         * :ref:`OE2DPoint <OEDepict_OE2DPoint>` class
         * :ref:`OEPen <OEDepict_OEPen>` class


   .. ################################################################
      # DrawQuadraticBezier
      ################################################################

   .. oe:method:: DrawQuadraticBezier

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

         .. oe:api::

            void DrawQuadraticBezier(const OE2DPoint& bgn, const OE2DPoint& c,
                                     const OE2DPoint& end, const OEPen& pen)

      .. oe:language:: python

         .. oe:api:: python

            DrawQuadraticBezier(bgn: OE2DPoint, c1: OE2DPoint, end: OE2DPoint,
                                pen: OEPen) -> None

      Draws a quadratic |Bezier| curve.
      See example in :ref:`Figure: Example of drawing a quadratic Bezier curve<figure_OEImage_DrawQuadraticBezier>`.

      .. _figure_OEImageFrame_DrawQuadraticBezier:

      .. figure:: ../images/OEImageBase-DrawQuadraticBezier.*
         :align:  center

         **Example of drawing a quadratic Bezier curve**

      .. seealso::

         * :oe:meth:`OEDepict::OEImageBase::DrawQuadraticBezier` methods
         * :ref:`OE2DPoint <OEDepict_OE2DPoint>` class
         * :ref:`OEPen <OEDepict_OEPen>` classes


   .. ################################################################
      # DrawRectangle
      ################################################################

   .. oe:method:: DrawRectangle

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

         .. oe:api::

            void DrawRectangle(const OE2DPoint& tl, const OE2DPoint& br,
                               const OEPen& pen)

      .. oe:language:: python

         .. oe:api:: python

            DrawRectangle(tl: OE2DPoint, br: OE2DPoint, pen: OEPen) -> None

      Draws a rectangle.
      See example in :ref:`Figure: Example of drawing a rectangle<figure_OEImageFrame_DrawRectangle>`.

      .. _figure_OEImageFrame_DrawRectangle:

      .. figure:: ../images/OEImageBase-DrawRectangle.*
         :align:  center

         **Example of drawing a rectangle**

      .. seealso::

         * :oe:meth:`OEDepict::OEImageBase::DrawRectangle` method
         * :ref:`OE2DPoint <OEDepict_OE2DPoint>` class
         * :ref:`OEPen <OEDepict_OEPen>` class


   .. ################################################################
      # DrawText
      ################################################################

   .. oe:method:: DrawText

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

         .. oe:api::

            void DrawText(const OE2DPoint& c, const std::string& text,
                          const OEFont& font, double maxwidth = 0.0)

      .. oe:language:: python

         .. oe:api:: python

            DrawText(c: OE2DPoint, text: str, font: OEFont,
                     maxwidth: float = 0.0) -> None

      Draws a text.
      See example in :ref:`Figure: Example of drawing a text<figure_OEImageFrame_DrawText>`.

      .. _figure_OEImageFrame_DrawText:

      .. figure:: ../images/OEImageBase-DrawText.*
         :align:  center

         **Example of drawing a text**

      .. seealso::

         * :oe:meth:`OEDepict::OEImageBase::DrawText` method
         * :ref:`OE2DPoint <OEDepict_OE2DPoint>` class
         * :ref:`OEFont <OEDepict_OEFont>` class


   .. ################################################################
      # DrawTriangle
      ################################################################

   .. oe:method:: DrawTriangle

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

         .. oe:api::

            void DrawTriangle(const OE2DPoint& a, const OE2DPoint& b,
                              const OE2DPoint& c, const OEPen& pen)

      .. oe:language:: python

         .. oe:api:: python

            DrawTriangle(arg2: OE2DPoint, arg3: OE2DPoint, arg4: OE2DPoint,
                         arg5: OEPen) -> None

      Draws a triangle.
      See example in :ref:`Figure: Example of drawing a triangle<figure_OEImageFrame_DrawTriangle>`.

      .. _figure_OEImageFrame_DrawTriangle:

      .. figure:: ../images/OEImageBase-DrawTriangle.*
         :align:  center

         **Example of drawing a triangle**

      .. seealso::

         * :oe:meth:`OEDepict::OEImageBase::DrawTriangle` method
         * :ref:`OE2DPoint <OEDepict_OE2DPoint>` class
         * :ref:`OEPen <OEDepict_OEPen>` classes


   .. ################################################################
      # GetHeight
      ################################################################

   .. oe:method:: GetHeight

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

         .. oe:api::

            double GetHeight() const

      .. oe:language:: python

         .. oe:api:: python

            GetHeight() -> float

      Returns the height of the :ref:`OEImageFrame <OEDepict_OEImageFrame>` object.


   .. ################################################################
      # GetOffset
      ################################################################

   .. oe:method:: GetOffset

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

         .. oe:api::

            const OE2DPoint& GetOffset() const

      .. oe:language:: python

         .. oe:api:: python

            GetOffset() -> OE2DPoint

      Returns the offset of the :ref:`OEImageFrame <OEDepict_OEImageFrame>` object
      relative to its :ref:`OEImageBase <OEDepict_OEImageBase>` parent.


   .. ################################################################
      # GetWidth
      ################################################################

   .. oe:method:: GetWidth

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

         .. oe:api::

            double GetWidth() const

      .. oe:language:: python

         .. oe:api:: python

            GetWidth() -> float

      Returns the width of the :ref:`OEImageFrame <OEDepict_OEImageFrame>` object.

