Newbie question about nodes and images

I’m evaluating GoDiagram for use in a process control environment. I want to create nodes connected by links.

  • the nodes must be *.gif or *.jpg files
  • the links must change color and animate according to the physical processes involved.
    Q1: how can I create a GoNode that takes a filename.gif for the image? GoIconicNode doesn’t seem to be what I want because the icons must all be the same size, while my images vary in size within a single picture. I’m guessing I need to subclass GoNode and combine it with GoImage, but beyond that, I’m confused.
    Q2: it looks like I can just change the pen used to draw a link to change the color and other animation features… is that the best way to change a link from a thin green line to a thick, red, flashing line?

Q1: GoIconicNode probably is the class you want to use. By default it starts off with each icon (a GoImage) at its minimum size, but you can set it to whatever size you like. In particular, since the Image class provides a Size property, you could do something like:
anIconicNode.Initialize(…);
anIconicNode.Image.Size = anIconicNode.Image.Image.Size;
since GoIconicNode.Image returns a GoImage, and GoImage.Image returns a System.Windows.Drawing.Image. Of course, you can set the GoImage.Size property to different values, which will cause the image to be stretched accordingly.
Q2: Yes, setting the Pen (and/or the HighlightPen, if you use that) is the only commonly-used way to change the appearance of a link. A GoLink inherits from GoStroke.
You might want to look at the Processor sample application, which was designed for an application that might be similar to your needs.