OK I am stuck.
What I Want … I would like to have the nodes in my view remain a fixed screen size as I zoom in and out. In other words I want to tie the nodes to a position in document coordinates but not the width and the height. I would like the nodes to be represented as icons.
What I Have Now … We have an application where we have created subclasses of GoSimpleNode to represent the nodes in our view. There is a significant amount of code invested here so I would like to stay with GoSimpleNode if possible. But if I have to change parent classes that would be OK but a last resort.
What I have Tried … I have tried overriding the Paint method in my subclass of GoSimpleNode and messing with the Graphics.Transform matrix. While I can get the node to draw at a fixed size, it seems to get clipped sometimes. In addition the selection meachanism does not work properly at all. The selection handle still gets drawn larger on zoom in and smaller on zoom out relative to my icon. Here is the Paint override that I tried.
public override void Paint(Graphics g, GoView view)
System.Drawing.Drawing2D.Matrix t = g.Transform; g.Transform = new System.Drawing.Drawing2D.Matrix(1.0f, 0.0f, 0.0f, 1.0f, t.OffsetX, t.OffsetY);
base.Paint (g, view);
g.Transform = t;
Any help would be appreciated.