i am taking microsoft glee code and producing a graph and then converting it to an image on an html page. i want to see if i can autogenerate image map code over the image so i am able to click on each element of the graph nodes.
Here is an example of the glee graph code converti开发者_Python百科ng to an image.
Graph g = new Graph("graph");
g.GraphAttr.LayerDirection = LayerDirection.LR;
g.GraphAttr.NodeAttr.Padding = 3;
[Add a bunch of nodes . . .]
GraphRenderer renderer = new GraphRenderer(g);
renderer.CalculateLayout();
//Bitmap bmp = new Bitmap(Convert.ToInt32(g.Width), Convert.ToInt32(g.Height), System.Drawing.Imaging.PixelFormat.Format32bppArgb);
Bitmap bmp = new Bitmap(Convert.ToInt32(g.Width), Convert.ToInt32(g.Height),
System.Drawing.Imaging.PixelFormat.Format32bppArgb);
renderer.Render(bmp);
So the question is: is there a way to get all of the info that would be needed for an html image map from the glee graph object or the renderer.
Have a look at Mindscape's WPF Star Diagrams or WPF Flow Diagrams. They make this task much simpler and they look great!
精彩评论