From: Francois V. <Fra...@sk...> - 2004-09-28 05:23:22
|
I see your point Dan. It's the kinda thing you usually see in mind-mapping software (Mindjet.com). The image-thing is really easy to do, actually there is an example in the v1b version (an image shape). The random placement of nodes: this is done is many places. See for example the way the graph-analysis is implemented, the generated random graphs are both random in structure and in coordinates. The code is something like: for(int k=0; k<nodeCount;k++) { shape= this.graphControl1.AddShape("17110CC6-CCA2-41a1-8963-86CEBA753266",new PointF(10,10)); shape.Text = k.ToString(); shape.FitSize(); shape.X=rnd.Next(30,this.graphControl1.Width-30); //keep it a little off the edge of the canvas shape.Y=rnd.Next(30,this.graphControl1.Height-30); matrix.AddVertex(k); nodes[k] = shape; } Kind regards, Francois. |