Lines, Curves and Splines?
Hi,
I am trying to see if I can make splines which I can drag and connect to other controls. Similar to the lines you get in Unreal Kismet.
The functionality is similar to a popular line rendering solution for Unity :
http://www.starscenesoftware.com/vectrosity.html
The result could be similar to how a GUI solution called EVO GUI for Unity does it.
https://www.assetstore.unity3d.com/en/#!/content/11171
Please help.
Regards.
I am trying to see if I can make splines which I can drag and connect to other controls. Similar to the lines you get in Unreal Kismet.
The functionality is similar to a popular line rendering solution for Unity :
http://www.starscenesoftware.com/vectrosity.html
The result could be similar to how a GUI solution called EVO GUI for Unity does it.
https://www.assetstore.unity3d.com/en/#!/content/11171
Please help.
Regards.
-
sfernandez
Site Admin
- Posts: 2995
- Joined:
Re: Lines, Curves and Splines?
For basic shapes you can take a look at the Shapes tutorial here.
For complex shapes you should use the Path element, which uses SVG commands (Path Markup Syntax) to define its shape, for example:
For complex shapes you should use the Path element, which uses SVG commands (Path Markup Syntax) to define its shape, for example:
Code: Select all
<Path Data="M241.49998,264.49971 C314.49993,277.49971 374.5,397.5 437.5,409.5 500.5,421.5 564.49993,410.49925 583.49972,373.49992 601.23897,338.95531 540.49976,312.49983 533.49976,283.49983 523.0081,358.44328 441.5,358.49999 414.5,284.5 387.5,210.50001 423.9727,183.10478 452.9727,179.10478 481.9727,175.10478 516.63937,193.7711 587.9727,198.10443" Height="236.597" Stretch="Fill" Stroke="Red" Width="347.473"/>
Re: Lines, Curves and Splines?
If you need this via API instead of Xaml you must use StreamGeometryContext. It supports Beziers (quadratic and cubic) and Arcs. You can easily create Splines using that primitives.
Who is online
Users browsing this forum: No registered users and 11 guests