PixelToObjects
Returns an ITerraExplorerObjects80 representing a list of objects that are positioned at a specified pixel on the window.
Note: Currently, this method only returns ITerrainLabel80 or ITerrainImageLabel80 label objects.
Example in C#:
private bool Globe_OnLButtonDown(int Flags, int X, int Y)
{
ITerraExplorerObjects80 objectsUnderCursor = globe.Window.PixelToObjects(X, Y, WorldPointType.WPT_DEFAULT);
foreach (dynamic teObj in objectsUnderCursor)
{
Console.WriteLine( ((ITerraExplorerObject80)teObj).ID);
}
return false;
}
JavaScript |
|
PixelToObjects( PixelX, PixelY, TypeFilterFlags) |
C# |
|
ITerraExplorerObjects80 PixelToObjects ( int PixelX, int PixelY, WorldPointType TypeFilterFlags = WorldPointType.WPT_DEFAULT) |
C++ |
|
HRESULT PixelToObjects ( [in] long PixelX, [in] long PixelY, [in] WorldPointType TypeFilterFlags, [in] ITerraExplorerObjects80** pITerraExplorerObjects) |
Parameters
PixelX
The left-right coordinate in pixels of a specified point on the window.
PixelY
The top-bottom coordinate in pixels of a specified point on the window.
TypeFilterFlags
The following are the possible values for this parameter
· WPT_LABEL = 2
· WPT_DEFAULT = -1
Return Value
pITerraExplorerObjects
An ITerraExplorerObjects80 representing the objects positioned at the specified pixel on the window.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.