从微软欢乐图生成图像后,无论如何都可以获取图像映射的输入
我正在使用 microsoft glee 代码并生成一个图表,然后将其转换为 html 页面上的图像。我想看看是否可以在图像上自动生成图像映射代码,以便我能够单击图形节点的每个元素。
这是将 gle 图形代码转换为图像的示例。
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);
所以问题是:有没有一种方法可以从 glee 图形对象或渲染器获取 html 图像映射所需的所有信息。
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 converting 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 Mindscape 的 WPF 星图 或 WPF 流程图。他们使这项任务变得更加简单,而且看起来很棒!
Have a look at Mindscape's WPF Star Diagrams or WPF Flow Diagrams. They make this task much simpler and they look great!