NodeCanvasPainter
Static class in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll
The one look of every node canvas (Vision Center’s pipelines, Provisioning’s profiles and a camera’s flow): the dotted background, the links as vertical curves, the node cards (colour stripe on the left, icon, name, a line of text, the input dot at the top and the output dot at the bottom, the + below an output), the error directly below a red-bordered card. Colours from the theme (CanvasTheme); sizes from NodeCanvasGeometry. The canvas controls call these in drawing order; what only one canvas has (Vision Center’s eye and control inputs) it draws itself.
public static class NodeCanvasPainterMethods
Section titled “Methods”BelowHeight
Section titled “BelowHeight”static double BelowHeight(CanvasTheme theme, string message, double? maxWidth = null)The height NodeCanvasPainter.DrawBelow takes for message (with its gap above).
static StreamGeometry Curve(Point from, Point to, bool intoSide = false)The curve of a link from an output down to an input (NodeCanvasGeometry.Curve).
DrawBackground
Section titled “DrawBackground”static void DrawBackground(DrawingContext context, CanvasTheme theme, Rect bounds, CanvasView view)The canvas’s background and its dot grid, which moves and scales with the view.
DrawBelow
Section titled “DrawBelow”static void DrawBelow(DrawingContext context, CanvasTheme theme, Rect rect, string message, IBrush? brush = null, double? maxWidth = null)A message directly below a card (its error in red; a canvas may use another brush), on the canvas’s background so a link down from the output passes behind it, wrapping at maxWidth (null: the card width plus 30).
DrawCard
Section titled “DrawCard”static void DrawCard(DrawingContext context, Control owner, CanvasTheme theme, Rect rect, IBrush stripe, string iconKey, string name, bool isSelected, NodeCardBorder border, double? nameRight = null, IBrush? iconBrush = null)A node card: the selection ring, the card with its border, the colour stripe along the left edge, the icon in that colour and the name (trimmed before nameRight; null: the card’s right edge less 10).
DrawIcon
Section titled “DrawIcon”static void DrawIcon(DrawingContext context, Control owner, string key, IBrush brush, Rect at)An icon of the theme (Icon. + key) as strokes in brush.
DrawLine
Section titled “DrawLine”static void DrawLine(DrawingContext context, CanvasTheme theme, Rect rect, string text, IBrush? brush = null, int maxLines = 1)The line of a card below its name (a live value, a result), trimmed to the card.
DrawLink
Section titled “DrawLink”static void DrawLink(DrawingContext context, CanvasTheme theme, Point start, Point end, bool isSelected, bool intoSide = false)A link: the theme’s link colour (1 px), or the accent (2 px) while it is selected.
DrawPlus
Section titled “DrawPlus”static void DrawPlus(DrawingContext context, Control owner, CanvasTheme theme, Point output, Rect plus)The + below an output: a line down from the output dot at output and the box with the icon.
DrawPort
Section titled “DrawPort”static void DrawPort(DrawingContext context, CanvasTheme theme, Point at, bool isLit = false)An input or output dot; isLit fills it with the accent (a link being dragged fits).
LinkBrush
Section titled “LinkBrush”static IBrush LinkBrush(CanvasTheme theme)The colour of links, ports and the +.
Transform
Section titled “Transform”static Matrix Transform(CanvasView view)The transform from canvas units to the control (inside NodeCanvasPainter.DrawBackground’s bounds).
Fields
Section titled “Fields”CornerRadius
Section titled “CornerRadius”const double CornerRadius = 8The corner radius of a node card.
DotStep
Section titled “DotStep”const double DotStep = 22The distance between two dots of the background, in canvas units.
LineTop
Section titled “LineTop”const double LineTop = 35The top of the line below the name.
TextLeft
Section titled “TextLeft”const double TextLeft = 38The left edge of a card’s text (the icon sits left of it).