Overview ->
New Features in daVinci V2.1.x
- Online
Documentation V2.1
New Features in daVinci V2.1.x
daVinci V2.1 is a major release with a lot of significant new features
over the previous version of daVinci.
All new features, compared to previous release V2.0.x,
are described below in the following categories (you can click on
the links for quick access):
Fully incremental graph layout
Graph updates send to the daVinci API using command graph(update(...))
are now inserted into the existing graph layout incrementally instead
of forcing a completely new layout. So the layout before the update
is preserved as much as possible in order to support layout stability.
Of course, after doing some incremental updates, the graph layout may be
getting worse, so a new global graph layout might be required. The user
can do this at any time with menu Layout/Improve All.
Existing daVinci applications don't need to be modified to support
incremental graph layout. Applications already using API command
graph(update(...)) immediately benefit from this new feature. For
example, you can connect the graph editor of daVinci V2.0.x to the
daVinci V2.1.x API and it will use incremental graph layout. But
there even is a new grapheditor, which supports much more of the
new features.
Subgraph abstractions using incremental layout
Abstractions are used in daVinci with menu Layout/{Hide|Show} Subgraph.
In former versions, showing a hidden subgraph after modifying the layout
(e.g. by using menu Layout/Improve All with hidden subgraphs) messed up
the graph layout completely. Now, menu Layout/Show Subgraph always uses
incremental graph layout for fading in hidden subgraphs in order to
preserve layout stability.
Completely rewritten, much faster graph layout algorithm
This algorithm is used to calculate the order of nodes and dummy
nodes to reduce the number of edge crossings. This algorithm has
been completely rewritten in V2.1 in order to:
- get much more performance. For example: When applied to a
test graph with about 1000 nodes and 1500 edges, menu function
Layout/Improve All is about 40 times faster in daVinci V2.1
than in V2.0.3.
- calculate a layout with fewer edge crossings. A new optimization
phase gives slightly better results than in earlier releases.
New automatic layout functions
By taking advantage of layout constraints available with the rewritten
graph layout algorithm, a new layout function has been implemented in
menu Layout/Improve Edges. In opposite to menu Layout/Improve All
which rearranges the nodes and edges to get fewer edge crossings, the
new layout function re-routes only the edges, but preserves the given
order of nodes at each level. This reduces not all of the unneccessary
edge crossings, but the order of nodes is preserved to keep the layout
more stable.
With the new menu Layout/Improve Selected Nodes you can rearrange only the
selected nodes and the edges (as in "Improve Edges") without changing
the order of all other nodes. The menu "Improve Visible" has been
removed.
Fine-Tuning for all layout orientations
In daVinci V2.0.x you can only fine tune your graph in the layout
orientation "Top Down". Now it is possible to do this in all layout
orientations. On 24-bit graphic machines the moved node is now displayed
correctly, instead of a black rectangle in V2.0.x. Additionally, the
graph size is no longer fixed in fine-tuning. You might have noticed,
that nodes can not be moved out of the surrounding rectangle of the
graph in V2.0.x. Now it is possible to enlarge the graph by moving
nodes.
Visualization rules (API)
daVinci V2.1 has a new API mechanism to control and maintain the visual
appearance of graph nodes and edges more easily. In former versions it
was neccessary to specify the visual appearance of each individual node
or edge by using attributes in the term representation of a graph. By
using visualization rules in V2.1, one can specify the attributes for a
type (or class) of nodes/edges at one single point. Suppose you have a
graph with four nodes: one root node 1 and three childs 2,3,4. The root
has type T1, the childs have type T2 (types are the strings between the
node/edge ID and the attributes in a term representation or graph
update). You can send this example graph to the daVinci API using the
following command (remove line breaks before sending commands to API):
graph(update([new_node ("1","T1",[a("OBJECT","1")]),
new_node ("2","T2",[a("OBJECT","2")]),
new_node ("3","T2",[a("OBJECT","3")]),
new_node ("4","T2",[a("OBJECT","4")])],
[new_edge ("1-2","T1",[],"1","2"),
new_edge ("1-3","T2",[],"1","3"),
new_edge ("1-4","T3",[],"1","4")]))
Now you can send a visualization rule to the API to draw *all* nodes of
type T2 in red and another one to draw *all* edges of type T2 in blue:
visual(new_rules([nr("T2",[a("COLOR","red")])]))
visual(new_rules([er("T2",[a("EDGECOLOR","blue")])]))
You can even overwrite the daVinci defaults for attributes with visualization
definitions. Please refer to the
concepts document and to the
API command category Visual
to read more about visualization definitions.
Pop-Up menus for nodes and edges (API)
Graph nodes and edges may now have a pop-up menu which is displayed if
the mouse pointer is currently over a particular node or edge and
the user selects the right mouse button. For comfortable use, pop-up menus
should be specified with visualization rules for particular types of
nodes and edges (see above) and are implemented with
a new kind of node/edge attribute.
For example: The following API
command sends a graph to daVinci that contains one node with a pop-up
menu (remove line breaks before sending commands to API):
graph(new([l("1",n("T",[a("OBJECT","Node 1"),
m([menu_entry("ID","Entry")])],[]))]))
Please refer to the
description of the term representation
to read more about popup menus.
Drag and Drop for nodes and edges (API)
For a better support of user interaction we have added the drag and drop
functionality to the daVinci API. With the new commands you can set the
API into dragging mode. This switches off the two dimensional scrolling
feature, you achieve normally by pressing the middle mouse button. Then
you can click with the middle mouse button somewhere in the daVinci
window and the API informs the application, or you can select a node with the middle
mouse button and drag a line from this node to another node. The
application is informed if you release the button over a node or over the
free area. Moreover you can grab a node and drop it on some other node.
Please refer to the
concepts document and to the
API command category Drag and Drop
to read more about drag and drop.
All open windows accessible via API commands
Many people asked for full access to all open windows in the multi view
mode of the API. Implementing this feature results in a syntax change for
the API answers. Therefore we make this mode available via a command line option -window_api. You'll get
context_window(...) answers instead of context(...) answers in the new mode.
Please refer to the
API command category Multi
to read more about this new multi-window mode.
Some more enhancements to the API
New command-line options
With the command line option -init <file> you can supply initial API
commands to daVinci, independent whether you've connected an application
or not. You can execute all API commands except those of categories
multi, drag_and_drop and app_menu, which would make no sense, if no
application is connected. With this feature, you can send for example
the new visualiziation rules to daVinci or load graphs in the API update format to daVinci.
With the command line option -log <file> you can supply a file, in which all commands and answers of the API send to or
send by daVinci are logged.
With the command line option -version daVinci will print it's current version and terminate.
New Attributes for Nodes and Edges
Some attributes for nodes and edges have been added or changed. For nodes:
- _GO: new graphical object 'triangle' and 'scissors'
- BORDER: this attribute can be set to 'none', 'double' and 'single', the
first value is new and especially usefull for _GO icon.
- _CGO, CCOLOR, CICONFILE are new. See below for an explanation of these
attributes.
For edges:
- HEAD: With this new attribute you can specify the head of an edge,
which can only be a solid arrow in V2.0.x and former versions.
Now the following values are allowed:
- farrow: default behaviour as before (filled arrow)
- arrow: arrow only drawn by its border lines
- fcircle: filled circle
- circle: normal circle not filled
Up to now the visualization of nodes abstracted by the menu or API
command Hide Subgraph was a scissors-icon with the color of the node.
Now you can define the appearance of these nodes by setting the
attributes:
- _CGO: graphical object for abstracted nodes like _GO, default: scissors
- CCOLOR: color of abstracted nodes, default: value of COLOR for the node
- CICONFILE: icon file, if _CGO is 'icon'
Please remember, that it could be very difficult to find out which nodes
are abstracted, if you make a bad choice for these attributes.
grapheditor supports all new API features, including drag and drop
The new grapheditor supports all the new features of the API and all
new node and edge attributes (except those for abstracted nodes). The
major improvement is the drag and drop mode, which is the default mode
of the grapheditor now. In this mode, you can create new nodes by
clicking in the daVinci window with the middle mouse button and new edges
by dragging the mouse with pressed middle mouse button from one node
to the other. You can even copy existing nodes. The drag and drop mode can be switched off via the icon
bar or a menu. Additionally there are context sensitive pop-up menues for
all nodes and edges generated with the grapheditor. The grapheditor now
uses the incremental layout of daVinci and you'll definitely see the
changes.
Additionally the graph editor now supports the editing of several graphs and the loading of status files.
Please refer to the
grapheditor manual
to read more about the new grapheditor features.
Several bug fixes and reduced memory footprint
- Correct navigation in cyclic graphs. The selection functions of menu Navigation now work
as one might expect from the layout: A child is the node where the arrow
of an edge is pointing to and a parent is the node where the arrow is
not pointing to. There are situations where a node is both a parent and
a child.
- The layout algorithm and the drawing component have been rewritten, to
improve performance (see above) and reduce the memory usage of daVinci.
Especially the resources allocated in the X-server are reduced by 50
percent, because the pixmap caching mechanism of daVinci now needs
only one pixmap instead of two for each part of the graph.
- All Bugs which hadn't been fixed in V2.0.3 are now fixed.
Shortcomings in daVinci V2.1.x
The following shortcomings are present in the current release:
daVinci V2.1 Online Documentation - Page update: June 15, 1998