CogMath CreateLineParallel Method Cognex VisionPro 9.21 SR1
Create a new line through the given point parallel to the given line.

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

public static CogLine CreateLineParallel(
	double x,
	double y,
	CogLine line,
	ICogImage image
)

Parameters

x
Type: System Double

The x-coordinate of the reference point of the new line.

y
Type: System Double

The y-coordinate of the reference point of the new line.

line
Type: Cognex.VisionPro CogLine

The line that the new line will be parallel to.

image
Type: Cognex.VisionPro ICogImage

An image that specifies the coordinate space to use.

Return Value

Type: CogLine

The new line.

Exceptions

ExceptionCondition
ArgumentException

line is NULL.

CogSpaceTreeInvalidNameSyntaxException

At least one shape's selected space names is not a legal space name.

CogSpaceTreeNotUniqueException

At least one shape's selected space names is a nonqualified space name and more than one instance of it exists in image's coordinate space tree.

CogSpaceTreeNotInTreeException

At least one shape does not exist in image's coordinate space tree.

CogImageNoTreeException

The coordinate space tree is missing from image.

Remarks

Creates a new CogLine that is parallel to line and whose reference point is (x,y).

The new line has the same rotation and properties (such as Color) as line.

If you supply a value for the image parameter, then line is mapped to the selected space of image before the new line is created. The returned line has its selected space set to the selected space of image.

If you do not supply a value for image, then the returned line has its selected space set to ".".

See Also