Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Line between two ShapeControlPoints overtops the position of the ShapeControlPoints (Read 1576 times)
Cyrinael
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 42
Joined: Jul 22nd, 2016
Line between two ShapeControlPoints overtops the position of the ShapeControlPoints
Aug 8th, 2016 at 1:51pm
Print Post  
Hi,

I'm currently trying to use ShapeControlPoints in a ShapeNode in order to drag&drop a line inside a ShapeNode. I have created the ShapeControlPoints and added the corresponding code into the OutlineFormula to draw the line.
This works really really well, but I recognized, that both end of a line are not completely identical with the ShapeControlPoint's position.

I attach my diagram (templates14.tl), as well as my shape library (templates14.tl.sl). Furthermore I add pictures of the issue.

Best Regards,

Cyrinael
  

Libraries_001.zip ( 2 KB | 116 Downloads )
Outline_WithControlPoints.PNG ( 1 KB | 90 Downloads )
Outline_WithControlPoints.PNG
Outline.PNG ( 0 KB | 92 Downloads )
Outline.PNG
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Line between two ShapeControlPoints overtops the position of the ShapeControlPoints
Reply #1 - Aug 8th, 2016 at 6:08pm
Print Post  
The sticking parts seem to be caused by the pen's MiterLimit. I wouldn't expect it to be used in that case, but apparently WPF applies MiterLimit at ends of path figures - the diagram creates a single PathGeometry for the whole formula and new PathFigure for each Moveto command. So FrameworkElement defines 10 as default value for its StrokeMiterLimit property, set it to 1 and the line should end at node's borders -

node.StrokeMiterLimit = 1;

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Cyrinael
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 42
Joined: Jul 22nd, 2016
Re: Line between two ShapeControlPoints overtops the position of the ShapeControlPoints
Reply #2 - Aug 9th, 2016 at 5:56am
Print Post  
Slavcho you are literally a god.

Thank you so much,

Cyrinael
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint