:orphan:

.. oe:namespace:: OEDepict


.. _OEDepict_OEJavaImageBase:

.. oe:class:: OEJavaImageBase

   .. oe:api::

      class OEJavaImageBase extends OEImageBase

   The :ref:`OEJavaImageBase <OEDepict_OEJavaImageBase>` is an an implementation of
   :ref:`OEImageBase <OEDepict_OEImageBase>` that uses a
   `java.awt.Graphics <http://docs.oracle.com/javase/7/docs/api/java/awt/Graphics.html>`_
   object as a canvas to draw on.  This may be faster in some circumstances,
   since the JNI layer is avoided. 

   The following Java example demonstrates the usage of :ref:`OEJavaImageBase <OEDepict_OEJavaImageBase>`
   class.

   .. admonition:: Download code

      :download:`JavaImageBase.java <../../../../../wrappers/java/examples/openeye/docexamples/oedepict/JavaImageBase.java>`
   

   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:`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:api::

         OEJavaImageBase(java.awt.Graphics graphics, double width,
                         double height)

      Default constructor that creates an :ref:`OEJavaImageBase <OEDepict_OEJavaImageBase>`
      with the specified width and height.

      graphics
         A java.awt.Graphics object.

      *width, height*
         The dimensions of the image, both have to be positive (non-zero)
         numbers.


   .. ################################################################
      # SetAntiAliasing
      ################################################################

   .. oe:method:: SetAntiAliasing

      .. oe:api::

         void SetAntiAliasing(boolean state)

      Enables or disables antialiasing on the Graphics object.  Antialiasing
      is on by default.
         
   .. ################################################################
      # GetAntiAliasing
      ################################################################

   .. oe:method:: GetAntiAliasing

      .. oe:api::

         boolean GetAntiAliasing()

      Returns a boolean indicating if antialiasing is on.

   .. ################################################################
      # GetGraphics
      ################################################################

   .. oe:method:: GetGraphics

      .. oe:api::

         Graphics GetGraphics()

      Returns the graphics object used to construct this object with.
