poIImagePlaneCtrl GetZOrderList

Returns the order in which image planes are drawn when they are configured as background or foreground 2D image planes.

Syntax

Imageplane_ctrl_handle GetZOrderList type

Application

HyperView Tcl Query

Description

Image planes have one of three modes for placement into the client window: foreground, background, or 3D. Background image planes are always drawn behind the model elements. Foreground image planes are always drawn in front of the model elements. When multiple background or foreground image planes are present, the Z order controls how overlapping image planes are drawn with respect to one another. This command returns the order in which image planes are drawn for the specified type. The returned list contains the IDs for the image planes of that type, in the order they will appear in the graphic area. An image listed at the beginning of the list will be drawn in front of image planes at the end of the Z order list.

If there are no image planes of the type specified, nothing will be returned by this command.

Inputs

type
The type of image plane to query. Valid values are “foreground” and “background”.

Example

To create four image planes and then retrieve the Z order list:
hwi OpenStack
hwi GetSessionHandle session_handle
session_handle GetProjectHandle project_handle
project_handle GetPageHandle page_handle [project_handle GetActivePage]
page_handle GetWindowHandle window_handle [page_handle GetActiveWindow]
window_handle GetClientHandle client_handle
client_handle GetImagePlaneCtrlHandle ipc_handle
set ipid [ipc_handle AddImagePlane Logo]
ipc_handle GetImagePlaneHandle imageplane_handle $ipid
imageplane_handle SetFileName C:/samples/logo.jpg
imageplane_handle SetMode background
imageplane_handle ReleaseHandle
set ipid [ipc_handle AddImagePlane Logo2]
ipc_handle GetImagePlaneHandle imageplane_handle $ipid
imageplane_handle SetFileName C:/samples/logo2.jpg
imageplane_handle SetMode background
imageplane_handle ReleaseHandle
set ipid [ipc_handle AddImagePlane Logo3]
ipc_handle GetImagePlaneHandle imageplane_handle $ipid
imageplane_handle SetFileName C:/samples/logo3.jpg
imageplane_handle SetMode background
imageplane_handle ReleaseHandle
set ipid [ipc_handle AddImagePlane Logo4]
ipc_handle GetImagePlaneHandle imageplane_handle $ipid
imageplane_handle SetFileName C:/samples/logo3.jpg
imageplane_handle SetMode background
imageplane_handle ReleaseHandle
set Zlist [ipc_handle GetZOrderList background]
puts "The Z Order List is: $Zlist"
client_handle Draw
hwi CloseStack

Output

The Z Order List is: 4 3 2 1

Error

Returns HW_InvalidHandle if the image plane control handle is invalid, or PO_InvalidImageName if no image plane exists with the label specified.

To obtain the error information, use GetError on the Session object as shown in the example.