Class GraphGUI
Syntax
public static class GraphGUI
Fields
MaxZoom
Declaration
public const float MaxZoom = 1F
Field Value
MinZoom
Declaration
public const float MinZoom = 0.1F
Field Value
ZoomSteps
Declaration
public const float ZoomSteps = 0.05F
Field Value
Properties
e
Declaration
public static Event e { get; }
Property Value
Methods
AliasedBezierTexture(Single)
Declaration
public static Texture2D AliasedBezierTexture(float thickness)
Parameters
| Type |
Name |
Description |
| Single |
thickness |
|
Returns
| Type |
Description |
| Texture2D |
|
ArrowTexture(Edge)
Declaration
public static EditorTexture ArrowTexture(Edge destinationEdge)
Parameters
| Type |
Name |
Description |
| Edge |
destinationEdge |
|
Returns
Declaration
public static Rect CalculateArea(IEnumerable<IWidget> widgets)
Parameters
Returns
Downlight(Color)
Declaration
public static Color Downlight(Color color)
Parameters
| Type |
Name |
Description |
| Color |
color |
|
Returns
DrawBackground(Rect)
Declaration
public static void DrawBackground(Rect position)
Parameters
| Type |
Name |
Description |
| Rect |
position |
|
DrawConnection(Color, Bezier2, Nullable<Edge>, Single, Texture2D, Texture, Vector2)
Declaration
public static void DrawConnection(Color color, Bezier2 bezier, Edge? endEdge = default(Edge? ), float thickness = 3F, Texture2D texture = null, Texture cap = null, Vector2 capSize = null)
Parameters
| Type |
Name |
Description |
| Color |
color |
|
| Bezier2 |
bezier |
|
| Nullable<Edge> |
endEdge |
|
| Single |
thickness |
|
| Texture2D |
texture |
|
| Texture |
cap |
|
| Vector2 |
capSize |
|
DrawConnectionArrow(Color, Bezier2, Edge, Single, Texture2D)
Declaration
public static void DrawConnectionArrow(Color color, Bezier2 bezier, Edge endEdge, float thickness = 3F, Texture2D texture = null)
Parameters
| Type |
Name |
Description |
| Color |
color |
|
| Bezier2 |
bezier |
|
| Edge |
endEdge |
|
| Single |
thickness |
|
| Texture2D |
texture |
|
DrawGrid(Vector2, Rect, Single)
Declaration
public static void DrawGrid(Vector2 scroll, Rect position, float zoom = 1F)
Parameters
| Type |
Name |
Description |
| Vector2 |
scroll |
|
| Rect |
position |
|
| Single |
zoom |
|
DrawShadow(Rect)
Declaration
public static void DrawShadow(Rect position)
Parameters
| Type |
Name |
Description |
| Rect |
position |
|
DrawTooltip(Vector2, GUIContent)
Declaration
public static void DrawTooltip(Vector2 position, GUIContent content)
Parameters
| Type |
Name |
Description |
| Vector2 |
position |
|
| GUIContent |
content |
|
Declaration
public static void DrawTooltip(Vector2 position, string content)
Parameters
| Type |
Name |
Description |
| Vector2 |
position |
|
| String |
content |
|
DrawTooltip(Vector2, String, EditorTexture)
Declaration
public static void DrawTooltip(Vector2 position, string content, EditorTexture icon)
Parameters
FadedBezierTexture(Single, Single)
Declaration
public static Texture2D FadedBezierTexture(float thickness, float innerThickness)
Parameters
| Type |
Name |
Description |
| Single |
thickness |
|
| Single |
innerThickness |
|
Returns
| Type |
Description |
| Texture2D |
|
GetActivity(Nullable<Int32>, Nullable<Single>)
Declaration
public static float GetActivity(int? lastFrame, float? lastTime)
Parameters
Returns
GetConnectionEdge(Vector2, Vector2, out Edge, out Edge)
Declaration
public static void GetConnectionEdge(Vector2 start, Vector2 end, out Edge startEdge, out Edge endEdge)
Parameters
| Type |
Name |
Description |
| Vector2 |
start |
|
| Vector2 |
end |
|
| Edge |
startEdge |
|
| Edge |
endEdge |
|
GetHorizontalConnectionEdge(Vector2, Vector2, out Edge, out Edge)
Declaration
public static void GetHorizontalConnectionEdge(Vector2 start, Vector2 end, out Edge startEdge, out Edge endEdge)
Parameters
| Type |
Name |
Description |
| Vector2 |
start |
|
| Vector2 |
end |
|
| Edge |
startEdge |
|
| Edge |
endEdge |
|
GetNodeEdgeToInnerPosition(Rect)
Declaration
public static Rect GetNodeEdgeToInnerPosition(Rect edgePosition)
Parameters
| Type |
Name |
Description |
| Rect |
edgePosition |
|
Returns
GetNodeEdgeToOuterPosition(Rect)
Declaration
public static Rect GetNodeEdgeToOuterPosition(Rect edgePosition)
Parameters
| Type |
Name |
Description |
| Rect |
edgePosition |
|
Returns
GetNodeInnerToEdgePosition(Rect)
Declaration
public static Rect GetNodeInnerToEdgePosition(Rect innerPosition)
Parameters
| Type |
Name |
Description |
| Rect |
innerPosition |
|
Returns
GetNodeOuterToEdgePosition(Rect)
Declaration
public static Rect GetNodeOuterToEdgePosition(Rect outerPosition)
Parameters
| Type |
Name |
Description |
| Rect |
outerPosition |
|
Returns
Highlight(Color)
Declaration
public static Color Highlight(Color color)
Parameters
| Type |
Name |
Description |
| Color |
color |
|
Returns
LineIntersectionPoint(Vector2, Vector2, Vector2, Vector2)
Declaration
public static Vector2? LineIntersectionPoint(Vector2 start1, Vector2 end1, Vector2 start2, Vector2 end2)
Parameters
| Type |
Name |
Description |
| Vector2 |
start1 |
|
| Vector2 |
end1 |
|
| Vector2 |
start2 |
|
| Vector2 |
end2 |
|
Returns
Node(Rect, Color, Boolean, Boolean, Boolean, Boolean)
Declaration
public static void Node(Rect position, Color color, bool hovered, bool selected, bool pressed, bool thickOutline = true)
Parameters
NodeOverlay(Rect, Color, Boolean, Boolean, Boolean, Boolean)
Declaration
public static void NodeOverlay(Rect position, Color color, bool hovered, bool selected, bool pressed, bool thickOutline = true)
Parameters
PositionOverlaps(IGraphContext, IGraphElementWidget, Single)
Declaration
public static bool PositionOverlaps(IGraphContext context, IGraphElementWidget widget, float threshold = 3F)
Parameters
Returns
SizeProjection(Vector2, Vector2, Vector2)
Declaration
public static float SizeProjection(Vector2 size, Vector2 spreadOrigin, Vector2 spreadAxis)
Parameters
| Type |
Name |
Description |
| Vector2 |
size |
|
| Vector2 |
spreadOrigin |
|
| Vector2 |
spreadAxis |
|
Returns
SnapToGrid(Rect, Boolean)
Declaration
public static Rect SnapToGrid(Rect position, bool resize)
Parameters
| Type |
Name |
Description |
| Rect |
position |
|
| Boolean |
resize |
|
Returns
SnapToGrid(Single)
Declaration
public static float SnapToGrid(float position)
Parameters
| Type |
Name |
Description |
| Single |
position |
|
Returns
SnapToGrid(Vector2)
Declaration
public static Vector2 SnapToGrid(Vector2 position)
Parameters
| Type |
Name |
Description |
| Vector2 |
position |
|
Returns
UpdateDroplets(ICanvas, List<Single>, Nullable<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