Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Several (Re-)Paint problems (Read 3076 times)
Amosius
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 75
Joined: Sep 2nd, 2010
Several (Re-)Paint problems
Nov 22nd, 2010 at 3:21pm
Print Post  
Hello, i have the following paint problems using WPF-Diagramming 2.4:

1. AttachTo
Code
Select All
        private void AttachNewLabel(MyShapenode s)
        {
            int labelbreite = 30;
            int labelhoehe = 20;
            ShapeNode label = dgDiagram.Factory.CreateShapeNode(s.Bounds.X + 0.5 * s.Bounds.Width - 0.5 * labelbreite, s.Bounds.Y + s.Bounds.Height - labelhoehe, labelbreite, labelhoehe, Shapes.Rectangle);
            label.Text = "[ + ]";
            label.TextBrush = Brushes.Black;
            label.Brush = Brushes.White;
            label.Locked = true;
            label.Transparent = true;
            label.AttachTo(s, AttachToNode.BottomCenter);
            s.SubordinateGroup.AutoDeleteItems = true;
        } 

I only see the label, when i activate the Shape, otherwise it is not visible. I want that i see always the attached label.

2. Arrowheads
Some arrowheads do not point on a 90 degree to the following shape, they are on the shapeboarder with 0 degrees showing in the direction of the border.
Code
Select All
LinkHeadShape="Triangle"
                                LinkHeadShapeSize="15"
                                LinkShape="Cascading"
                                DynamicLinks="False"
                                LinkBrush="Black"
LinkTextStyle="OverLongestSegment"
                                RouteLinks="True"
                                AllowLinksRepeat="False"  



3. Links
After loading a saved diagram with all the links (also with userdefined controllpoints) some segments of the links are not visible. Some of the invisible parts starts in a segment. When i move the node or the link the whole link will be visible.

It's not that easy to describe it Smiley I can send you a picture if this is helpful.

Thank's for any advice.

Amosius
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Several (Re-)Paint problems
Reply #1 - Nov 22nd, 2010 at 3:42pm
Print Post  
Hi,

1. Are you attaching the label before or after the shape is added to the diagram? In the former case the label has a lower ZIndex and is drawn behind the main node. If that's what happens, add the main node first, or set it to a lower ZIndex value after it is added.

2. Are the end segments orthogonal to the node borders but the arrowheads point in the wrong direction, or the segments coincide with the border line and that makes the angle == 0?

3. If setting  these user-defined points after loading, try calling the UpdateFromPoints method after assigning to ControlPoints. If that's not the problem, please email to support@mindfusion.eu a saved diagram file that shows it.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Amosius
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 75
Joined: Sep 2nd, 2010
Re: Several (Re-)Paint problems
Reply #2 - Nov 22nd, 2010 at 5:09pm
Print Post  
Hi Stoyan,

1. and 3. worked fine with your hints. Thank you.

2. It should be orthogonal but in this case the segment coincide with the border line and that makes the angle == 0.

I tried
Code
Select All
LinkSegments="3"  


Also with this property i have only 2 segments.

Amosius
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Several (Re-)Paint problems
Reply #3 - Nov 23rd, 2010 at 6:54am
Print Post  
Hi,

Could you post the coordinates of the nodes connected by that link and your RoutingOptions and LinkRouter values?

Stoyan
  
Back to top
 
IP Logged
 
Amosius
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 75
Joined: Sep 2nd, 2010
Re: Several (Re-)Paint problems
Reply #4 - Nov 23rd, 2010 at 11:17am
Print Post  
Hi Stoyan,

1. Shape:
x="90" y="135" width="90" height="60"

2. Shape:
x="135" y="255" width="90" height="60"

It looks like this:

#####
# #
#####
|
|___
#####
# #
#####


Anchorpoint is
Shape 1: bottom center
Shape 2: top center

These are the properties:

Code
Select All
Behavior="DrawLinks"
                                AllowInplaceEdit="True"
                                InplaceEditAcceptOnEnter="True"
                                InplaceEditCancelOnEsc="True"
                                ShowGrid="False"
                                AllowDrop="True"
                                AllowSelfLoops="False"
                                AllowUnanchoredLinks="True"
                                EnableLanes="True"
                                MouseRightButtonDown="dgDiagram_MouseRightButtonDown"
                                LinkHeadShape="Triangle"
                                LinkHeadShapeSize="15"
                                LinkShape="Cascading"
                                DynamicLinks="False"
                                LinkBrush="Black"
                                LinkTextStyle="OverLongestSegment"
                                RouteLinks="True"
                                AllowLinksRepeat="False"
                                ShowHandlesOnDrag="True"
                                NodeActivated="dgDiagram_NodeActivated"
                                NodeDeselected="dgDiagram_NodeDeselected"
                                DragEnter="DragEnterNode"
                                Drop="DropNode"
                                ShowDisabledHandles="False"
                                GridSizeX="15"
                                GridSizeY="15"
                                LinkCrossings="Arcs"
                                AutoResize="RightAndDown"
                                NodeDeleted="dgDiagram_NodeDeleted"
                                MouseDoubleClick="dgDiagram_MouseDoubleClick"
                                SnapToAnchor="OnCreateOrModify"
                                LinkSegments="3"
                                DrawAnchorPoint="dgDiagram_DrawAnchorPoint" NodeTextEdited="dgDiagram_NodeTextEdited" 



Amosius
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Several (Re-)Paint problems
Reply #5 - Nov 24th, 2010 at 6:29pm
Print Post  
Our bad, QuickRouter always selects horizontal segment orientation when a link starts exactly at the corner of a tile of the routing map. That seems to happen when nodes are close to each other and the link's start point has the same X position as the opposite node's vertical border.

Our developer will try to fix this in the next couple of days. For now you might try using GridRouter, or if the nodes are created from code - change their X positions a bit so that a node's left/right sides do not coincide with its neighbor's middle point X.

Stoyan
  
Back to top
 
IP Logged
 
Amosius
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 75
Joined: Sep 2nd, 2010
Re: Several (Re-)Paint problems
Reply #6 - Nov 25th, 2010 at 9:37am
Print Post  
Hi Stoyan,

thank you for this information.
I will wait the couple of days.

Amosius
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Several (Re-)Paint problems
Reply #7 - Nov 28th, 2010 at 8:05am
Print Post  
Hi Amosius,

2. This version should find better routes in that case:
https://mindfusion.eu/_beta/wpfdiag251.zip

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