GLG 2.7 Release: New Features and Enhancements
New GIS Map Server product
GLG GIS Object
New GIS Demo
GIS Zoom Mode and
Coordinate Conversion Functions
New Utility
Function for Transforming Objects
Save Image
Builder Option and API Method
Headless Support
for Server-Side Image Generation
Performance
Improvements for the Java Version of the Toolkit
New Spline Type
New Type of a Path
Transformation
New Undo Type in
the Graphics Builder
New Integrated Zoom Modes
New Tooltip Messages
Extended Trace Callback
Support
New C, C++ and Java Examples
Dropped Ext Suffix of
the GLG Bean's Extended API Methods
Changed the GLG Library
Layout
New GIS Map Server product
The GLG Map Server is a sophisticated GIS Map Server which complements
the GLG Toolkit by providing real-time map display capabilities. It
supports both
vector and raster data and is optimized for real-time rendering of
high-resolution maps with millions of objects. It is available on both
Unix and Windows platforms and can be used in conjunction with the GLG
Toolkit or stand-alone, via a library API interface or a web-server
setup. Click here for more
information on the GLG Map Server.
Both C/C++ and Java version of the GLG Toolkit may utilize the Map
Server functionality via the integrated GLG GIS Object, which
incorporates dynamic maps into a GLG drawing and the GLG Graphics
Builder.
GLG GIS Object
A new GLG GIS Object seamlessly integrates Map Server functionality
into the GLG drawing, both in the application and the Graphics Builder.
The GIS object displays a map image in a selected GIS projection inside
of the GLG drawing and transparently handles all aspects of interaction
with the Map Server, automatically issuing map requests every time the
map is resized, panned or zoomed. Other GLG objects may be placed on
top of the GIS Object to annotate the map with dynamic or static icons.
The GIS Object supports integrated zooming and panning, as well as
utilities for converting from screen or world coordinates to
latitude/longitude in the selected projection and vise versa. The
attributes of the GIS Object can be accessed using the GLG Standard
API.
The GIS Object is supported in both C/C++, Java and ActiveX deployments
on both Unix and Windows platforms.
New GIS Demo
A new GIS demo was added to show an example of using the GIS Object in
a GLG application. The demo shows dynamic airplane icons on top of a
GIS Object's map and demonstrates zooming, panning, object selection,
coordinate conversion and dynamic icon positioning capabilities.
Both C/C++ and Java versions of the demo are provided. The C/C++ demo
uses the map server in the form of a library API, while the Java
version of the demo uses the map server installed on a web server as a
CGI-bin executable.
GIS Zoom Mode
and Coordinate Conversion Functions
A support for a new integrated GIS Zoom mode was added to the viewport
object. The new zoom mode accommodates GIS applications which need to
zoom the map inside of the GIS Object instead of zooming the whole
drawing. The new GIS Demo demonstrates the use of the new zoom mode.
New coordinate conversion methods were added to the GLG Standard API to
provide an easy way to convert from latitude/longitude to the GLG world
coordinates and vise versa. The new GIS Demo provides an example of
using the converted world coordinates to position dynamic airplane
icons on top of the map.
New Utility
Function for Transforming Objects
A new set of convenience functions for moving, scaling, rotating and
positioning complex objects was added to the GLG Extended API. The new
functions provide a simpler interface to the existing
GlgTransformObject method.
A world-to-screen and screen-to-world conversion functions were added
as well.
Save Image
Builder Option and API Method
A new Save Image option was added to the File menu of
the
GLG Graphic Builder to save a JPEG image of the drawing (including all
nested drawings in children viewports).
A new SaveImage method was added to the C/C++ Standard API to
generate a JPEG image of the drawing under the control of an
application.
In the Java version of the Toolkit, a new CreateImage method
was
added to the Standard API to generate and return a Java Image object
containing the image of the GLG drawing or GLG bean.
Headless
Support for Server-Side Image Generation
The Java version of the Toolkit now supports headless operation using
headless support available in Java2. The headless mode may be used for
Java applications running on a server to generate images of graphs, for
example. If the server is headless (has no graphical console and no
windowing system running), the headless mode uses OpenGL for image
generation instead of the windowing system's drawing primitives used
normally. A new SetHeadless method was added to the GLG
Standard API for Java to facilitate headless mode support. A new image
generation Java example is provided as well.
Performance
Improvements for the Java Version of the Toolkit
An object cache for temporary objects was added to facilitate the
temporary objects reuse. The reuse of temporary objects decreases
garbage collection time and increased performance.
New Spline Type
A new Catmull Rom spline type was added to the GLG spline object. While
the Bezier spline yields a smoother curve due to its continuous second
derivative, the Catmull Rom spline passes through the control points,
making it convenient for applications which need to draw a smooth curve
through a set of points.
New Type of a Path
Transformation
A new type of path transformation was added to allow using splines,
arcs and other complex objects without exploding them. Previously, the
path of the transformation could be constrained only to a polygon.
While the spline or arc points could be used, they could not be
constrained to, resulting in
the transformation's path not reflecting changes to the spline's or
arc's shape. Now the transformation allows using complex objects as the
path, with the path reflecting any changes to the spline or arc objects
used as the path
(for example, a change of the arc's radius or spline's control point).
The new path transformation can be used for a series object,
replicating objects along a spline or an arc.
New Undo Type
in the
Graphics Builder
An Attribute Value Change undo was added to the Graphics Builder to
allow undo of an attribute value change (for example, color change
undo). Previously, only shape and geometry changes were recorded.
New Integrated Zoom Modes
A support for a few new integrated zoom modes was added:
- 'U' - scrolls to the upper edge of the drawing
- 'D' - scrolls to the lower edge of the drawing
- 'L' - scrolls to the left edge of the drawing
- 'R' - scrolls to the right edge of the drawing
- 'F' - fit the area of the drawing defined by
an object named GlgFitArea to the visible area of the viewport
- 'T' - start custom ZoomTo mode. Custom zoom
mode draws a ZoomTo rectangle but does not perform the ZoomTo
operation. An application can handle Zoom events in input callback to
perform a custom zoom or rubberband selection operations.
New Tooltip Messages
New tooltip messages were added into the Input callback to enable the
application logic to display custom tooltips based on
application-defined conditions.
Extended Trace
Callback Support
The Trace Callback support was added to the C++ binding and the GLG
ActiveX Control, enabling the application to handle native windowing
events in these programming environment.
New C, C++ and Java Examples
A set of new C, C++ and Java examples was added to the GLG Toolkit
installation to demonstrate the following common tasks:
- using a GLG control widget (control widget example)
- creating a panel containing several GLG gauges (control panel
example)
- constraining object attributes (constrain attributes example)
- adding custom data to objects programmatically (custom data
example)
- creating and moving objects programmatically (object create and
move example)
- positioning objects programmatically (object position example)
- selecting objects with the mouse (object selection example)
- generating a graph's image (GlgImageGeneration example, Java)
- using GLG bean as an applet showing a graph (GlgGraphApplet
example, Java)
- using GLG bean to show a graph as a part of another applet
(GlgGraphComponent example, Java)
- subclassing GLG bean (GlgSubclassExample example, Java)
The new examples are located in the example_c_cpp and examples_java
subdirectories of the GLG installation directory.
Dropped Ext
Suffix of
the GLG Bean's Extended API Methods
The Ext prefix of the GLG Bean's Extended API calls was removed. The
old calls are still supported for back compatibility, but the new
methods without the Ext suffix should be used for new development. All
demos and examples were updated to use the new methods.
Changed the GLG
Library Layout
The layout of the GLG library on Unix was changed to make it more
modular. The libz compression library and the jpeg support
library (libjpeg) need to be explicitly linked with. If the map
server is used, the map server library (libglg_map) and the tiff
support library (libtiff) need to be linked with as well. If the
map server functionality is not used, a map server stub library (libglg_map_stub)
can be used instead. Refer to the makefile in the glg/src
directory for linking examples.
When migrating an application from the release 2.6 of GLG or earlier to
the release 2.7, the makefile has to be modified by adding all
libraries
required for linking.