Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Save position of the nodes of DiagramView (Read 1650 times)
ddol
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: Nov 8th, 2013
Save position of the nodes of DiagramView
Nov 11th, 2013 at 11:25am
Print Post  
I have a DiagramView with BackgroundImage, and on this image/document the user draws transparent rectangles to locate areas of the document.

diagramView.Behavior = Behavior.DrawShapes;
diagram.DefaultShape = Shapes.Rectangle;
diagramView.Diagram.ShapeNodeStyle.Brush = new MindFusion.Drawing.SolidBrush(Color.Transparent);
diagramView.Diagram.DiagramStyle.ShadowBrush = new MindFusion.Drawing.SolidBrush(Color.Transparent);


diagram.BackgroundImage = Image.FromFile("e:\\temp\\invoice.tiff");
diagram.Invalidate();

It is possible save only the position of nodes (rectangles) (without image) but display image + nodes?? (diagramView.SaveToFile, diagramView.SaveToStream????)


Thanks in advance
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Save position of the nodes of DiagramView
Reply #1 - Nov 11th, 2013 at 11:53am
Print Post  
You could temporarily set BackgroundImage to null before calling a SaveTo* method to avoid saving it. Alternatively, do not set that property at all, but call e.Graphics.DrawImage from a DrawBackground event handler to draw the background.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint