Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 79.0.0.0
Parameters
- boundingRectangle
- Type: Cognex.VisionPro CogRectangle
The rectangle that the shape is to fit into.
| Exception | Condition |
|---|---|
| ArgumentException | boundingRectangle is NULL. |
Adjusts the shape's geometric properties so that the shape fits inside a given rectangle.
Note: The coordinates of the bounding box must be given in the same coordinate space as the shape.
Different shapes behave differently when FitToBoundingBox(CogRectangle) is called.
Behavior of FitToBoundingBox(CogRectangle) with different shapesShapeBehaviorCogCircle
CogEllipse
CogRectangle
CogRectangleAffine
CogCoordinateAxes
The shaped is scaled to the size and location of the bounding rectangle.
CogCircularArc
CogCircularAnnulusSection
CogEllipticalArc
CogEllipticalAnnulusSection
The shape is scaled to the size and location of the bounding rectangle. The resulting shape covers the range from 0 to 270 degrees in pixel space.
The line segment is centered vertically and horizontally across the bounding rectangle.
The line's reference point is centered in the bounding rectangle, and its rotation is maintained.
The centroid of the polygon is centered in the bounding box.
The point is centered in the bounding rectangle.