Class PortLayout

Shared geometry for a block node's input/output ports, so the node view (which draws the port dots) and EdgeDrawableControl (which anchors arrows to them) agree exactly. The pipeline flows top→down: inputs sit on the top edge, the output on the bottom edge. Coordinates are canvas-space; the fallback size matches VertexViewModel defaults.

Inheritance
PortLayout
Namespace: MOSAIC.ViewModels.Graph
Assembly: MOSAIC.dll
Syntax
public static class PortLayout

Fields

Diameter

Declaration
public const double Diameter = 16
Field Value
Type Description
double

FallbackHeight

Declaration
private const double FallbackHeight = 45
Field Value
Type Description
double

FallbackWidth

Declaration
private const double FallbackWidth = 132
Field Value
Type Description
double

Radius

Declaration
public const double Radius = 8
Field Value
Type Description
double

Methods

Center(VertexViewModel)

Centre of v (fallback anchor when a block has no input ports).

Declaration
public static Point Center(VertexViewModel v)
Parameters
Type Name Description
VertexViewModel v
Returns
Type Description
Point

InputAnchor(VertexViewModel, int, int)

Canvas-space anchor of input port index (of count total) on the top edge of v, evenly distributed left-to-right.

Declaration
public static Point InputAnchor(VertexViewModel v, int index, int count)
Parameters
Type Name Description
VertexViewModel v
int index
int count
Returns
Type Description
Point

OutputAnchor(VertexViewModel)

Canvas-space anchor of the output port on the bottom edge of v.

Declaration
public static Point OutputAnchor(VertexViewModel v)
Parameters
Type Name Description
VertexViewModel v
Returns
Type Description
Point

Search documentation

Start typing to search the documentation.