EdgeControl
VisualElement that draws the edge lines and detects if mouse is on top of edge.
Read time 9 minutesLast updated 4 days ago
Definition
- Type: Class
- Namespace: UnityEditor.Experimental.GraphView
- Assembly: UnityEditor
- Inherits from: VisualElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle
public class EdgeControl : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle
Static Fields
Value | Description |
|---|---|
| k_MinEdgeWidth | Min edge width. |
Constructors
Constructor | Description |
|---|---|
| EdgeControl() | EdgeControl's constructor. |
Properties
Property | Description |
|---|---|
| capRadius | Radius of the edge's end caps. |
| controlPoints | Edge's control points. |
| drawFromCap | Whether or not to draw the From Cap. |
| drawToCap | Whether or not to draw the To Cap. |
| edgeWidth | Edge's visible width. |
| from | Edge's From postion. |
| fromCapColor | The color of the cap color at the "from" end of the edge. |
| inputColor | Color on the edge's input. |
| inputOrientation | Edge input port orientation (vertical/horizontal). |
| interceptWidth | Width that will be used for mouse hit detection. |
| outputColor | Color on the edge's output. |
| outputOrientation | Edge output port orientation (vertical/horizontal). |
| to | Edge's To postion. |
| toCapColor | The color of the cap color at the "to" end of the edge. |
Methods
Method | Description |
|---|---|
| ComputeControlPoints | Compute the edge's control points. |
| ContainsPoint | Check if point is on top of edge. |
| Overlaps | Check if edge overlaps rectangle. |
| PointsChanged | Check if the edge points have changed. |
| UpdateLayout | Update the edge layout. |
| UpdateRenderPoints | Update the edge's render points. |