CogRectangle SetXYWidthHeight Method Cognex VisionPro 9.24
Initialize from X,Y,Width,Height.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 91.0.0.0
Syntax

public void SetXYWidthHeight(
	double x,
	double y,
	double width,
	double height
)

Parameters

x
Type: System Double

The x-coordinate of the top left corner of the rectangle

y
Type: System Double

The y-coordinate of the top left corner of the rectangle

width
Type: System Double

The width of the rectangle.

height
Type: System Double

The height of the rectangle.

Events

Event TypeReason
CogRectangle Changed

Fires when the value of this property changes.

The following state flags may be affected:

    Exceptions

    ExceptionCondition
    ArgumentException

    width is <= 0 or height is <= 0.

    Remarks

    Returns the x- and y-coordinates and the width and height of this rectangle.

    See Also