GoGeneralNode has minimum size


I’m trying to keep my icon sizes the same apparent size as the user
zooms in so they don’t see a large pixelated icon. The following
code is being called from my goView1_PropertyChanged event handler.

public class ProNode: GoGeneralNode

public void ScaleObject( float factor ) {
if ( this.Icon != null )
this.Icon.Size = new SizeF( this.Icon.Size.Width * factor,
this.Icon.Size.Height * factor );

It works fine until the size has hit some magic minimum, which appears to be the image size in the image list.

If I replace with GoIconicNode, it works ok.

Is there another property that I can use with GoGeneralNode to get the icon a smaller size?



GoGeneralNode and GoSimpleNode use a GoNodeIcon as the Icon, rather than a regular GoImage. GoNodeIcon respects the IGoNodeIconConstraint.MinimumIconSize property, which is defined by GoGeneralNode to be large enough to fit with all of the ports on the node. So just setting GoGeneralNode.MinimumIconSize might not be sufficient for your purposes.
It might be easiest to just replace the GoNodeIcon with a GoImage. You could just set the GoGeneralNode.Icon property, or you could override GoGeneralNode.CreateIcon method. That method’s documentation gives you the code for how it is normally defined.

Thanks for the help, Walter. I got that to work.

I’ve discovered that when the user has zoomed in enough to trigger the
icons to be scaled down, there are a lot of artifacts that are still
huge/thick. I’ve fixed most of them, but I’m struggling with:

GoNode selection box (it’s really thick)
GoLink kink handles are really huge

Are there properties that will let me get at these atrifacts so I can resize them as well?

Thanks in advance.


I should clarify. By GoNode selection box, I’m referring to the
rectangle that encompasses the icon when the node is selected.
Not the Marquee tool (that works ok).


Try setting the various GoView properties dealing with ResizeHandle… or BoundingHandle…