Viewport.screenToView Method

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Converts a 2D screen point into the equivalent viewport coordinate.

Syntax

"viewport_var" is a variable referencing a Viewport object.
returnValue = viewport_var.screenToView(screenCoordinate)
"viewport_var" is a variable referencing a Viewport object.

#include <Core/Application/Viewport.h>

returnValue = viewport_var->screenToView(screenCoordinate);

Return Value

Type Description
Point2D Returns the equivalent point in the viewport. This can return null in the case where the input screen point does not lie within the viewport.

Parameters

Name Type Description
screenCoordinate Point2D A 2D coordinate in screen space. (0,0) indicates the upper-left corner of the entire screen.

Version

Introduced in version April 2017