Export (0) Print
Expand All

ShapeGeometry.DoFoldToShape Method

Calculates the point where a connector crosses the outline of the shape geometry. It is used to compute where connectors should terminate.

Namespace:  Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.dll)

public abstract PointD DoFoldToShape(
	IGeometryHost geometryHost,
	PointD potentialPoint,
	PointD vectorEndpoint


Type: Microsoft.VisualStudio.Modeling.Diagrams.IGeometryHost

The shape or link.

Type: Microsoft.VisualStudio.Modeling.Diagrams.PointD

The point along the bounding rectangle where the connector crosses the boundary, measured relative to the parent shape.

Type: Microsoft.VisualStudio.Modeling.Diagrams.PointD

The direction of the connector. An arbitrary point along the line, in coordinates relative to the potentialPoint. For example, if the line is horizontal, the Y coordinate will be 0.

Return Value

Type: Microsoft.VisualStudio.Modeling.Diagrams.PointD
The point where the connector crosses the outline of the shape, measured relative to the parent shape.

You can override this method if your shape does not extend fully to the boundary rectangle. Alternatively, it might be simpler to override DoFoldToShape, and avoid having to create your own ShapeGeometry class.

Fold to shape

Community Additions

© 2014 Microsoft