ShapeGeometry::SnapToCircle Method (PointD, Double, PointD, PointD)

 

Snaps a potential point from the bounding box around the shape geometry to the perimeter of the circle.

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

public:
static PointD SnapToCircle(
	PointD center,
	double radius,
	PointD vectorEndpoint,
	PointD potentialPoint
)

Parameters

center
Type: Microsoft.VisualStudio.Modeling.Diagrams::PointD

The center point of the circle.

radius
Type: System::Double

The radius of the circle.

vectorEndpoint
Type: Microsoft.VisualStudio.Modeling.Diagrams::PointD

The direction of the line, expressed as an arbitrary point along the line, measured relative to the potentialPoint. For example, if the line is horizontal, the Y coordinate is 0, and the X coordinate has an arbitrary value.

potentialPoint
Type: Microsoft.VisualStudio.Modeling.Diagrams::PointD

The point on the bounding rectangle of the circle that is to be extended to meet the circle.

Return Value

Type: Microsoft.VisualStudio.Modeling.Diagrams::PointD

The potential point that was snapped to the perimeter of the circle.

For circular and elliptical geometries, this function can be used as a helper in DoFoldToShape.

Return to top
Show: