NodeCanvasGeometry
Static class in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll
Where the parts of a node canvas are, in canvas units (Vision Center’s pipelines, Provisioning’s profiles): node cards of one size, the graph drawn from top to bottom: the input dot at the top centre of a card, the output dot at its bottom centre, the + below the output (below the error when the node has one), the eye top right; links as vertical curves from an output down to an input; the view (zoom and pan). The canvas controls draw with these (NodeCanvasPainter) and their view models find what a press hit with them.
public static class NodeCanvasGeometryMethods
Section titled “Methods”ControlPlusRect
Section titled “ControlPlusRect”static Rect ControlPlusRect(double x, double y, int index = 0)The + left of an empty control input of the selected node: a click adds a node into that input (a Timer into Reset).
ControlPort
Section titled “ControlPort”static Point ControlPort(double x, double y, int index = 0)A control input (Reset, Send now, Only while, Second): a dot on the card’s left edge in its own row below the live line.
static (Point C1, Point C2) Curve(Point from, Point to, bool intoSide = false)The control points of a link’s curve from from (an output) down to to (an input).
Distance
Section titled “Distance”static double Distance(Point a, Point b)The distance from a to b.
DistanceToCurve
Section titled “DistanceToCurve”static double DistanceToCurve(Point point, Point from, Point to, bool intoSide = false)The distance of point to the curve (sampled), in canvas units.
DistanceToSegment
Section titled “DistanceToSegment”static double DistanceToSegment(Point point, Point a, Point b)The distance from point to the segment a-b.
EyeRect
Section titled “EyeRect”static Rect EyeRect(double x, double y)The eye at the top right of the card at x, y.
static CanvasView Fit(Rect content, Size viewport, double topRoom, double maxZoom = 1)Fit view: content (canvas units) in the view, at most maxZoom, centred across and at most topRoom screen pixels below the top (the graph grows downwards).
HeightFor
Section titled “HeightFor”static double HeightFor(int controlInputs)The height of a card with controlInputs control inputs.
InputPort
Section titled “InputPort”static Point InputPort(double x, double y)The input dot: the top centre of the card.
NodeRect
Section titled “NodeRect”static Rect NodeRect(double x, double y, double height = 62)The card at x, y (its top left).
OnCurve
Section titled “OnCurve”static Point OnCurve(Point from, Point to, double t, bool intoSide = false)A point on the curve at t (0 to 1).
OutputPort
Section titled “OutputPort”static Point OutputPort(double x, double y, double height = 62)The output dot: the bottom centre of the card.
PlusRect
Section titled “PlusRect”static Rect PlusRect(double x, double y, bool belowError = false, bool besideLinks = false, double height = 62)The + below the output, below the node’s error when it has one; beside the links when the output already leads on (besideLinks), so it never covers their curve and count.
ZoomAround
Section titled “ZoomAround”static CanvasView? ZoomAround(CanvasView view, Point screen, double factor)The wheel: zoom by factor around screen (it stays under the pointer), 25 % to 200 %; null when the zoom stays.
Fields
Section titled “Fields”ColumnGap
Section titled “ColumnGap”const double ColumnGap = 40Tidy up: the gap between two cards side by side, and one column (a card and its gap).
ColumnStep
Section titled “ColumnStep”const double ColumnStep = 240Tidy up: one column, a card and its gap.
ControlPortRadius
Section titled “ControlPortRadius”const double ControlPortRadius = 6A control input’s dot: the size of the data dots, centred on the card’s left edge.
ControlRowHeight
Section titled “ControlRowHeight”const double ControlRowHeight = 20A row per control input below the live line: its dot on the left edge, its label beside it.
ErrorRoom
Section titled “ErrorRoom”const double ErrorRoom = 34The room of an error below a node (two lines of small text): the + moves below it.
EyeSize
Section titled “EyeSize”const double EyeSize = 24The size of the eye at the top right of a card.
LinkReach
Section titled “LinkReach”const double LinkReach = 6A press this near a link (screen pixels) takes it.
Margin
Section titled “Margin”const double Margin = 40The room around the cards when the view fits them.
MaxZoom
Section titled “MaxZoom”const double MaxZoom = 2The largest zoom.
MinZoom
Section titled “MinZoom”const double MinZoom = 0.25The smallest zoom.
NodeHeight
Section titled “NodeHeight”const double NodeHeight = 62The height of a card without control inputs.
NodeWidth
Section titled “NodeWidth”const double NodeWidth = 200The width of every card.
PlusGap
Section titled “PlusGap”const double PlusGap = 18The + sits this far below the node’s bottom edge.
PlusSize
Section titled “PlusSize”const double PlusSize = 22The size of the + below a card.
PortRadius
Section titled “PortRadius”const double PortRadius = 7The radius of an input or output dot.
PortReach
Section titled “PortReach”const double PortReach = 11A press this near a port takes it.
RowGap
Section titled “RowGap”const double RowGap = 56Tidy up: the gap between a row’s tallest card and the next row: room for a link and its count.
RowStep
Section titled “RowStep”const double RowStep = 118Where a node added after another goes: below it, one card and one gap down.