Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to create custom shapes (Read 3030 times)
Al
Junior Member
**
Offline


I Love MindFusion!

Posts: 56
Joined: Sep 3rd, 2014
How to create custom shapes
Nov 3rd, 2014 at 2:04pm
Print Post  
Hi,

The help doesn't give much info - do you have a sample of how to create a custom shape?
  
Back to top
 
IP Logged
 
Al
Junior Member
**
Offline


I Love MindFusion!

Posts: 56
Joined: Sep 3rd, 2014
Re: How to create custom shapes
Reply #1 - Nov 4th, 2014 at 7:11am
Print Post  
Please help - I have scoured google and can't find any info on what 'params' should look like in:

var myshape = new shape(params);
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to create custom shapes
Reply #2 - Nov 4th, 2014 at 7:50am
Print Post  
Hi,

If you mean geometric shapes for ShapeNodes, they can be defined using SVG path syntax, the control supports M, L, B, Q, A, Z commands (move, line, Bezier, arc and close). The coordinates specify percentage of the actual node size. E.g. here's how a couple of the standard shapes are defined:

Code
Select All
var processShape = new Shape(
{ outline: 'M0,100 L100,100 L100,0 L0,0 L0,100 Z', decoration: 'M0,15 L100,15', id: 'DividedProcess' });

var sphereShape = new Shape(
{ outline: 'A50,50,50,0,6.28318530717959,0 Z', decoration: 'M50,0 B50,100,25,25,25,75', id: 'Sphere' }); 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Al
Junior Member
**
Offline


I Love MindFusion!

Posts: 56
Joined: Sep 3rd, 2014
Re: How to create custom shapes
Reply #3 - Nov 4th, 2014 at 12:35pm
Print Post  
Thanks Stoyan, just what I needed
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint