CogPolygon MethodsCognex VisionPro 9.24

The CogPolygon type exposes the following members.

Methods

  NameDescription
Public methodAddVertex
Add a vertex to the polygon. If the default index -1 is used, the new vertex will be added to the end of any existing vertices. Otherwise Index must be >= 0 and <= NumVertices.
Public methodArcCenter
Compute the center of mass of this polygon as if the mass were uniformly distributed along the perimeter. Generates an error if there are less than two vertices.
Public methodArcMoments1
Compute the zeroth and first moments of this polygon as if the mass were uniformly distributed along the perimeter. Results will be zero if there are fewer than two vertices.
Public methodArcMoments2
Compute the zeroth, first, and second moments of this polygon as if the mass were uniformly distributed along the perimeter. Results will be zero if there are fewer than two vertices.
Public methodAreaCenter
Compute the centroid of this polygon. Generates an error if there are fewer than 3 vertices.
Public methodAreaMoments1
Compute the zeroth and first moments of area of this polygon. Results will be zero if there are fewer than 3 vertices.
Public methodAreaMoments2
Compute the zeroth, first, and second moments of area of this polygon. Results will be zero if there are fewer than 3 vertices.
Protected methodattachCom
Protected methodClone
Returns a deep copy of this class instance. Derived classes that implement Clone should override this method; other clients who wish to clone this instance should call ICloneable.Clone. See also CogSerializer.DeepCopyObject
Public methodConvexHull
Compute and return a CogPolygon that is the convex hull of these vertices.
Public methodCopy
Create a new polygon that replicates the specified properties.
Public methodCopyBase
Copy a graphic and its derived parameters.
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodCreateRLE
Create an RLE representation of this Region.
Public methodDispose 
Protected methodDispose(Boolean)
Public methodDistanceToPoint
Shortest distance from a boundary of this shape to the given point. Points within closed shapes return a distance less than zero.
Public methodEnclosingRectangle
Minimum enclosing rectangle of this shape.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize (Overrides Object Finalize .)
Public methodFitToBoundingBox
Adjust the shape's geometric properties so that the shape fits inside passed in rectangle.
Public methodFitToImage
Adjust the shape's geometric properties such that its default size is based on the image and its SelectedSpaceName. XScale and YScale are multipliers where 1.0 designates 100% scaling.
Protected methodGetAttributes
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetClassName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetComponentName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetConverter
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultEvent
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultProperty
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEditor
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodGetObjectData
Public methodGetParentFromChildTransform
Protected methodGetProperties 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetProperties( Attribute ) (Overrides CogObjectBase GetProperties( Attribute ).)
Protected methodGetPropertyOwner
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetVertex
Get the coordinates of the vertex at the specified index. Index must be >= 0 and < NumVertices.
Public methodGetVertexAdornmentColor
The adornment color for the vertex with the given index.
Public methodGetVertexX
The X-coordinate of the vertex with the given index.
Public methodGetVertexY
The Y-coordinate of the vertex with the given index.
Public methodGetVertices
The X,Y coordinates of all vertices, returned as a two-dimensional array. The size of this array is automatically set to match the number of vertices.
Public methodHighlightRelinquish
Decrement the HighlightRequested reference count, unless it is already zero. If HighlightRequested reaches zero, vertex highlighting is disabled.
Public methodHighlightRequest
Enables vertex highlighting by incrementing HighlightRequested.
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodMakeShapeModel
Returns a newly created shape model with the given weight and polarity. The 'Shape' property of the returned shape model will refer to this shape, or a copy of this shape, as specified by the CopyShape argument.
Public methodMap
Maps this shape through the given transform.
Public methodMapLinear
Create a new polygon by mapping this one through the given transform.
Public methodMeanVertex
Return the average X and Y coordinates of all the vertices. Generates an error if there are no vertices.
Protected methodMemberwiseClone 
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Public methodNearestVertex
Return the index number of the vertex nearest to the supplied X,Y coordinates. Generates an error if there are no vertices.
Public methodRemoveVertex
Remove the specified vertex from the polygon. Index must be >= 0 and < NumVertices.
Public methodResumeAndRaiseChangedEvent
Re-enables raising of the Changed event after SuspendChangedEvent has been called. Also raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.
Public methodSetVertex
Set the coordinates of the vertex at the specified index. Index must be >= 0 and < NumVertices.
Public methodSetVertexAdornmentColor
The adornment color for the vertex with the given index.
Public methodSetVertexX
The X-coordinate of the vertex with the given index.
Public methodSetVertexY
The Y-coordinate of the vertex with the given index.
Public methodSetVertices
Modify the coordinates of the vertices to match the supplied values. If there are more supplied values than vertices, append sufficient vertices. If there are fewer supplied values than vertices, discard vertices at the end.
Public methodSuspendChangedEvent
Temporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodVertexReserve
If the supplied value is less than or equal to the current VertexCapacity, there will be no change. Otherwise, ensure that VertexCapacity is greater than or equal to the supplied value.
Top
See Also