New Real-Time Chart Features
Support for Vertical Charts
Current Value Display in Real-Time Chart Legend
Chart Legend Item Selection
Preserving Linked Axes in Real-Time Chart
Graphics Server for C# / ASP.NET
LineWidth and Marker Scaling
Polygon Selection Option
New Viewport Attributes
New Features of the Graphics Builder and HMI Configurator
Editing Elements of a Group via Resources
New Alignment Options
Enhanced Ctrl-Shift-Click Shortcut
Adjusting BaseWidth on HierarchyDown
New GLG API Methods and Features
New Real-Time Chart Methods
Enhanced Handling of Object Selection and Custom Events in Zoom Mode
New Event Types in the Trace Callback
New Zoom Subactions in the Input Callback
Enhanced Zoom Reset Options for the Chart Zoom Mode
Control Over DoubleBuffering for Large Viewports
New Source Code Examples
GLG Map Server New Features and Enhancements
Open Street Map Dataset
New Layer Attributes
Miscellaneous Map Server Enhancements
Open Street Map Dataset
The new 3.8 release of the GLG Toolkit contains a number of new features, including:
A new light viewport object, which a light-weight version of the GLG viewport, has been added in the new release. While a regular (heavy-weight) viewport object uses a native window as a rendering surface, a light viewport does not create its own native window and uses the window of its parent viewport as a rendering surface. This makes it possible to have semitransparent light viewports, or to have light viewports with a transparent background. Since light viewports do not create their own native window, they comply with the drawing order when intermixed with other graphical objects, such as polygons.
Since the light viewport uses the OpenGL context of its parent viewport, it can also be used to minimize the number of OpenGL contexts used to render the drawing with the OpenGL driver.
The Arrange, Convert Viewport menu of the Graphics Builder provides options for converting viewports to light viewports and vice versa. For example, converting a button widget's viewport to a light viewport allows making the button's background transparent or making the whole button semi-transparent (see-through), while preserving the button's input handling functionality.
The gconvert utility provides options for converting between viewports and light viewports in batch mode. The GlgConvertViewportType method of the GLG Extended API provides a corresponding run-time conversion functionality.
New options were added to the settings of an object's CoordFlag attribute to allow defining pixel coordinates inside a light-weight viewport.
A new parameter was added to the GlgGetParentViewport method to specify the type
of the viewport to return: light or heavy-weight.
Vertical real-time charts are supported in the new release via the Orientation chart attribute, which can be set to HORIZONTAL or VERTICAL. All real-time chart features work transparently with either setting.
For vertical charts, the X and Y axes still refer to the Time and Value axes respectively, even though in the vertical chart the X axis is vertical and Y axis is horizontal. This allows an application to preserve programming logic, making sure that the chart will behave the same way in the application regardless of its Orientation setting.
This new feature may be used to display the most recent plot value in the legend item corresponding to the plot. The feature may be enabled by setting the legend's Display Value attribute to YES. The legend's Value Format attribute specifies the format for displaying the value. The format may include new line character to display the value on a separate line.
A legend item can be selected with the mouse. When a user clicks on a legend item, the legend determines the corresponding plot, which can be queried via an API. This can be used to highlight a selected plot when the user clicks on the plot's legend item, as shown in the Real-Time Chart Demo.
The GlgGetSelectedPlot API method may be used to query the last selected plot. The method may be invoked on a custom mouse click event added to the legend, as shown in the Real-Time Chart Demo. The GlgGetLegendSelection method provides a low-level API for querying a plot corresponding to the legend item located at the supplied mouse position coordinates.
Linkage between plots and axes is now preserved after turning the chart's Common Range property to ON and then back OFF.
The server-side GLG Graphics Server for web deployment is now available for ASP.NET in addition to the previously supported JavaEE version. The ASP.NET version of the Graphics Server may be used with Windows Internet Information Services (IIS) to deploy dynamic HMI and SCADA graphical pages on the web and mobile devices.
The ASP.NET version of the Graphics Server allows a developer to design custom HTTP handlers in C# and deploy them on the web with IIS. Various examples with the source code are provided in the examples_ASP.NET directory of the GLG installation on Windows.
The new LineWidthScaling polygon attribute controls line width scaling. It may be used to enable proportional scaling of the polygon's line width when the drawing is resized and/or zoomed. The BaseWidth attribute of a parent viewport defines a base drawing size used to determine the line width when the drawing is resized. All objects that inherit polygon attributes, such as a rectangle, circle, etc., also inherit the line width resizing behavior.
Line width scaling may be used by 3D Pipe Widgets to increase or descrease the rendered pipe diameter when the drawing size changes.
The marker's SizeScaling attribute controls scaling of the marker size in a similar fashion when the drawing is zoomed or resized.
A new Screen Factor transformation may be attached to D attributes of other objects to proportionally scale the value of these attributes when the drawing is zoomed or resized.
In the new release, the viewport's BaseWidth attribute defines the base drawing size that affects not only text scaling, but also line width and marker size scaling. The base width can now be inherited: if a viewport has BaseWidth=0, the first found non-zero BaseWidth of its closest parent viewport will be used, and the width of that parent viewport will be used in the scaling calculations. BaseWidth of any viewport, light-weight or heavy-weight, can be inherited. The BaseWidth attribute can be set to a negative value to prevent BaseWidth inheritance.
If a drawing contains other viewport objects, such as dials and buttons, and the base width is defined at the drawing level, the base width-related scaling of objects in the children viewports will be performed in a uniform manner, proportionally to the new size of their parent drawing.
The new SelectionType polygon attribute controls polygon selection with the mouse. When set to DEFAULT, selection is based on the polygon FillType: for polygons without fill, the polygon is selected only when the polygon edge is selected with the mouse. The AS_FILLED setting enables polygon selection by clicking on the inner (fill) area of the polygon even if the polygon is not filled.
The new InnerWidth and InnerHeight viewport attributes indicate the dimensions of the viewport's drawing area inside the viewport's borders. These attributes can be used with the pixel offset transformation to position an object at the right or bottom edge of a fixed-scale viewport, maintaining the object's position when the viewport size changes.
The viewport's XYRatio attribute is now shown in the viewport's properties.
The new Edit Group Elements option of the Edit menu enables the user to edit multiple objects in a group via resources. A selected editing operation, such as Set D Resource, can be applied to the elements of a group, skipping the elements that do not have the specified resource. If the Recursive option is selected, the editing operation will be also applied to the sub-elements inside each group element. The available editing operations include setting, constraining and unconstraining resources of the group's elements.
The new Position in Drawing option of the Layout menu provides options for centering an object in the drawing or positioning it at the drawing edge.
The Align to Viewport Span option of the Layout menu controls the type of the extent that will be used. When this toggle is checked, the viewport span is used as the drawing extent when positioning an object. If the toggle is unchecked, the currently visible area of the viewport's window is used as the drawing extent.
The behavior of the Ctrl-Shift-click shortcut was enhanced to enable navigating complex object hierarchies by repeated use of the shortcut. For example, if an object is a part of two nested groups, repeated Ctrl-Shift-clicking on the object will select the first parent group, then the second group and then the object. If the object is a viewport, the next Ctrl-Shift-click will move the editing focus inside it (Graphics Builder only). If the viewport has a child viewport, the next Ctrl-Shift-click on the child viewport will move the editing focus inside the child.
When the HierarchyDown button is used to go down into a viewport that has non-zero BaseWidth, the viewport's BaseWidth value is adjusted to preserve the current state of the text, line width and marker size scaling in spite of a viewport changing its size to occupy the whole drawing area of the Builder.
A new error log feature of the Graphics Builder maintains a log of all errors for the current editing session. The log may be displayed by clicking on the Log button in the lower right corner of the Builder. Previously, the error messages were recorded only in the glg_error.log file (and displayed on the terminal on Unix/Linux).
The GlgGetSelectedPlot and GlgGetLegendSelection methods described above may be used to query a plot corresponding to the legend icon selected with the mouse.
Handling of object selection and custom events in zoom mode has been changed to allow an application to prioritize object selection over handling of the current zoom mode. If an object is selected with the mouse while the viewport is in zoom mode, an application can decide to cancel any zoom mode in progress and process the object selection instead.
Previously, object selection and custom events were not processed in viewports with an active zoom mode, such as ZoomTo or Pan/Drag, which required custom code in the Trace callback if such prioritizing was required. The GIS demos and examples have been changed to use new functionality.
A new GlgEventType enum contains event types for new GLG events generated by the Toolkit when the mouse enters or leaves a light viewport. Since light viewports do not use native windows, these events are not generated by the windowing system but are still available in the GLG Trace callbacks. The enum also contains GLG enter and leave notify events for native windows on Windows, which are emulated by the Toolkit.
In the C# version of the GLG Toolkit, the GlgEventType enum also contains a new MOUSE_WHEEL event type that provides support for the mouse wheel events to the C# applications. The mouse wheel events have already been natively supported for the C/C++ and Java environments.
The new subactions indicate which particular zoom or pan operation triggered the Input callback, and include ResetY, ResetX, X, Y, x and y. The last four subactions correspond to the value of type parameter of the GlgSetZoom method.
The type parameter of the GlgSetZoom method specifies the zoom operation to perform. If GlgSetZoom is invoked with type='n' in the Chart Zoom mode, it will reset zoom only in the Y (value) direction, while type='N' will reset zoom in the X (time) direction. This provides a fine control over chart zooming.
The new GlgMaxDBFactor global configuration resource enables an application to control the maximum size of a viewport with double buffering. By default, in order to avoid system slow-down on excessive zooming due to swapping, double buffering is disabled when a child viewport size exceeds the display size. The GlgMaxDBFactor global configuration resource provides an application with an ability to control the threshold at which double buffering is disabled.
Several new widgets were added in the new release:
The spinner widgets were redesigned to maintain the X/Y ratio of the spin buttons when the spinner is resized.
The value adjustment buttons in knob widgets now support repeated adjustment action when a button is held down.
All push button and toggle widgets were redesigned to automatically dim the button or toggle when they are disabled by the viewport's DisableInput attribute.
The 3D Pipes widgets were redesigned to make the line width of all pipe types scalable, as controlled by a pipe's LineWidthScaling property. New curved pipe widgets were added, as well as pipe widgets with color dynamics. The old-style scalable pipe widgets were removed.
New source code examples were added for various environments,
including C, C++ and Java, as well as C#, C++ CLI, MFC, VB.NET, C#
OCX and VB.NET OCX on Windows.
The preprocessed Open Street Map (OSM) dataset is now available for use with the GLG Map Server. The dataset contains vector data for the whole Earth down to the street level and buildings details. The dataset is preprocessed into a hierarchical tiled layout for optimum performance with the Map Server and includes a complete set of setup files. The size of the whole Earth dataset is 100 GB. View Image Gallery.
The new release provides an enhanced option for handling map zooming. In the previous releases, the calculated zoom factor did not depend on the size of the generated map, displaying the same level of detail regardless of the map size. In the new release, the ZOOM FACTOR TYPE parameter of the SDF file provides an option for calculating zoom factor that changes proportionally to the map size. This feature may be used to automatically display more map details when the map size increases.
The BASE WIDTH parameter of the SDF file specifies the base width of the map used to calculate the zoom factor. Since the zoom factor calculation depends on the value of BASE WIDTH, the value of the BASE WIDTH attribute may be used to adjust at what point the map layers are activated or deactivated.
The LABEL REPEAT DISTANCE layer parameter defines a minimum distance in pixels between labels with the same label string. It may be used to enhance rendering labels of named streets and roads that are split into multiple segments.
The WRAP LABEL LENGTH parameter may be used to wrap long label strings.
The LAYOUT MARKERS parameter may be used to force markers to be drawn even if rendering of the markers' labels is disabled by the label layout negotiations.
The DRAW CENTER MARKER parameter may be used to render polygons as markers. This can be used to draw small (but important) polygons that otherwise would be invisible at low zoom levels due to their small size. The NONE value of the FILL TYPE parameter may be used to disable rendering of polygons that are rendered as markers.
The LABEL FORMAT2 and POLY LABEL FORMAT2 parameters may be used to specify alternative label formats to be used if attributes used in LABEL FORMAT or POLY LABEL FORMAT are missing for some objects.
The MAX FILL ITERATIONS parameter of the SDF file may be used to fine tune the maximum number of internal iterations used to render filled polygons. This parameter is set to a higher value when rendering large filled polygons (such as OSM country or state areas) with very high zoom levels.
Precision of the BBOX directive in the SLF files generated by the map server utilities was increased to avoid gaps in elevation layers under high zoom levels.
The use of the '-' prefix for the default layer and aliases is now supported.
A special -4 value may now be used in an attribute condition to reference the current zoom factor. This may be used to specify zoom factor condition in the layer string to dynamically change zoom thresholds or enable quick testing of MIN and MAX ZOOM settings.
A new roboto TrueType font was used as a default font.
A new verbosity value of 1003 may be used to display vector tiles coverage as filled areas without displaying the tiles' content.
Support for a new GLM_I attribute type for integer attributes was added to the GvfWriteAttribute method. Integer attributes are saved using the "%.0f" format to decrease the size of the generated GVF file for datasets with a large number of integer attributes, such as the OSM dataset.
Support for the -glg-elevation-layer command-line option and the GISElevationLayer global configuration resource were added to the Graphics Builder for more convenient interactive testing of elevation datasets in the Builder.
The following bugs were fixed in the new release: