Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic SVG nodes preview; v5.3 beta (Read 2331 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
SVG nodes preview; v5.3 beta
May 27th, 2009 at 9:47am
Print Post  
FlowChart.NET 5.3 adds support for SVG rendering. If anyone is interested in this, please try the beta version:

https://mindfusion.eu/_beta/fcnet53.zip

SVG drawings can be displayed using the SvgNode class, as shown below.
Code
Select All
SvgContent svg = new SvgContent();
svg.Parse(@"scorpion.svg");

SvgNode node = new SvgNode(diagram);
node.Content = svg;
node.Bounds = new RectangleF(10, 10, 100, 100);
diagram.Nodes.Add(node);
 



This requires a reference to the mindfusion.svg.dll assembly.

SvgNode is derived from ShapeNode and has all of its properties and methods. SVG could also be rendered without creating a node, by calling SvgContent.Draw(IGraphics, RectangleF) in response to custom-draw events such as Diagram.DrawBackground.
« Last Edit: May 28th, 2009 at 9:03am by Stoyo »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: SVG nodes preview; v5.3 beta
Reply #1 - May 28th, 2009 at 9:11am
Print Post  
https://mindfusion.eu/_beta/fcnet53.zip

Version 5.3 adds support for filled decoration elements in custom shape definitions, implemented via the ShapeDecoration class. It also adds predefined shapes for the elements of the BPMN notation (using the new ShapeDecoration objects). The following image shows the new shapes, which can be accessed using the Shape.FromId method or the Shapes class, along with their IDs:

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
extended interaction in DiagramView3D
Reply #2 - Jun 2nd, 2009 at 3:00pm
Print Post  
We have uploaded a new build of v5.3 that allows creating and modifying items in DiagramView3D:
https://mindfusion.eu/_beta/fcnet53.zip

To enable this, set the DiagramView3D.Behavior property to a value different than DoNothing. The DoNothing behavior implements the functionality from previous versions where the only possible interaction was moving the camera around the 3D scene. Now it is possible to draw new items, select and modify them. At this time drawing new links is done by holding Ctrl while drawing with the mouse. Version 5.3 allows only a single item to be selected in DiagramView3D; we'll implement multiple selection in next releases if there are requests for this.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
TreeViewNodes
Reply #3 - Jun 4th, 2009 at 11:53am
Print Post  
The latest build of the v5.3 beta adds a new node type - TreeViewNode. It can display hierarchical data of unlimited depth, and supports collapsing and expanding the items and scrolling.
https://mindfusion.eu/_beta/fcnet53.zip

Setting up a TreeViewNode looks like this:

Code
Select All
TreeViewNode node = new TreeViewNode(diagram);
node.Bounds = new RectangleF(30, 30, 60, 120);
diagram.Nodes.Add(node);

node.RootItems.Add(new TreeViewItem("root 0"));
node.RootItems[0].Children.Add(new TreeViewItem());
node.RootItems[0].Children.Add(new TreeViewItem());
node.RootItems[0].Children[0].Children.Add(new TreeViewItem());
node.RootItems[0].Children[0].Children.Add(new TreeViewItem());

node.RootItems.Add(new TreeViewItem("root 1"));
node.RootItems[1].Children.Add(new TreeViewItem());
node.RootItems[1].Children.Add(new TreeViewItem());

node.RootItems[0].Children[0].Expanded = true;
 



The image below shows TreeViewNode and SvgNode instances.

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: SVG nodes preview; v5.3 beta
Reply #4 - Jun 10th, 2009 at 11:25am
Print Post  
This v5.3 beta build adds the FlowchartLayout class, which can be used to arrange flowcharts representing source code:
https://mindfusion.eu/_beta/fcnet53.zip

The algorithm recognizes program code -like patterns in the graph, such as loops, sequences and if/switch branchings, and arranges them recursively as shown below. FlowchartLayout could be used to arrange other types of graphs as well, though with some restrictions. For example it treats all back links as loops in the code, and expects that they are nested - loop links starting closer to the stop node should end closer to the start node. Another similar restriction is that there shouldn't be any cross-links that connect different branches of a decision sub-graph.

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint