Generic Logic, Inc.

GLG 2.8 Release: New Features and Enhancements

New Toolkit Features

Tag Data Access Mechanism
Custom Tag Data Browser
SetResourceIf Functions
Threshold Transformation
New Blinking and Timer Animation Transformation
Polygon Points Merging
List and Option Menu Native Widget Handlers
Object Dynamics and Object Palettes
References and Subdrawing Attribute Rebinding
Java Performance Improvements
Direct Rendering Callback For Java
Rotation Support for Integrated Zooming and Panning
Loading Drawings and Images from URLs
I18N, Multi-Byte and Unicode Support
Drawing Localization Using Strings Export/Import Feature
Diamond Marker Type and Rendering Extensions Support
Better Control over URL Drill-Down
New API methods

New Map Server Features

Map Server Performance Improvements and Related New Features
Map Server Map Rotation Support
Map Server True Type and I18N Support
Map Server DEM Files Support Option
Additional Map Server Coordinate Systems Support
Remote Map Server Use for C/C++/ActiveX Applications

New Toolkit Features

Tag Data Access Mechanism

Added tag data access mechanism to simplify data connectivity to external process databases. While resources reflect the object hierarchy of the drawing, tags are global names which can be used for supplying data without knowing the exact structure of  the drawing. The tags are associated with resources and then used to supply real-time data without using resource paths.

The resources are organized in hierarchies, making them ideal for dealing with a large number of objects with similar structure. For example, if an icon has resources named "Label" and "Value", the  label and value attributes of any of the icon's instances may be  accessed using these resource names. If all icon instances are  named by appending a numerical suffix to the "Icon" string, the "Icon5/Label" and "Icon5/Value" resource names may be used to  access the label and value of the fifth icon.

If an application uses a process database as the source of the incoming data, it needs to associate non-hierarchical database field names (called tags in process control lingo) with the hierarchical resource names in the drawing. For example, the Temperature5 database field may be used for updating Icon5/Value resource, and Temperature6 for Icon6/Value. If objects in the drawing are generated programmatically by copying object icon templates, the application knows the structure of the drawing and can easily translate database field names to resource names in the drawing.

Connecting database tags with the resource names becomes a bigger problem if the drawing was created by an end user and resource names conventions were not enforced. When an application loads the drawing, it does not know what objects exist in the drawing and what resources it needs to update with data. In such cases, it would be very convenient to allow the end user to associate resources of the drawing with the database tag names, and the new GLG tag data access mechanism provides this feature.

In the new release, each GLG resource has a tag name in addition to a resource name. When a new instance of an object is created in the Graphics Builder, any of the object's resources may be associated with process database tags by defining a tag name attribute for each resource that needs dynamic updates. The tag names are global, allowing the application to query all tags defined in a drawing as a flat list, unlike querying resources which are defined by hierarchical path names.

At run time, the application can query a list of tags defined in the drawing and use them to subscribe to data updates for these tags. When a data change event is received, the application can simply invoke the SetTag method of the GLG API, supplying the tag name and new tag value as parameters.

The tag data access mechanism can also be used without a database.  In this case, tags are used as global resource identifiers, providing an application with a convenient way to query and access all resources of an arbitrary drawing that needs dynamic updates.

Custom Tag Data Browser

The Graphics Builder includes a mechanism for integrating a custom tag data browser which allows the user to browse database tags and select them from a list instead of typing them in manually. A sample of a custom tag browser that comes with the release provides a good starting framework for writing a custom data browser to browse application's data sources inside the Graphics Builder.

SetResourceIf Functions

A new set of functions for setting resources has been added. The new functions have the "If" suffix and optimize performance of applications that set resource values regardless whether the values have changed. The resources that did not change will not trigger graphical updates. This optimization should be used selectively, though: it must not be used for updating graphs, since they should still plot lines when the graph's value does not change.

Threshold Transformation

A threshold transformation for changing object colors and other attributes depending on the attribute value has been added. Previously, thresholds had to be implemented in an application code. The new threshold feature allows to define and edit thresholds interactively in the Builder.

For example, if an object's color has to change depending on the range of a data value, a threshold transformation can be attached to the object's color attribute, defining the threshold values and the corresponding colors. The color will be changed automatically as the value falls within a particular threshold.

New Blinking and Timer Animation Transformation

The new release includes blinking and timer animation transformations, enabling the user to integrate blinking and simple animation into a drawing with no programming. The timer transformation periodically changes the value of the resource the transformation is attached to. The transformation may be used to periodically change the color, visibility or any other attribute of an object, resulting in the "blinking" effect. The time interval of the transformation is defined as a transformation parameter and may be set in the Builder or at run-time.

The timer transformation can also be used for changing object's position, angle or some other geometrical parameter, so that the object moves, rotates or performs some other geometrical animation on every timer iteration. The transformation provides several choices of update curves (linear, sine, etc.) to control the animation.

Polygon Points Merging

This is a new feature of the Graphics Builder that allows merging two polygons into one, as well as inversing the order of a polygon's points.

List and Option Menu Native Widget Handlers

The GlgNList and GlgNOption interaction handlers have been added to the Toolkit, allowing an application developer to embed native list and option menu (combo box) objects into a GLG drawing and handle all user interaction without the need to write native C/C++ or Java code. When the drawing containing the list and option menu objects is deployed in different programming environments (X Windows or Windows, C/C++, ActiveX or Java), the corresponding platform-specific list or combo box widget is used to render the list and option menu input object.

Object Dynamics and Object Palettes

The object dynamics feature of the GLG reference object is a new addition to the existing subdrawing dynamics. A subdrawing is a reference object that uses a drawing file as a template. Subdrawing dynamics was implemented by changing subdrawing's DrawingFile property to display a different sub-drawing. A list transformation with a list of drawing filenames could be attached to the DrawingFile attribute to change the drawing based on an integer value representing a logical state of the object.

A typical application utilizing subdrawing dynamics would use such reference object to display different icons depending on the logical state of the object. The subdrawing files were automatically cached for better performance, and the only drawback of the subdrawing dynamics was the need to place each icon in a separate drawing file, increasing the number of files the application would need to maintain.

The object dynamics overcomes this limitation by allowing multiple icon objects to be placed in one template drawing (object palette), making it easier to edit them. It also allows the template to be embedded in the main drawing as an object palette, without a need for any additional drawing files, making it possible to use the code generation feature for drawings with object dynamics.

A new ObjectPath attribute was added to the reference object to define the resource path of an object in the object palette to be displayed. Changing this path will change the displayed object without a need to load a different drawing file. The ObjectPath attribute works with both the subdrawings (reference objects that reference an an external file), as well as with reference objects that have their templates included. To implement object dynamics, a list transformation may be attached to the ObjectPath attribute to change displayed icon depending on the object's state.

References and Subdrawing Attribute Rebinding

Added rebinding feature for attributes of subdrawing and reference objects. This feature allows to define "local" values and names for the subdrawing object's attributes. The "local" values are stored in the instance of the subdrawing or reference object and can be saved with the drawing.

Previously, when the subdrawing or reference object was loaded, all its attributes were instantiated from its template. The rebinding feature allows the user to define some attributes of a subdrawing or reference as local and to customize them, saving the customized local values when the drawing is saved.

If a reference object represents a node of a diagram, the rebinding feature enables the application to use the same template for all nodes while assigning different label strings, colors, and other attributes. The assigned custom values may now be saved with the drawing.

This feature is particularly useful for defining tag names for attributes of subdrawings and reference objects. If an attribute of a subdrawing is defined as rebound, the user can define a tag name for the attribute of the subdrawing's instance, which will be saved with the drawing. When the drawing is loaded, the saved tag name will be loaded instead of instantiating the tag name from the subdrawing's template. This allows assigning custom tag names to attributes of subdrawing instances, connecting each instance to its own data source.

Java Performance Improvements

Improved Java performance and decreased garbage collection pauses by managing commonly used objects instead of relying on Java's garbage collection. The commonly created and destroyed objects, such as matrices, points, rectangles, etc. are now cached and reused, instead of being destroyed and reallocated.

Direct Rendering Callback For Java

The CustomDraw callback has been added to the Java version of the GLG Toolkit to support direct rendering. It may be used as an escape mechanism for rendering graphic primitives directly into GLG drawing by Java applications which render huge number of simple drawing primitives and want to avoid object overhead.

Rotation Support for Integrated Zooming and Panning

The X, Y and Z axis rotation support has been added to the integrated zooming and panning. It allows to easily rotate the drawing using integrated zooming and panning API and key bindings, without a need to attach a rotate transformation.

Loading Drawings and Images from URLs

The new release supports loading drawings, subdrawings and images from remote sites by using a URL as a filename. This enables the GLG ActiveX Control embedded in web pages to include subdrawings and images residing on a web server. It also allows GLG C/C++ applications to load drawings, subdrawings, images and map server images from a web server.

I18N, Multi-Byte and Unicode Support

The new release extends the internationalization support by including UTF-8 Unicode support in addition to the existing multi-byte support.

The Unix/X Windows version of the Toolkit supports all system locales, including multi-byte and/or UTF-8 based locales, and provides an option for using Xmb functions to load font sets and render text strings according to the system locale. The FontName attribute of the font object now accepts both the font names as well as font set names for Xmb functions.

The Microsoft Windows version of the Toolkit supports all Windows locales, both single and multi-byte. It also supports UTF-8-encoded text strings independent of the locale, which is implemented in the same executable using Windows' Wide Characters functions. The UTF-8 encoding enables an application to share drawings between Unix and Windows versions of an application in a system locale-independent way.

The Java version of the Toolkit supports all system locales using Java's integrated Unicode support.

Drawing Localization Using Strings Export/Import Feature

The strings export and import utilities, Graphics Builder options and Programming API have been added to both the C/C++ and Java versions of the Toolkit. They provide a convenient way for application developers to export all strings defined in a GLG drawing into a file. The string file can then be translated into a different language and used to replace the strings in the drawing with the localized strings.

The translated strings file can be used as an application resource file and imported into the drawing at run time. Alternatively, the strings file can be imported into the drawing ahead of time, using the GLG Graphics Builder Import option or a batch utility, and the localized version of the drawing can be supplied.

Diamond Marker Type and Rendering Extensions Support

The rendering extensions support (gradient, shadows, etc.) has been extended to the marker object.  A support for a new diamond marker type has also been added.

Better Control over URL Drill-Down

The HRefTarget bean parameter has been added for better control of drilling down on another URL. The parameter allows opening the URL in a separate window without writing application code.

New API Methods

The GlgSetElement container convenience method has been added to the C/C++, ActiveX and Java APIs.

New methods for setting resources have been introduced to the C/C++, ActiveX and Java APIs. The new methods do not cause redraw of the graphics if the resource value has not changed.

New Map Server Features

Map Server Performance Improvements and Related New Features
Map Server Map Rotation Support
Map Server True Type and I18N Support
Map Server DEM Files Support Option
Additional Map Server Coordinate Systems Support
Remote Map Server Use for C/C++/ActiveX Applications

Map Server Performance Improvements and Related New Features

In the new release, the Map Server code has been optimized to increase performance of both vector and image data rendering up to 30% for a general case and up to 400% for some special cases of vector layers. Additional optimizations have been done to increase performance of semi-transparent layers. The code has been changed to allow intermixing vector and image layers. Previously, all image layers were rendered first and vector layers were always drawn on top, making it difficult to use shaded relief images with vector layers.

A new culling feature has been added to allow the Map Server to skip polygons which are too small to be rendered under the current zoom level. An improved clip technique has also been added to quickly skip polygons that are outside of the current map request, in both rectangular and orthographic projections. The tile clipping has also been optimized, resulting in additional performance improvements for huge vectors datasets, such as Digital Chart of the Word and Census Tiger Dataset. New layer configuration variables have been introduced to control resolution of both features.

The culling feature is especially beneficial for top-level map views, where a lot of details (islands, etc.) are too small to be rendered and may be quickly eliminated. The new clipping feature speeds up zooming to a specific map area, efficiently eliminating clipped-out polygons in addition to the tile clipping, and producing dramatic drawing performance improvements of up to 400 percents for some special cases of zooming into large untiled vector maps.

A BINARY save format for vector layers has been introduced. The BINARY format significantly speeds up loading vector layers' data from GVF files, resulting in much faster total map image generation time. A new GVF file conversion utility is provided to convert GVF data files between BINARY and ASCII save formats.

The diagnostic output of the Map Server has been extended in the new release, providing verbosity setting to output performance measuring and timing stats, as well as extended tile usage information.

Map Server Map Rotation Support

The map rotation support has been added to the GLG Map Server. It allows an application to rotate the map instead of always orienting it with the North pointing up. This is useful in applications which need to display a map from a point of view of a pilot or an observer looking in certain direction. An Angle attribute has been added to both the GIS Object and the map server request to facilitate map rotation.

Map Server True Type and I18N Support

True Type font support has been added to the GLG Map Server in addition to the vector fonts. International character sets are also supported using UTF-8 Unicode encoding.

Map Server DEM Files Support Option

New rendering type option has been added to the Map Server's rendering engine to facilitate the use of elevation DEM files via shaded relief images.

Additional Map Server Coordinate Systems Support

Support for the MGRS and UTM coordinate systems has been added to the Map Server. New functions have been added to convert from latitude/longitude to MGRS or UTF coordinates and vice versa.

Remote Map Server Use for C/C++/ActiveX Applications

This new feature enables the ActiveX and C/C++ GLG applications to use the Map Server in the form of either local C library or a remote web-based Map Server. Previously, only the Java applications could use web-based Map Server for generating map images.