Port has a label and this label should be between the segmented line (see the picture below, GoDataflowOutputSignalPort).
I have done this by setting label BackgroundColor, and TransparentBackground to false. But if I place some background image on the node, label covers that part of the image.
My question is, how to segment the line into two pieces and place the port label between?
This is a Port label as opposed to a GoLabeledLink? You could, with overrides, make the connecting point for the port be the end of the label (where the “t” is in “…SignalPort”. and then (as part of the Port or Node drawing) draw in that little bit of the link on the node side of the label.
Actually, if I look at the port labels in GoGeneralNode, that’s how it is already implemented. (except it puts the label up next to the port, so there is no final little segment between the label and the port icon)
Yah, I found GoGeneralNodePort and it’s methods: " GetLinkPoint(int spot)" and "GetToLinkPoint(Northwoods.Go.IGoLink link). So overriding them I should get what I want.
I haven’t figured out how to override methods “GetLinkPoint(int spot)” and “GetToLinkPoint(Northwoods.Go.IGoLink link)” to meet the requirement above.
Please, can you give me some example code to accomplish this task?
Finally, I found the solution how to connect the line with my custom GoPort with label by overriding the “GetFromLinkPoint” method. It is much better solution than setting the port label color into white and put it in the separate layer above link…