Udostępnij za pośrednictwem


PortPlacementHelper.FindPerimeterRotation Method

Definition

Given initial and final bounds of the port, find the rotation distance on the perimeter of the component and the rotation direction. Clockwise is positive and anticlockwise is negative. Assumption: initialBounds and finalBounds are a small delta apart. Hence called between two GetCompliantBounds calls

public:
 virtual double FindPerimeterRotation(Microsoft::VisualStudio::Modeling::Diagrams::NodeShape ^ parentShape, Microsoft::VisualStudio::Modeling::Diagrams::RectangleD initialBounds, Microsoft::VisualStudio::Modeling::Diagrams::PortPlacement initialPlacement, Microsoft::VisualStudio::Modeling::Diagrams::RectangleD finalBounds, Microsoft::VisualStudio::Modeling::Diagrams::PortPlacement finalPlacement);
public virtual double FindPerimeterRotation (Microsoft.VisualStudio.Modeling.Diagrams.NodeShape parentShape, Microsoft.VisualStudio.Modeling.Diagrams.RectangleD initialBounds, Microsoft.VisualStudio.Modeling.Diagrams.PortPlacement initialPlacement, Microsoft.VisualStudio.Modeling.Diagrams.RectangleD finalBounds, Microsoft.VisualStudio.Modeling.Diagrams.PortPlacement finalPlacement);
abstract member FindPerimeterRotation : Microsoft.VisualStudio.Modeling.Diagrams.NodeShape * Microsoft.VisualStudio.Modeling.Diagrams.RectangleD * Microsoft.VisualStudio.Modeling.Diagrams.PortPlacement * Microsoft.VisualStudio.Modeling.Diagrams.RectangleD * Microsoft.VisualStudio.Modeling.Diagrams.PortPlacement -> double
override this.FindPerimeterRotation : Microsoft.VisualStudio.Modeling.Diagrams.NodeShape * Microsoft.VisualStudio.Modeling.Diagrams.RectangleD * Microsoft.VisualStudio.Modeling.Diagrams.PortPlacement * Microsoft.VisualStudio.Modeling.Diagrams.RectangleD * Microsoft.VisualStudio.Modeling.Diagrams.PortPlacement -> double
Public Overridable Function FindPerimeterRotation (parentShape As NodeShape, initialBounds As RectangleD, initialPlacement As PortPlacement, finalBounds As RectangleD, finalPlacement As PortPlacement) As Double

Parameters

parentShape
NodeShape
initialBounds
RectangleD

Initial port bounds relative to the parent

initialPlacement
PortPlacement
finalBounds
RectangleD

Final port bounds relative to the parent

finalPlacement
PortPlacement

Returns

Applies to