Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Regarding FlowChart.NET new shapes (Read 12146 times)
Suresh
Guest


Regarding FlowChart.NET new shapes
Jan 30th, 2006 at 1:06pm
Print Post  
Hi,

Your FlowChart.NET Compontnt is very good and it is very usefull for us. But one thing, We can not able to create new shapes properly  by using your Shape Designer tool. Is it possible to create a shape in .bmp or in .gif format and then convert it into a shape for our tool?.

Thanks inadvance for your reply
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Regarding FlowChart.NET new shapes
Reply #1 - Jan 30th, 2006 at 1:31pm
Print Post  
Hi,

Is there anything wrong with the ShapeDesigner tool ? Btw. its source code is provided in the Samples\C# folder, you could modify if you need some special features in it.

If you need to define complex looking shapes, probably you could create only the shape outline using the shape designer, and then assign a bmp/wmf image to the box.Picture property to implement the shape interior.

Stoyan
  
Back to top
 
IP Logged
 
Suresh
Guest


Re: Regarding FlowChart.NET new shapes
Reply #2 - Jan 31st, 2006 at 4:42am
Print Post  
Hi,

Thank you very much.  box.Picture property  is very user full for us to show our own images as Node Background.

One more problem i faced is i am not able to scroll the Flow Chart up and down with Mouse Scroller.
And how to create our own ShapeTemplates like "Actor"?Send any sample Code.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Regarding FlowChart.NET new shapes
Reply #3 - Jan 31st, 2006 at 5:26am
Print Post  
Hi,

Use this code to implement support for scrolling with the mouse wheel:

Code
Select All
private void Form1_Load(object sender, System.EventArgs e)
{
  fc.MouseWheel += new MouseEventHandler(fc_MouseWheel);
}

void fc_MouseWheel(object sender, MouseEventArgs args)
{
  FlowChart fcSender = sender as FlowChart;

  float newScrollY = fcSender.ScrollY - args.Delta / 50;
  if (newScrollY > fcSender.DocExtents.Top)
    fcSender.ScrollY = newScrollY;
}
 

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Regarding FlowChart.NET new shapes
Reply #4 - Jan 31st, 2006 at 5:39am
Print Post  
To create and use a ShapeTemplate -  invoke a ShapeTemplate constructor specifying some shape identifier, that adds the shape definition to the same internal array where the stock shapes are stored. You can access your shape later using the ShapeTemplate.FromId() method.

Here are definitions for some of the stock shapes:

[code]
new ShapeTemplate(
new ElementTemplate[]
{
  new ArcTemplate(40, 0, 20, 20, 0, 360),
  new LineTemplate(50, 20, 70, 20),
  new ArcTemplate(65, 20, 10, 10, 270, 90),
  new LineTemplate(75, 25, 75, 60),
  new LineTemplate(75, 60, 68, 60),
  new LineTemplate(68, 60, 68, 30),
  new LineTemplate(68, 30, 64, 30),
  new LineTemplate(64, 30, 64, 100),
  new LineTemplate(64, 100, 52, 100),
  new LineTemplate(52, 100, 52, 65),
  new LineTemplate(52, 65, 48, 65),
  new LineTemplate(48, 65, 48, 100),
  new LineTemplate(48, 100, 36, 100),
  new LineTemplate(36, 100, 36, 30),
  new LineTemplate(36, 30, 32, 30),
  new LineTemplate(32, 30, 32, 60),
  new LineTemplate(32, 60, 25, 60),
  new LineTemplate(25, 60, 25, 25),
  new ArcTemplate(25, 20, 10, 10, 180, 90)
},
FillMode.Winding, "Actor");

new ShapeTemplate(
new ElementTemplate[]
{
  new LineTemplate(10, 0, 90, 0),
  new ArcTemplate(80, 0, 20, 20, -90, 90),
  new LineTemplate(100, 10, 100, 90),
  new ArcTemplate(80, 80, 20, 20, 0, 90),
  new LineTemplate(90, 100, 10, 100),
  new ArcTemplate(0, 80, 20, 20, 90, 90),
  new LineTemplate(0, 90, 0, 10),
  new ArcTemplate(0, 0, 20, 20, 180, 90)
},
FillMode.Winding, "RoundRect");

new ShapeTemplate(
new ElementTemplate[]
{
  new LineTemplate(10, 0, 90, 0),
  new ArcTemplate(80, 0, 20, 100, -90, 180),
  new LineTemplate(90, 100, 10, 100),
  new ArcTemplate(0, 0, 20, 100, 90, 180)
},
new ElementTemplate[]
{
  new ArcTemplate(0, 0, 20, 100, -90, 180)
},
new ElementTemplate[]
{
  new LineTemplate(10, 0, 90, 0),
  new ArcTemplate(80, 0, 20, 100, -90, 180),
  new LineTemplate(90, 100, 10, 100),
  new BezierTemplate(10, 100, 35, 66, 35, 33, 10, 0)
},
FillMode.Winding, "DirectAccessStorage");
[/code]
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Regarding FlowChart.NET new shapes
Reply #5 - Jan 31st, 2006 at 5:54am
Print Post  
We have created most of the stock shapes using the shape designer. Starting with the default rectangular shape there, right click on the lines or control points in the left part of the window to display a context menu with commands related to the line or point. You can use that menu to insert new lines or curves, to merge segments, etc. Then move the control points using the mouse to refine the shape further. Right clicking on an empty area will let you add decoration lines or curves - ones not partaking in the shape outline.

The designer tool does not support arcs at this time. You can use a bezier curve approximation for arcs and later replace the generated BezierTemplates with ArcTemplates.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Paul Hannah
Guest


Re: Regarding FlowChart.NET new shapes
Reply #6 - Jan 31st, 2006 at 11:59pm
Print Post  
Is there anyway that there can be a .shape file definition for reading and writing, similar to SVG/XML maybe.

Basically at this point we're rolling our own, by hacking the shapedesigner code, building a Stencil class and then serializing that class.

I would rather that there was a built-in way to do this writing and reading (XML-based perhaps) so that there can be a standard way within flowchart.net to do this.  One major advantage to this is that people would have the option to offer collections of shape libraries to the public domain.

The ability to potentially convert between visio and flowchart.net shapes would then be a huge benefit to us.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Regarding FlowChart.NET new shapes
Reply #7 - Feb 1st, 2006 at 5:14am
Print Post  
Thanks for the suggestion. Indeed it is a nice feature to have, we'll implement it in the 4.0.4 release.

Stoyan
  
Back to top
 
IP Logged
 
p.hannah
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 38
Joined: Feb 1st, 2006
Re: Regarding FlowChart.NET new shapes
Reply #8 - Feb 2nd, 2006 at 12:35am
Print Post  
Fantastic!

At the moment we're finalising the proof of concept, and looking to plan toward the future.

Can you give us some idea what timeline we're looking at for the 4.0.4 release?  If this is still some time off is there any likelyhood of accessing an alpha version, and if so any idea when that is possible?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Regarding FlowChart.NET new shapes
Reply #9 - Feb 2nd, 2006 at 7:40am
Print Post  
We are releasing FC.NET 4.0.3 next week and will immediately start work on next version. We can send you our daily builds along the way so you can use that new feature once we have its initial implementation ready.

Stoyan
  
Back to top
 
IP Logged
 
Suresh
Guest


We want a new Shape
Reply #10 - Feb 6th, 2006 at 2:28am
Print Post  
We want a new shape which is having group of people (actors). By using ur shape designer tool , we able to create a shape with 2 actors side by side(I included the code bellow). But we want a shape , which is having at least 3 actors overlaping eachother so that it represent a Grop of people.

Please design that shape and send both code and .dr file. We are intrested to purchase ur tool.

The initial code for ur reference is :
ShapeTemplate st=new ShapeTemplate(
new ElementTemplate[]
{
new LineTemplate(10, 50, 5, 50),
new LineTemplate(5, 50, 5, 21),
new LineTemplate(5, 21, 30, 21),
new BezierTemplate(30, 21, 10, 14, 25, 0, 30, 0),
new BezierTemplate(30, 0, 40, 0, 45, 21, 25, 21),
new LineTemplate(25, 21, 65, 21),
new LineTemplate(65, 21, 75, 21),
new BezierTemplate(75, 21, 60, 14, 70, 0, 75, 0),
new BezierTemplate(75, 0, 95, 7, 75, 21, 75, 21),
new LineTemplate(75, 21, 85, 21),
new LineTemplate(85, 21, 90, 21),
new LineTemplate(90, 21, 100, 21),
new LineTemplate(100, 21, 100, 50),
new LineTemplate(100, 50, 95, 50),
new LineTemplate(95, 50, 95, 35),
new LineTemplate(95, 35, 90, 35),
new LineTemplate(90, 35, 90, 57),
new LineTemplate(90, 57, 85, 57),
new LineTemplate(85, 57, 85, 85),
new LineTemplate(85, 85, 80, 85),
new LineTemplate(80, 85, 80, 57),
new LineTemplate(80, 57, 74, 57),
new LineTemplate(74, 57, 75, 85),
new LineTemplate(75, 85, 70, 85),
new LineTemplate(70, 85, 70, 57),
new LineTemplate(70, 57, 65, 57),
new LineTemplate(65, 57, 65, 35),
new LineTemplate(65, 35, 60, 35),
new LineTemplate(60, 35, 60, 50),
new LineTemplate(60, 50, 55, 50),
new LineTemplate(55, 50, 55, 21),
new LineTemplate(55, 21, 50, 21),
new LineTemplate(50, 21, 50, 50),
new LineTemplate(50, 50, 45, 50),
new LineTemplate(45, 50, 45, 35),
new LineTemplate(45, 35, 40, 35),
new LineTemplate(40, 35, 40, 57),
new LineTemplate(40, 57, 35, 57),
new LineTemplate(35, 57, 35, 85),
new LineTemplate(35, 85, 30, 85),
new LineTemplate(30, 85, 30, 57),
new LineTemplate(30, 57, 25, 57),
new LineTemplate(25, 57, 25, 85),
new LineTemplate(25, 85, 20, 85),
new LineTemplate(20, 85, 20, 57),
new LineTemplate(20, 57, 15, 57),
new LineTemplate(15, 57, 15, 35),
new LineTemplate(15, 35, 10, 35),
new LineTemplate(10, 35, 10, 50)
},
new ElementTemplate[]
{
},
new ElementTemplate[]
{
new LineTemplate(0, 85, 0, 100),
new LineTemplate(0, 100, 100, 100),
new LineTemplate(100, 100, 100, 85),
new LineTemplate(100, 85, 0, 85)
},FillMode.Winding,   "test" );

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Regarding FlowChart.NET new shapes
Reply #11 - Feb 6th, 2006 at 6:17am
Print Post  
We don't have much of a graphic designers around here... If you have some image that shows the shape you need, could you email it to me ?

Thanks
  
Back to top
 
IP Logged
 
Arzanardi
YaBB Newbies
*
Offline


C# Developer

Posts: 10
Joined: Jul 25th, 2006
Re: Regarding FlowChart.NET new shapes
Reply #12 - Jul 25th, 2006 at 5:00pm
Print Post  
When I export to Visio my flowChart with customs shapes and I open the file created by my application in MS Visio, the customs shapes are squares. Can I do it?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3253
Joined: Oct 19th, 2005
Re: Regarding FlowChart.NET new shapes
Reply #13 - Jul 26th, 2006 at 4:36am
Print Post  
Sorry, you can't do it. At this time VisioExporter cannot create new master shapes in Visio based on your FlowChart.NET shape definitions. It only selects appropriate existing shapes for the predefined FlowChart.NET ones. It is not likely that we implement custom shapes export in the near future, but we could add an event that will be raised when FC.NET does not know what Visio shape to choose for your custom definitions and let you specify that yourself.
  
Back to top
 
IP Logged
 
p.hannah
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 38
Joined: Feb 1st, 2006
Re: Regarding FlowChart.NET new shapes
Reply #14 - Aug 1st, 2006 at 2:11am
Print Post  
Stoyo,

Has there been any move toward a shape exporter?

Thanks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint