The general contour line segment iterator describes line segments of a general contour.
Namespace: Cognex.VisionProAssembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 65.1.0.0
Syntax
The ICogGeneralContourLineSegmentIterator type exposes the following members.
Methods
| Name | Description | |
|---|---|---|
| Copy | Makes a copy of this iterator. The copy will be positioned at the same item as this plus the given IndexOffset. For example, if IndexOffset is +1 the copy will be positioned at the next item, if IndexOffset is -1, the copy will be at the previous item. | |
| CreateLineSegment | Creates a gcnew CogLineSegment with the same geometric and graphics properties as this segment. | |
| GetEllipticalArcSegmentIterator | Gets the iterator interface that provides full access to arc segment properties. | |
| GetLineSegmentIterator | Gets the iterator interface that provides full access to line segment properties. | |
| GetStartEnd | Returns the start and end coordinates for the line segment. | |
| MoveToNext | Moves the iterator to the next position, loading that item's properties into this iterator. If the iterator is at the end position, an error is returned. To avoid getting errors, you may wish to check IsEnd. | |
| MoveToPosition | Moves the iterator to the specified position in the sequence, loading that item's properties into this iterator. | |
| MoveToPrevious | Moves the iterator to the previous position, loading that item's properties into this iterator. If there are no items before this, an error is returned. To avoid getting errors, you may wish to check IsFirst. | |
| SetFromLineSegment | Sets the line segment geometry from the given LineSegment. Only the geometry is copied, graphics properties are ignored. Note that this method also changes the geometry of any connected segments because it changes both Start and End of this segment. | |
| SetStartEnd | Sets the start and end coordinates for the line segment. Note that this may change the start or end coordinates of any segments connected to this one. |
Properties
| Name | Description | |
|---|---|---|
| Attributes | Returns property bits describing which iterator methods can be called at the current position of the iterator. | |
| Container | Returns a reference to the container object being iterated. This can be used for identifying the iterator's container. | |
| CustomPen | Returns/sets the key that refers to the custom pen properties used for drawing this segment. A key of 0 (the default) causes the segment to use the pen properties of the contour. | |
| EndAdornmentCustomPen | Returns/sets the custom pen used to draw the adornment at the end point of the segment. | |
| EndAngle | Computes the angle (in radians) of the tangent to this segment's shape at the end of the segment. | |
| EndFlags | Returns the flags describing the contour's behavior at end point of the segment. | |
| EndX | Returns/sets the X coordinate of the end point of the segment. | |
| EndY | Returns/sets the Y coordinate of the end point of the segment. | |
| IsEnd | Returns True if this iterator is positioned past the last item of the sequence. If True, calling MoveToNext will return an error, and attempting to read item properties will produce an error. Moving the iterator to a valid item will validate it. | |
| IsFirst | Returns True if this is the first item. If True, a call to MoveToPrevious would return an error. | |
| IsInvalid | Returns True if this iterator is not positioned at a valid item. If True, reading or writing any item properties will produce errors. | |
| Length | Computes the length of this segment of the contour. | |
| Position | Returns the position of the iterator in the container. | |
| SegmentType | Returns the type of this segment of the contour. The segment type can be used to choose the most specific iterator to extract all information about the segment. | |
| StartAdornmentCustomPen | Returns/sets the custom pen used to draw the adornment at the start point of the segment. | |
| StartAngle | Computes the angle (in radians) of the tangent to this segment's shape at the start of the segment. | |
| StartFlags | Returns the flags describing the contour's behavior at start point of the segment. | |
| StartX | Returns/sets the X coordinate of the start point of the segment. | |
| StartY | Returns/sets the Y coordinate of the start point of the segment. |
Remarks
The general contour line segment iterator describes line segments of a general contour.
See Also