[]
Represents a closed figure on a LayoutView.
public class Contour
Gets a read-only list of AnchorPoints.
public IReadOnlyList<AnchorPoint> Points { get; }
Gets or sets the object that contains data about the Contour.
public object Tag { get; set; }
Gets the owner LayoutView object.
public LayoutView View { get; }
Adds one AnchorPoint to the Contour.
public void AddPoint(AnchorPoint anchorPoint)
anchorPoint
AnchorPointThe AnchorPoint to be added. The owner LayoutRect must belong to the same LayoutView.
Adds all AnchorPoints from the collection to the Contour.
public void AddPoints(IEnumerable<AnchorPoint> collection)
collection
System.Collections.Generic.IEnumerable<T><AnchorPoint>AnchorPoints to be added. The owner LayoutRects must belong to the same LayoutView.
Detaches the Contour from its owner LayoutView and removes all constraints referencing the Contour.
public void DetachFromView()
Gets the minimum and maximum positions of the Contour relative to the specified LayoutRect.
public void GetBounds(LayoutRect targetRect, out float minX, out float maxX, out float minY, out float maxY)
targetRect
LayoutRectThe target LayoutRect.
minX
floatThe minimum X offset of the Contour relative to targetRect
's left side.
maxX
floatThe maximum X offset of the Contour relative to targetRect
's left side.
minY
floatThe minimum Y offset of the Contour relative to targetRect
's top side.
maxY
floatThe maximum Y offset of the Contour relative to targetRect
's top side.
Gets the minimal System.Drawing.RectangleF that contains all points of the Contour relative to the specified LayoutRect.
public RectangleF GetBounds(LayoutRect targetRect)
targetRect
LayoutRectThe target LayoutRect.
Gets the minimum and maximum positions of the Contour relative to the specified LayoutView.
public void GetBounds(LayoutView targetView, out float minX, out float maxX, out float minY, out float maxY)
targetView
LayoutViewThe destination LayoutView or null to reference the LayoutHost.
minX
floatThe minimum X coordinate of the Contour in the target view's coordinates.
maxX
floatThe maximum X coordinate of the Contour in the target view's coordinates.
minY
floatThe minimum Y coordinate of the Contour in the target view's coordinates.
maxY
floatThe maximum Y coordinate of the Contour in the target view's coordinates.
Gets the minimal System.Drawing.RectangleF that contains all points of the Contour relative to the specified LayoutView.
public RectangleF GetBounds(LayoutView targetView)
targetView
LayoutViewThe destination LayoutView or null to reference the LayoutHost.
Returns an array of all AnchorPoint coordinates transformed to the specified LayoutRect.
public PointF[] MapToRect(LayoutRect targetRect)
targetRect
LayoutRectThe target LayoutRect.
An array of points in the target LayoutRect coordinates.
Returns an array of all AnchorPoint coordinates transformed to the specified LayoutView.
public PointF[] MapToView(LayoutView targetView)
targetView
LayoutViewThe destination LayoutView; null to target the LayoutHost.
An array of points in the target LayoutView coordinates.