
OEDepict TK 2.2.5
================================================================================

New features
--------------------------------------------------------------------------------

* :oe:cls:`OEDepict::OEImage <OEDepict::OEImage::Constructors>`
  allows users to easily rescale images without
  having to re-render all the drawing commands.

* :oe:meth:`OEDepict::OEPrepareDepictionOptions::SetDepictOrientation`
  allows users to control the preferred orientation of the 2D
  coordinates. This allows optimizing 2D coordinate generation for a
  particular orientation: :oe:const:`horizontal
  <OEDepict::OEDepictOrientation::Horizontal>`, :oe:const:`vertical
  <OEDepict::OEDepictOrientation::Vertical>`, or :oe:const:`square
  <OEDepict::OEDepictOrientation::Square>`. For example,
  :oe:const:`OEDepict::OEDepictOrientation::Horizontal` should be
  preferred when vertical space is expensive, as on web pages and
  spreadsheets.

* :oe:meth:`OEDepict::OEHighlightByStick::SetAtomExternalHighlightRatio`
  has been added to generate better highlighting for very small images. See
  the image in the
  :oe:meth:`OEDepict::OEHighlightByStick::SetAtomExternalHighlightRatio`
  documentation for an example.

* :oe:func:`OEDepict::OEConfigurePrepareDepictionOptions` provides a 
  convenient way to translate command line parameters into
  options on a :ref:`OEPrepareDepictionOptions <OEDepict_OEPrepareDepictionOptions>` object.
  All **OEDepict TK** examples have been updated to use these
  functions for building consistent command line interfaces. See the
  examples in the :ref:`OEDepict Examples
  Summary<oedepict_chapter_examples_summary>` section.

* :oe:func:`OEDepict::OEGetCenter` and
  :oe:func:`OEDepict::OEDrawTextToCenter` are convenience functions added
  to ensure that text is drawn vertically and horizontally in the center
  of an :ref:`OEImageBase <OEDepict_OEImageBase>`.

* Two new pens, :oe:const:`OELightGreyBoxPen<OEDepict::OEDepict::OELightGreyBoxPen>` and
  :oe:const:`OELightGreyPen<OEDepict::OEDepict::OELightGreyPen>`, have been added.


Major bug fixes
--------------------------------------------------------------------------------

* :oe:func:`OEDepict::OEPrepareDepiction` now automatically
  regenerates 2D coordinates when the current 2D coordinates are not in
  the XY plane. :oe:func:`OEDepict::OEPrepareDepiction` now clears
  coordinates when any of the following conditions are ``true``:

  - :oe:meth:`OEDepict::OEPrepareDepictionOptions::GetClearCoords` returns ``true``.
  - :oe:meth:`OEChem::OEMolBase::GetDimension` does not return ``2``.
  - Any Z coordinate is not ``0.0``.

  This protects against corrupted coordinate states that may be
  caused by file formats not normally used for depiction, such as PDB.


* PNG images generated on Linux will now have properly filled
  objects and will no longer look different
  than those generated on OSX or Windows, as shown in the following images:

  .. _table_filled_objects_cairo:

  .. list-table:: **Example of drawing filled objects with Cairo**

     * - **OEDepict TK 2.2.4**
       - **OEDepict TK 2.2.5**
     * - .. image:: ../../depicttk/images/releasenotes-2.2.5/DrawObjectsForReleaseNote-toolkits2014_Oct.png
       - .. image:: ../../depicttk/images/releasenotes-2.2.5/DrawObjectsForReleaseNote-toolkits2015_Feb.png

* The cubic and quadratic curves drawn on OSX PNG images are
  no longer closed and are now consistent with PNG images generated
  on other platforms.

  .. _table_osx_png_curve:

  .. list-table:: **Example of drawing cubic and quadratic curves on OSX**

     * - **OEDepict TK 2.2.4**
       - **OEDepict TK 2.2.5**
     * - .. image:: ../../depicttk/images/releasenotes-2.2.5/DrawCubicBezier-osx-toolkits2014_Oct.png
       - .. image:: ../../depicttk/images/releasenotes-2.2.5/DrawCubicBezier-osx-toolkits2015_Feb.png
     * - .. image:: ../../depicttk/images/releasenotes-2.2.5/DrawQuadraticBezier-osx-toolkits2014_Oct.png
       - .. image:: ../../depicttk/images/releasenotes-2.2.5/DrawQuadraticBezier-osx-toolkits2015_Feb.png

* PDF files should no longer cause the following warning
  message when read into Adobe Acrobat:

  ::

     The font "Times" contains a bad/BBox.


Minor bug fixes
--------------------------------------------------------------------------------

* A new :oe:meth:`OEDepict::OE2DMolDisplay::IsValid` method has been added.
  A molecule display is considered valid only if it was initialized with a
  non-empty molecule with either 2D or 3D coordinates.
  An invalid molecule display cannot be rendered by the :oe:func:`OEDepict::OERenderMolecule`
  or the :oe:func:`OEDepict::OERenderMoleculeToString` functions.

* The :oe:const:`OEDepict::OEHydrogenStyle::Hidden` style will no longer
  show any hydrogen labels, even if the hydrogen has a charge,
  isotopic mass, or is a radical.

* The :oe:func:`OEDepict::OEAnnotateDepictionProblems` function now
  displays ``E/Z`` CIP bond labels rather than ``C/T`` in cases where
  double bonds are not correctly depicted according to their cis/trans
  stereo specifications.

Documentation changes
--------------------------------------------------------------------------------

* All images in this documentation were automatically regenerated to
  reflect the changes made since the previous release.

* The documentation of all deprecated Ogham classes, functions, and namespaces
  has been removed:

  Deprecated Ogham classes:

  * ``OE8BitImage``
  * ``OEAtomStyle``
  * ``OEBondStyle``
  * ``OEDepictBase``
  * ``OEDepictColor``
  * ``OEDepictView``
  * ``OEPSImage``
  * ``OEPoly``
  * ``OEPolyF``
  * ``OESVGImage``
  * ``OEVert``
  * ``OEVertF``

  Deprecated Ogham functions:

  * ``OEWriteBMP``
  * ``OEWriteEPS``
  * ``OEWriteGIF``
  * ``OEWritePPM``
  * ``OEWriteRGB``
  * ``OEWriteXPM``

  Deprecated Ogham namespace:

  * ``OENamedColor``


* Minor changes have been made to the documentation and examples for consistency and/or spelling errors.
* More C# examples have been added.

C++-specific changes
--------------------------------------------------------------------------------

.. oe:language:: c++

   * :oe:func:`OEDepict::OECreateWin32GraphicsImage` now allows
     interoperability with the Windows `GDI+ Graphics class
     <http://msdn.microsoft.com/en-us/library/windows/desktop/ms534453(v=vs.85).aspx>`_
     object. This function is only available on the Windows operating
     system through C++.

.. oe:language:: python java csharp

   * ``OECreateWin32GraphicsImage`` now allows
     interoperability with the Windows `GDI+ Graphics class
     <http://msdn.microsoft.com/en-us/library/windows/desktop/ms534453(v=vs.85).aspx>`_
     object. This function is only available on the Windows operating
     system through C++.

Python-specific changes
--------------------------------------------------------------------------------

* **OEDepict TK** no longer provides Python wrapping for the following methods of
  the deprecated ``OEDepictView`` class:

  - ``GetViewCoords``
  - ``GetForeColor`` and ``SetForeColor``
  - ``GetBackColor`` and ``SetBackColor``
