Change python arg float-to-int conversion to python 2.7 style.

In Python 2.3 through 2.6, if a method that expected an integer
parameter was given a float, then a DeprecationWarning was printed.
In Python 2.7, a ValueError exception occurs instead.  This patch
causes the vtk python wrappers to follow the python 2.7 behavior:
If a VTK method expects an int but is given a float, an exception
will occur.

The rationale for this change was that it is very difficult to find
out what python code is causing the "deprecation warning", because
it does not print the method or line number.  If an exception is
generated, the the user sees a stack trace and can therefore easily
fix the python code.

Change-Id: I11f0efb506884fc4eedae84bb251b10102daae48
Sync modified gl2ps version with upstream 1.3.8.

Patches to gl2ps were accepted and modified, this patch updates our
version to match the recently released v1.3.8.

Change-Id: I6cd7b168ee6a7671c0ad16281f975955dcb9a07b
Add GetConstrainedFontSize to FTTools and MTUtilities.

Add a method to compute the font size needed to make text rendered
by FreeTypeTools or MathTextUtilities fill a specified rectangle.
The documentation of vtkTextMapper::GetConstrainedFontSize is
clarified, too.

Change-Id: I39de26b5173153eaec9e8f5f2857fe9964bad768

s constrained -- add note about updated docs for tmapper

Change-Id: Ib8c042285aabc719fe57825c05d85b6ab2b59c4b
Add multiline, justification, and shadows to vtkFreeTypeTools.

Also, explicitly return text dimensions from text rasterization
functions. Older hardware requires texture image dimensions to be
powers of 2. Since the text will only be rendered into a portion of
the image in these cases, the text dimensions are needed to calculate
the texture coordinates during rendering.

Some classes were hiding the text dimensions in the image metadata, e.g.
texture coordinates and text dimensions were stored in Spacing and Origin.
This undocumented behavior was confusing and unintuitive.

Now functions that rendering scaled images explicitly return the text
dimensions.

Change-Id: Ic74b0dd9573d336427038985c671a8b724c92429
Clean up comments, style in FreeTypeTools.

Change-Id: I9e020c0d7e19294762f8fb270dccc7e42a49f748
Add a TextRenderer interface and implementation.

An abstract vtkTextRenderer interface is added to RenderingCore.
This will allow all rendering classes to have access to text rendering
functionality without an explicit dependence on RenderingFreeType. Once
existing code is migrated to use this simplified interface, applications
using VTK will be able to add their own text rendering backends easily.

The interface is designed to, at minimum, switch between FreeType and
MathText rendering, enabling any users of the interface to have access
to pretty-printed equation by passing in MathText markup, which is a subset
of LaTeX. The implementation will test for the presence of "$...$" in the
input string and, if present, MathText will be used instead of FreeType.
If MathText is unavailable (it requires python and matplotlib) or fails
to render, a warning is produced and the FreeType backend is used as a
fallback.

The default implementation of this class is vtkMathTextFreeTypeTextRenderer
in the RenderingFreeType module.

Change-Id: I215ad856e3f197c3ea22eb8f9dd68e5ec2f9e620
Port vtkTextActor to use vtkTextRenderer.

The MathTextActor is updated too, since it used the FTUtilities class
cached by TextActor. I plan to remove the MathTextActor classes completely,
since their functionality is redundant once TextActors are using
TextRenderer.

Change-Id: I098a02ac5e55c1ce31423c1268fb4db2e2b5bb1f
Add simple benchmark to test new text rendering classes.

The benchmark is in Rendering/FreeType/Testing/Cxx, and is disabled
by default since it takes a little while to run and will never actually
fail.

The benchmark compares the new FTTools implementation to FTUtilities,
which was previously the only way to render multi-line text. A variety
of font sizes, orientations, etc are used in order to force cache misses
in the FreeType cache. The test string is unusually long for VTK (500
lines), but this was necessary to ensure that each render occurred on a
measurable timescale. vtkTextRenderer is also tested to benchmark the
overhead that the TextRenderer layer adds.

On my machine in a release-mode build, I get:

FTTools: Total: 23.06  Min: 0.00  Max: 1.29  Ave: 0.23
TextRen: Total: 22.94  Min: 0.00  Max: 1.28  Ave: 0.22
FTUtils: Total: 27.00  Min: 0.01  Max: 1.48  Ave: 0.27

So some of the renderings in the new class are still occurring faster
than clock() can detect, but there is nevertheless an improvement
over FTUtils. It would be useful to figure out a way to benchmark small
strings of 1-5 lines in a reasonable way.

Change-Id: I8f37e3130ed766932f671f315ce790d1772e2410
Fix failing TestCaptionActor.

The text drop shadow was colored the same as the text, creating a very
difficult to read label. This patch resets the color property of the
caption's text actor to the default vtkProperty2D color.

Change-Id: Id00640dca2fc97ef81011feec5be4993116e3217
Cleanup vtkTextRenderer documentation and overloads.

Change-Id: I97463a1271e84d86cb8c5a64ca8d74ff20a971bb
Merge topic 'BumpGL2PS138' into master

5f2e0863 Sync modified gl2ps version with upstream 1.3.8.
Merge topic 'python-float-to-int' into master

7b53f28e Change python arg float-to-int conversion to python 2.7 style.
Merge topic 'TextRenderer' into master

75e3726f Cleanup vtkTextRenderer documentation and overloads.
ef48d154 Fix failing TestCaptionActor.
c3f33573 Add simple benchmark to test new text rendering classes.
d17c39aa Port vtkTextActor to use vtkTextRenderer.
f393fa8b Add a TextRenderer interface and implementation.
e5e484be Clean up comments, style in FreeTypeTools.
6dd7b574 Add multiline, justification, and shadows to vtkFreeTypeTools.
5c14d896 Add GetConstrainedFontSize to FTTools and MTUtilities.
Fix compiler warning on vtkFreeTypeTools.cxx.

http://open.cdash.org/viewBuildError.php?type=1&buildid=2720671

Change-Id: I53208b87a10e96a167885a944f00516d8a9da444
Merge topic 'TextRenderer' into master

445d87f0 Fix compiler warning on vtkFreeTypeTools.cxx.