Class GraphGUI
Syntax
public static class GraphGUI
Fields
MaxZoom
Declaration
public const float MaxZoom = 1F
Field Value
MinZoom
Declaration
public const float MinZoom = 0.25F
Field Value
MinZoomForControls
Declaration
public const float MinZoomForControls = 0.7F
Field Value
nodeColors
Declaration
public static readonly NodeColor[] nodeColors
Field Value
ZoomSteps
Declaration
public const float ZoomSteps = 0.05F
Field Value
Properties
e
Declaration
public static Event e { get; }
Property Value
Methods
ArrowTexture(Edge)
Declaration
public static EditorTexture ArrowTexture(Edge destinationEdge)
Parameters
Type |
Name |
Description |
Edge |
destinationEdge |
|
Returns
Declaration
public static Rect CalculateArea(IEnumerable<IGraphElementWidget> widgets)
Parameters
Returns
DrawBackground(Rect)
Declaration
public static void DrawBackground(Rect position)
Parameters
Type |
Name |
Description |
Rect |
position |
|
DrawConnection(Color, Vector2, Vector2, Edge, Nullable<Edge>, Texture, Vector2, Single, Single, Single)
Declaration
public static void DrawConnection(Color color, Vector2 start, Vector2 end, Edge startEdge, Edge? endEdge, Texture cap = null, Vector2 capSize = default(Vector2), float relativeBend = 0.25F, float minBend = 0F, float thickness = 3F)
Parameters
DrawConnectionArrow(Color, Vector2, Vector2, Edge, Edge, Single, Single)
Declaration
public static void DrawConnectionArrow(Color color, Vector2 start, Vector2 end, Edge startEdge, Edge endEdge, float relativeBend = 0.25F, float minBend = 0F)
Parameters
DrawDragAndDropPreviewLabel(Vector2, String)
Declaration
public static void DrawDragAndDropPreviewLabel(Vector2 position, string content)
Parameters
DrawDragAndDropPreviewLabel(Vector2, String, EditorTexture)
Declaration
public static void DrawDragAndDropPreviewLabel(Vector2 position, string content, EditorTexture icon)
Parameters
DrawDragAndDropPreviewLabel(Vector2, GUIContent)
Declaration
public static void DrawDragAndDropPreviewLabel(Vector2 position, GUIContent content)
Parameters
DrawGrid(Vector2, Rect, Single)
Declaration
public static void DrawGrid(Vector2 scroll, Rect position, float zoom = 1F)
Parameters
GetConnectionEdge(Vector2, Vector2, out Edge, out Edge)
Declaration
public static void GetConnectionEdge(Vector2 start, Vector2 end, out Edge startEdge, out Edge endEdge)
Parameters
GetHorizontalConnectionEdge(Vector2, Vector2, out Edge, out Edge)
Declaration
public static void GetHorizontalConnectionEdge(Vector2 start, Vector2 end, out Edge startEdge, out Edge endEdge)
Parameters
GetNodeEdgeToInnerPosition(Rect, NodeShape)
Declaration
public static Rect GetNodeEdgeToInnerPosition(Rect edgePosition, NodeShape shape)
Parameters
Returns
GetNodeEdgeToOuterPosition(Rect, NodeShape)
Declaration
public static Rect GetNodeEdgeToOuterPosition(Rect edgePosition, NodeShape shape)
Parameters
Returns
GetNodeInnerToEdgePosition(Rect, NodeShape)
Declaration
public static Rect GetNodeInnerToEdgePosition(Rect innerPosition, NodeShape shape)
Parameters
Returns
GetNodeOuterToEdgePosition(Rect, NodeShape)
Declaration
public static Rect GetNodeOuterToEdgePosition(Rect outerPosition, NodeShape shape)
Parameters
Returns
GetNodeStyle(NodeShape, NodeColor)
Declaration
public static GUIStyle GetNodeStyle(NodeShape shape, NodeColor color)
Parameters
Returns
GetPointOnConnection(Single, Vector2, Vector2, Edge, Nullable<Edge>, Single, Single)
Declaration
public static Vector2 GetPointOnConnection(float t, Vector2 start, Vector2 end, Edge startEdge, Edge? endEdge, float relativeBend = 0.25F, float minBend = 0F)
Parameters
Returns
LineIntersectionPoint(Vector2, Vector2, Vector2, Vector2)
Declaration
public static Vector2? LineIntersectionPoint(Vector2 start1, Vector2 end1, Vector2 start2, Vector2 end2)
Parameters
Returns
Node(Rect, NodeShape, NodeColor, Boolean)
Declaration
public static void Node(Rect position, NodeShape shape, NodeColor color, bool selected)
Parameters
Node(Rect, NodeShape, NodeColorMix, Boolean)
Declaration
public static void Node(Rect position, NodeShape shape, NodeColorMix mix, bool selected)
Parameters
Declaration
public static bool PositionOverlaps(ICanvas canvas, IGraphElementWidget widget, float threshold = 3F)
Parameters
Returns
SizeProjection(Vector2, Vector2, Vector2)
Declaration
public static float SizeProjection(Vector2 size, Vector2 spreadOrigin, Vector2 spreadAxis)
Parameters
Returns
SnapToGrid(Single)
Declaration
public static float SnapToGrid(float position)
Parameters
Type |
Name |
Description |
Single |
position |
|
Returns
SnapToGrid(Rect, Boolean)
Declaration
public static Rect SnapToGrid(Rect position, bool resize)
Parameters
Returns
SnapToGrid(Vector2)
Declaration
public static Vector2 SnapToGrid(Vector2 position)
Parameters
Type |
Name |
Description |
Vector2 |
position |
|
Returns
UpdateDroplets(ICanvas, List<Single>, Int32, ref Single, ref Single, Single, Single, Single)
Declaration
public static void UpdateDroplets(ICanvas canvas, List<float> droplets, int lastEntryFrame, ref float lastEntryTime, ref float dropTime, float discreteThreshold = 0.1F, float continuousDelay = 0.33F, float trickleDuration = 0.5F)
Parameters