
OEDepict TK 2.2.3
================================================================================

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

* :ref:`OEPrepareDepictionOptions <OEDepict_OEPrepareDepictionOptions>` added to allow finer
  grained control of the :oe:func:`OEDepict::OEPrepareDepiction`
  function.

* :oe:func:`OEDepict::OEGetMoleculeCoords` and
  :oe:func:`OEDepict::OEGetDisplayCoords` functions added that convert
  2D points between the molecule and the display coordinate systems.

* :oe:func:`OEDepict::OEAddHighlightOverlay` added to elegantly
  highlight overlapping sections of a molecule.

* Added the following functions to *OESystem* to provide predefined sets
  of colors:

  * :oe:func:`OESystem::OEGetColors`
  * :oe:func:`OESystem::OEGetContrastColors`
  * :oe:func:`OESystem::OEGetDeepColors`
  * :oe:func:`OESystem::OEGetLightColors`
  * :oe:func:`OESystem::OEGetVividColors`

* Added the following colors to *OESystem* :

  * :oe:const:`OESystem::OESystem::OEBrass`
  * :oe:const:`OESystem::OESystem::OECopper`
  * :oe:const:`OESystem::OESystem::OEGold` (the original color was renamed :oe:const:`OESystem::OESystem::OEMandarin`)
  * :oe:const:`OESystem::OESystem::OESilver`
  * :oe:const:`OESystem::OESystem::OEPewter`

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

* Fixed Linux thread safety when writing :file:`.png` files. The Cairo
  graphics library (http://cairographics.org) used to draw
  :file:`.png` images on Linux is not thread safe. **OEDepict TK** now
  performs its own mutual exclusion when calling into the Cairo
  graphics library to ensure thread safety. It is strongly recommended
  to use the :file:`.svg` file format when speed and server throughput
  is a concern. Web browser support for :file:`.svg` has improved
  significantly in recent years and it is more effective at
  representing molecule graphs since they are mostly vector
  graphics. The only time :file:`.png` is preferable over :file:`.svg`
  is when rendering heavy raster graphics like property maps from
  **Grapheme TK**.

* Fixed thread safety of creating :file:`.svg` images.

* Increased the default font size of the atom label and atom property label.
  See the effect of this change in :ref:`Table: Example of increasing the default font size
  <table_AtomLabelSize>`.

  .. _table_AtomLabelSize:

  .. list-table:: **Example of increasing the default font size**

     * - **OEDepict TK 2.2.2**
       - **OEDepict TK 2.2.3**
     * - .. image:: ../../depicttk/images/releasenotes-2.2.3/AtomLabelSize_toolkits2014_Feb.*
       - .. image:: ../../depicttk/images/releasenotes-2.2.3/AtomLabelSize_toolkits2014_Jun.*

* The reaction role of hydrogens will no longer be thrown away during
  the depiction process. Specifically, all information present on
  explicit hydrogens will be preserved during the depiction process.

* **OEDepict TK** generated :file:`.pdf` files opened by several PDF
  viewers would show the file as edited due to an internal
  representation problem. PDF viewers should no longer modify
  **OEDepict TK** generated :file:`.pdf` files.

* **OEDepict TK** generated :file:`.pdf` files should no longer cause
  the following warning messages when read into Adobe Acrobat:

  ::

     The font 'Arial-Bold' contains a bad /BBox.

  The Helvetica font will now be used as the default font in
  :file:`.pdf` files. The :oe:const:`OEDepict::OEFontFamily::Arial`
  constant will now map to Helvetica as well in :file:`.pdf` files.

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

* Isotope hydrogens are never suppressed by the
  :oe:func:`OEDepict::OEPrepareDepiction` function.

* :file:`.svg` and :file:`.bsvg` image dimensions are now specified by
  the "viewBox" parameter rather than the "width" and "height"
  parameters.  This allows scaling the images in web applications.

* Functions and constructors of classes of Ogham API
  will now throw warning messages about being deprecated.

* Removed unbounded stack allocations.

* Fixed the problem when wedge bonds were not highlighted correctly when using the
  :oe:const:`OEDepict::OEHighlightStyle::Color` highlighting style.
  See the effect of this change in :ref:`Table: Example of highlighting wedge bonds with "Color" style
  <table_WedgeColor>`.

  .. _table_WedgeColor:

  .. list-table:: **Example of highlighting wedge bonds with "Color" style**

     * - **OEDepict TK 2.2.2**
       - **OEDepict TK 2.2.3**
     * - .. image:: ../../depicttk/images/releasenotes-2.2.3/WedgeColor_toolkits2014_Feb.*
       - .. image:: ../../depicttk/images/releasenotes-2.2.3/WedgeColor_toolkits2014_Jun.*

.. oe:language:: python

   * :oe:cls:`OEDepict::OEImageBase::DrawPolygon` will now properly
     throw an exception when passed incorrect arguments.

   * Adding the following division operators to the
     :ref:`OE2DPoint <OEDepict_OE2DPoint>` class to be compatible with Python
     3.x:

     * __truediv__
     * __itruediv__
     * __floordiv__
     * __ifloordiv__

.. oe:language:: java csharp

  * Functions and methods that returned a :ref:`OE2DPoint <OEDepict_OE2DPoint>`
    to Java and C# no longer return a dangling reference that was easy
    to cause crashes with.

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

* Updated the :ref:`Highlighting Overlapped
  Patterns<section_highlighting_overlap>` section and added a new code
  example that shows how to highlight overlapping matches using the
  new :oe:func:`OEDepict::OEAddHighlightOverlay` function.

* Documentation updated to reflect that
  :oe:meth:`OEDepict::OE2DMolDisplayOptions::SetAtomPropertyFunctor`
  and
  :oe:meth:`OEDepict::OE2DMolDisplayOptions::SetBondPropertyFunctor`
  are preferred over using
  :oe:meth:`OEDepict::OE2DAtomDisplay::SetProperty` and
  :oe:meth:`OEDepict::OE2DBondDisplay::SetProperty` directly to ensure
  molecule scaling fully accounts for the size of the labels.

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

* Added the missing documentation for the following *OESystem* colors:

  * :oe:const:`OESystem::OESystem::OEGreenBlue`
  * :oe:const:`OESystem::OESystem::OEGreenTint`

* The example for a python-based web interface and web service have been
  moved to our `Python Cookbook <http://docs.eyesopen.com/toolkits/cookbook/python/>`_.
