Here is a summary of changes from V6.1 to V7.0 with links to the relevant reference documentation, where new functionality is marked with , and enhanced functionality is marked with
Indirect identifiers have been introduced. Already available via the generic type declaration in an args statement within a user function, they are now generally available as pointers to other identifiers.
They also enable structures to be returned from a new indirect function type.
Indirect identifiers (the name generic may be used as well) are declared by the new indirect command, and initialized by the => assignment operator, e.g.
numeric x, y indirect ptr => x ptr = 55;# Sets x to 55 ptr => y ptr = 100;# Sets y to 100
Indirect identifiers are permitted as members of user structures, and may point to any identifier, identifier array, array element, array element range and so on.
The indirect_function command creates a function which will return an indirect identifier, e.g.
indirect_function getrect { args w=window # Returns a pointer to a window rectangle: # For graphic windows, the rectangle returned is the canvas rectangle # for other windows, the rectangle returned is the full frame rectangle if (w.style == 'graphic') funcval => w.inrect else funcval => w.outrect } indirect rect => getrect(mywin)
A system of layers has been introduced for graphic windows. This augments/replaces the window.group_order system of layering entity groups which still remains available.
The window group order is now mapped into a series of vector layers, which together with other window graphics (background, cloth, grid etc.) form an array of layers, see window.layers which can be manipulated or re-ordered. A new identifier type layer has thus been introduced.
Several new attributes have been added to graphic windows for access to the various layers:
All layers window.layers Annotation layer window.annotation_layer Background layer window.background_layer Cloth layers window.cloth_layers Pre-vector layers window.pre_vector_layer Vector layers window.vector_layers Post-vector layers window.post_vector_layer Grid layer window.grid_layer Scalebar layer window.scalebar_layer Vane layer window.vane_layer
Every group in a window's group order now has a corresponding vector layer. There is a new function window.vector_layer() to retrieve the layer corresponding to a group.
The layer structure itself has several attributes for manipulation purposes, some of which are:
Layer vector group layer.group Layer alpha transparency layer.alpha Layer color brightness layer.brightness Layer repaint suppression layer.suppressed Layer visiblity layer.visible Layer scale thresholds layer.thresholds Layer auto-labelling scale thresholds layer.label_thresholds Layer labelling-clashing attribute layer.clash_protect Auto-labelling group display order layer.group_order Numeric field for user purposes layer.nvalue Text field for user purposes layer.tvalue Indirect field for user purposes layer.vvalue
Not all attributes are applicable to all layer types.
User-defined layer functions are permitted. These return handles to layers.
A scalebar facility has been added to graphic windows. This can displayed by the scalebar command. A graphic window also has an window.auto_scalebar attribute to show the scalebar on every repaint of the window. It has its own layer in the new window layering system.
The scalebar command has switches for customizing symbology including transparency.
Making use of Windows' GDI+ graphic library, alpha transparency and color brightness have been added to various graphic features, i.e. individual entities, selected symbologies and layer display.
Alpha transparency enables underlying graphics to be visible through a graphic item by applying a transparency to the item (1=fully opaque, 0=fully transparent).
Entity alpha transparency may be set on an entity's creation command (using a new -alph switch), or post-creation via the entity.alpha attribute. An alpha transparency may be applied to all graphics on a window layer via the layer.alpha layer attribute. A fillstyle may have an alpha transparency applied via the fillstyle.alpha fillstyle attribute.
Color brightness enables the color graphics to be intensified (toward white) or de-intensified (toward black). A brightness value is in the range -1 through +1 (-1=black, 0=normal, +1=white).
Color brightness may be set on an entity's creation command (using a new -br switch), or post-creation via the entity.brightness attribute. A brightness may be applied to all graphics on a window layer via the layer.brightness layer attribute.
The highlight command can now use alpha and/or brightness for highlighting graphic primitives.
A new symbology type graduation has been introduced to enable graduated solid fills to fill area-type graphic primitives, either as a stand-alone graduation symbology or as part of a composite fillstyle -gr symbology.
Various flavors of graduation are available, consult the graduation command or the new graduation structure for details.
Alpha transparency has been added to fillstyles. See fillstyle -alph and fillstyle.alpha.
A new color attribute color.rgb[] has been added to access the red,green,blue components of a color together as a numeric array.
In previous versions image fillstyles were always displayed transparent (where possible). Transparency is now a switchable option via the fillstyle -trans command, and an additional fillstyle.transparent attribute has been added.
A new command modify_ls has been introduced to enable multiple linestyles to be replaced en-bloc within a set of entities.
[7.00.28] A new composite markerstyle has been introduced created by the markerstyle -mk. A compoiste may contain up to 4 sub-markers to facilitate multiple rendering.
In previous versions, the number of graphic windows was restricted to 32. This limit has been removed, and is now the same as that for generic windows, i.e. 255.
Anti-aliasing facilities have been added to graphic windows. Anti-aliasing is a feature which removes (actually disguises) jagged edges on polyline and text display. The feature can have an adverse effect on performance so it has been added as a switchable attribute window.anti_aliasing.
A new window scale attribute window.mpp has been added. This returns the meters-per-pixel of the graphic window and is used internally by the new window layer scale threshold checks and by the display of the scalebar. It is similar to window.pixel_factor but returns the window scale relative to meters rather than current modelling units. For longitude/latitude views an approximation is made using the current latitude.
The background of a graphic window may now be any fillstyle (including one of the new graduated fills) instead of just a simple color fill.
Instance entity functionality has been extended to permit multi-group membership to be retained, thereby adhering to the layer draw order at window repaint time. When child entities within an instance are in multiple groups the instance is redrawn for each layer, rather than once. Such instances are referred to as multi-layered instances. Entity files are marked as being multi-layered by a new -lay switch on the save command.
Instance files can now be permanently memory-mapped for improved performance on large files. A new mapfile command has been introduced for this purpose. A corresponding unmapfile command can be used to cancel the memory mapping.
[7.00.23] In addition a new global numeric identifier instance_automap has been added to retain entity file mappings during rendering.
For back-end service usage, memory-mapped instances can also be shared by different Fire processes, again to reduce system resources usage. The get -sh and mapfile -sh commands may be used for this purpose.
A new switch has been added to the get and restore commands to enable class type timestamp checks to be suppressed, by using -no_ch.
A -gen switch has been added to the save command to enable different entity generalizations to be saved, then selectively rendered when the saved file gets subsequently instanced. This is linked to enhanced window rank facilities, see window.rank and window.dynamic_rank.
A new generic entity attribute entity.layer_group returns the layer group (if any) of which the entity is a member. All entities except instance entities can only a member of one layer group. Instance entities can be a member of multiple layer groups so this element is an array.
The group attribute group.layer which returned whether or not a group is a layer group has been renamed group.is_layer.
In previous versions cell graphic primitives could be displayed at an angle but only if the angle were a multiple of 90 degrees. This restriction has been lifted and any angle may now be applied.
Similarly, node and polynode graphic primitives with image markerstyles would only display at 90-degree angles. This restriction has also been lifted.
A new command modify_ls has been introduced to enable multiple linestyles to be replaced en-bloc.
The command kill all now ensures that all entity/gstructure/compound identifiers are removed. The behavior in previous versions did not remove empty arrays, which sometimes led to problems when trying to remove atables with class definitions.
[7.00.28] A new command transient has been added to enable global graphic items (entities and groups) to be removed automatically after execution of a command block.
Auto-labelling is a new feature for self-annotating graphic primitives. Designed to be called either automatically within a window's annotation layer, or manually via a new graphic window procedure window.annotate called within a window's post-redraw callback, entities are annotated according to values and rules defined in a .autotext definition at the entity class level. An entity must be a compound or gstructure for it to have a .autotext definition.
Auto-labelling adds text labels and/or symbols to graphic primitives within one or more groups. Typically such groups correspond to vector layers for management purposes.
During the evaluation of .autotext definitions within the labelling process, the graphic window being processed sometimes needs to be accessed. A new window identifier label_window has been added solely for this purpose.
2 new string identifiers have been added to enable unique naming of compound and gstructure objects during a session: unique_compound_name and unique_gstructure_name.
A new command rasclip has been introduced for simple batch editing of image files with facilities to scale, clip and rotate (90 degree).
[7.00.14] A change to the rasdump command has replaced the 2 switches -x and -y, used to specify an image hotspot, with a single -hot switch.
The debug command has been introduced for hopefully improving debugging facilities. Facilities to break on code error, break at user-set code points, break on wild-card commands, break when a condition becomes true, have all been included. At the moment there is no edit and continue facility. This must continue to be done as now via an external editor.
Polygon validation has been extended to enable overlapping edges and crossovers with other polygons in the same hierarchy to be trapped. See polygon_validation command for details.
For more information about why a polygon may be invalid, a new polygon attribute .invalidity has also been added.
For manual entity validation a new validate command has also been added.
The linemerge command has been extended to permit polyline bridging to be applied to polylines whose extremities are within a given tolerance.
A pgeneralize function has been added to perform generalization (line smoothing) on a supplied set of polyline vertices.
Also a new generalize command will perform generalization (line smoothing) on polygon and polyline entities, with the option to remove entities which have less than a minimum area or length.
[7.00.17] To find all the intersection points between 2 polylines, use the new intplines function.
[7.00.17] To find the polygon entity which encloses (clumps) one or more entities, use the new ebound function.
Array addressing facilities have been extended to access discrete elements, e.g.
numeric myarray[15] numeric newarray[] = myarray[1,7,13]
The result of the second statement is a 3-element array constructed from elements 1, 7 and 13 of the array defined in the first statement.
The discrete definition can include element ranges, forward or backward, e.g.
numeric myarray[15] numeric array2[] = myarray[2:5,7,10:12] numeric array3[] = myarray[*:1]
The first statement will create an array of length 9, the second will create an array of length 15 but with original values in reverse order.
A new facility has been added to the language to enable iterative operations to be performed on structures without the need for loops. Such operations will improve performance.
A simple example:
for i=1,mystruct.alength { mystruct[i].nvalue = 0 }
This can be replaced with:
set mystruct[1:*].nvalue = 0
Aggregate definitions are treated as if they are single arrays, so
numeric answer for i=1,mystruct.alength { if (mystruct[i].svalue) == 'Test') { answer = i break } } if (answer) tell <'Structure Index:',answer> else tell <'Not found'>
can be replaced with:
numeric answer = aindex('Test',mystruct[1:*].svalue) if (answer) tell <'Structure Index:',answer> else tell <'Not found'>
Other examples include:
Set with multiple values:
mystruct[1].nvalue=10 mystruct[2:6].nvalue = <3,7,9,15,22> mystruct[7].nvalue = 10
Apply a shift in x and y to all points
set mystruct[1:*].pvalue &= e:25&n:25
Testing multiple values
if (mystruct[1:5].nvalue == <5,4,8,10,12>) !We have equality
Minor changes have been made to the sortid command.
The sort may now be performed on array types other than string. In addition
the sort may be done to product a sort order without updating the array values.
A new splitid command enables array values to be analysed and numeric "occurrence" arrays to be created from the result of the analysis, e.g.
numeric xar[] = <1,6,2,7,3,8> splitid xar > 5,-on0=true_ones,-on1=false_ones
Once a split is known, you could resize the array retaining only those elements which satisfied the true condition during the splitid command, e.g.
reorder xar,true_ones
The result would be those values of xar which have a value > 5.
For those developers who wish to prevent users invoking the monitor, errlog or print commands directly (via the Control T, Control E or Control P keyboard sequences), 3 new identifiers have been added to turn the facilities off.
See sys_control_t, sys_control_e and sys_control_p.
Support has been added for .zip files.
A new zip command will create a zip archive from a supplied set of files and/or directories.
A new unzip command will unzip a specified zip file into a designated directory.
Zip files may be downloaded and unzipped automatically via an extension to the -z switch on the download/httpget command.
Treenodes within a tree window may now have tooltips (treenode.tooltip).
A window.track callback has been added to tree windows. Whenever the treenode under the current mouse position changes, this callback is invoked. Typically within the callback a suitable context menu would be defined for subsequent right mouse clicks.
The window procedure window.reset may now be used to clear all treenodes from a tree window.
To identify which treenode a mouse was over when a context (popup) menu was invoked, a new window element window.context_node has been added for use within a .exec callback.
A new treenode procedure treenode.pre_sibling has been added to access a treenode's preceding sibling.
A new treenode element treenode.vvalue has been added to facilitate a treenode association with another identifier or structure.
The restriction on angled cloth images has been lifted. In previous versions only angles of 0, 90, 180, 270 were permitted.
A new window attribute window.cloth_outline has been added. This replaces the element window.rasters which has been deprecated and is no longer documented although it will still work as before.
[7.00.27] A new <interpolate> tag has been added to xml cloth definitions to make use of image enhancement facilities available with the Microsoft Windows GDI+ library.
[7.00.28] A new function rasgeo has been added for accessing geo-reference information in an image file, for subsequent use within a cloth.
[7.00.24] System dialogs, invoked by the print command, and by the choose* functions (e.g. choosefile), may now be positioned by the menu_position identifier.
[7.00.28] All log window, including the monitor and error log, now have a context menu with a text copy option.
If monitor output is to be saved during a session, previous versions used a -log program option or a log statement in the Fire Configuration File. Due to confliction with the service manager, these have been renamed as the -monlog program option and the monlog configuration file statement.
A series of known EPSG (European Petroleum Survey Group) projections (epsg#) has been added. Not all EPSG numbers are currently supported, the list will be extended as time passes.
The projection attribute projection.datum has been changed from a point to a numeric array to accommodate different datum-shift transformations which are now available. 3 or 7 numeric values are now possible.
Another new attribute projection.datum_transform has been added to enable different 3 or 7-parameter datum-shift transformations to be applied. These are specified via their EPSG transformation numbers.
When defining a projection, the ellipsoid may now be specified by its EPSG ellipsoid number, see projection -g.
[7.00.07] Often the successful loading of atables from .ata files depends on the presence of environment variable or other atables. If an atable.pre_load or atable.post_load procedure is defined within an atable these will get executed before and/or after the atable has been loaded. It is permitted to delete the atable within these procedures to abort the load process.
[7.00.08] A new numeric function tzdiff has been added. It returns the difference in seconds between the local timezone and UTC (GMT) with an option to take account of daylight saving or not.
[7.00.26] Multi-line tooltips now work (by inserting '\n' at line breaks). Previously any '\n' characters were incorrectly displayed.
[7.00.28] A new panel window sub-panel type has been added for use within a wpanel window creation command. A progress control may be used to display the progress of long operations. See progress for more information.
[7.00.23] Sometimes web pages containing errors can cause irritating dialogs to pop up, requiring user interaction before continuing. Such dialogs can be suppressed by putting the window into quiet mode, either by a new window creation switch wweb -q, or via a new window.quiet attribute.
[7.00.28] More control has been added to enable access to the tab buttons in tab windows. A new panel type tab_button is available, and tab buttons may now have their text, image and text color examined or redefined, via a new tab window attribute window.tab_buttons.
[7.00.23] Some new utility string functions have been added, see lpad, rpad and srep.
[7.00.17] A new numeric identifier http_code provides access to the low-level http error number when a download operation fails.
[7.00.28] The download, httpget and httppost commands have been extended to facilitate background (aka asynchronous) downloads. A callback procedure and an string id must be provided (via new switches -cb and -id), which will be called when the download has completed. This enables other language activity to carry on while the download is being executed (in another thread). A -k switch has also been provided to enable the asynchronous download to be aborted programmatically.
[7.00.28] A try/catch system has been introduced, with new associated commands try, catch and throw.
[7.00.28] A new exception identifier type has been introduced, created by the exception command, which may use one of 3 convenience exception functions: error_exception, warning_exception and interrupt_exception.
[7.00.28] A new numeric identifier throw_level has been added to specify that system errors are to throw exceptions as an alternative to the default behavior of printing error details as they occur.