CogDisplay GetScreenPanAnchor Method Cognex VisionPro 9.8 SR1
Returns the screen pan anchor position.

Namespace: Cognex.VisionPro.Display
Assembly: Cognex.VisionPro.Display.Controls (in Cognex.VisionPro.Display.Controls.dll) Version: 75.0.0.0 (75.0.0.0)
Syntax

public virtual void GetScreenPanAnchor(
	[OptionalAttribute] out double x,
	[OptionalAttribute] out double y,
	[OptionalAttribute] out CogDisplayPanAnchorConstants method
)

Parameters

x (Optional)
Type: System Double 
The x-coordinate of the pan anchor.
y (Optional)
Type: System Double 
The y-coordinate of the pan anchor.
method (Optional)
Type: Cognex.VisionPro.Display CogDisplayPanAnchorConstants 
How the pan distance is computed.
Exceptions

Remarks

Describes the point in the display control (in screen screen coordinates) that the image anchor point will be moved to when PanX and PanY are set to zero. Stated another way, this is the point to which the pan offsets from the image anchor are measured.

Ifmethod is Relative, thenx, y are interpreted as percent of the screen size or, in a coordinate space where 0,0 is the upper-leftmost screen border of the display control's window, and 1,1 is the lower right extent of the window. For example, calling PanX=0, PanY=0, SetScreenPanAnchor(0.5, 0.5, VARIANT_TRUE) would always keep the image anchor point centered in the display window, even if the display window is resized.

When method is Absolute, the values of x and y are absolute coordinate values.

Note: This method will cause the image to redraw.

See Also