Package org.eclipse.zest.core.viewers
Interface IConnectionStyleBezierExtension
public interface IConnectionStyleBezierExtension
An extension to the IConnectinStyleProvider that allows styling specific to
bezier curves.
Bezier curves are defined by a set of four points: two point in the layout
(start and end), and two related control points (also start and end). The
control points are defined relative to their corresponding layout point. This
definition includes an angle between the layout point and the line between
the two layout points, as well as a ratio distance from the corresponding
layout point. The ratio distance is defined as a fraction between 0 and 1 of
the distance between the two layout points. Using this definition allows
bezier curves to have a consistant look regardless of the actual positions of
the nodes in the layouts.
-
Method Summary
Modifier and TypeMethodDescriptiondouble
getEndAngle
(Object rel) Gets the angle between the end point, and the line between the start and end, which will define the position of the end control point.double
getEndDistance
(Object rel) Gets the distance between the end point and the end control point, as a fraction of the distance between the start point and end point.double
getStartAngle
(Object rel) Gets the angle between the start point, and the line between the start and end, which will define the position of the start control point.double
getStartDistance
(Object rel) Gets the distance between the start point and the start control point, as a fraction of the distance between the start point and end point.
-
Method Details
-
getStartAngle
Gets the angle between the start point, and the line between the start and end, which will define the position of the start control point. If the start angle, and the end angle are the same sign, the two control points are guaranteed to be on the same side of the line.- Parameters:
rel
- the relationship to base on.- Returns:
- the start angle or
Double.NaN
for defaults.
-
getEndAngle
Gets the angle between the end point, and the line between the start and end, which will define the position of the end control point. If the start angle, and the end angle are the same sign, the two control points are guaranteed to be on the same side of the line.- Parameters:
rel
- the relationship to base on.- Returns:
- the end angle or
Double.NaN
for defaults.
-
getStartDistance
Gets the distance between the start point and the start control point, as a fraction of the distance between the start point and end point.- Parameters:
rel
- the relationship to base on.- Returns:
- the start distance or
Double.NaN
for defaults.
-
getEndDistance
Gets the distance between the end point and the end control point, as a fraction of the distance between the start point and end point.- Parameters:
rel
- the relationship to base on.- Returns:
- the end distance or
Double.NaN
for defaults.
-