[]
        
(Showing Draft Content)

GrapeCity.Documents.Layout.Contour

Class Contour

Namespace
GrapeCity.Documents.Layout
Assembly
GcDocs.Imaging.dll

Represents a closed figure on a LayoutView.

public class Contour
Inheritance
object
Contour
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

Points

Gets a read-only list of AnchorPoints.

public IReadOnlyList<AnchorPoint> Points { get; }

Property Value

System.Collections.Generic.IReadOnlyList<T><AnchorPoint>

Tag

Gets or sets the object that contains data about the Contour.

public object Tag { get; set; }

Property Value

object

View

Gets the owner LayoutView object.

public LayoutView View { get; }

Property Value

LayoutView

Methods

AddPoint(AnchorPoint)

Adds one AnchorPoint to the Contour.

public void AddPoint(AnchorPoint anchorPoint)

Parameters

anchorPoint AnchorPoint

The AnchorPoint to be added. The owner LayoutRect must belong to the same LayoutView.

AddPoints(IEnumerable<AnchorPoint>)

Adds all AnchorPoints from the collection to the Contour.

public void AddPoints(IEnumerable<AnchorPoint> collection)

Parameters

collection System.Collections.Generic.IEnumerable<T><AnchorPoint>

AnchorPoints to be added. The owner LayoutRects must belong to the same LayoutView.

DetachFromView()

Detaches the Contour from its owner LayoutView and removes all constraints referencing the Contour.

public void DetachFromView()

GetBounds(LayoutRect, out float, out float, out float, out float)

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)

Parameters

targetRect LayoutRect

The target LayoutRect.

minX float

The minimum X offset of the Contour relative to targetRect's left side.

maxX float

The maximum X offset of the Contour relative to targetRect's left side.

minY float

The minimum Y offset of the Contour relative to targetRect's top side.

maxY float

The maximum Y offset of the Contour relative to targetRect's top side.

GetBounds(LayoutRect)

Gets the minimal System.Drawing.RectangleF that contains all points of the Contour relative to the specified LayoutRect.

public RectangleF GetBounds(LayoutRect targetRect)

Parameters

targetRect LayoutRect

The target LayoutRect.

Returns

System.Drawing.RectangleF

GetBounds(LayoutView, out float, out float, out float, out float)

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)

Parameters

targetView LayoutView

The destination LayoutView or null to reference the LayoutHost.

minX float

The minimum X coordinate of the Contour in the target view's coordinates.

maxX float

The maximum X coordinate of the Contour in the target view's coordinates.

minY float

The minimum Y coordinate of the Contour in the target view's coordinates.

maxY float

The maximum Y coordinate of the Contour in the target view's coordinates.

GetBounds(LayoutView)

Gets the minimal System.Drawing.RectangleF that contains all points of the Contour relative to the specified LayoutView.

public RectangleF GetBounds(LayoutView targetView)

Parameters

targetView LayoutView

The destination LayoutView or null to reference the LayoutHost.

Returns

System.Drawing.RectangleF

MapToRect(LayoutRect)

Returns an array of all AnchorPoint coordinates transformed to the specified LayoutRect.

public PointF[] MapToRect(LayoutRect targetRect)

Parameters

targetRect LayoutRect

The target LayoutRect.

Returns

System.Drawing.PointF[]

An array of points in the target LayoutRect coordinates.

MapToView(LayoutView)

Returns an array of all AnchorPoint coordinates transformed to the specified LayoutView.

public PointF[] MapToView(LayoutView targetView)

Parameters

targetView LayoutView

The destination LayoutView; null to target the LayoutHost.

Returns

System.Drawing.PointF[]

An array of points in the target LayoutView coordinates.