poIImagePlaneCtrl RaiseZOrder

Alters the drawing order of a foreground or background image plane so that it is in front of one (or more) other image planes.

Syntax

Imageplane_ctrl_handle RaiseZOrder id ?to_top?

Application

HyperView Tcl Modify

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 moves the specified image plane in front of the next image plane that is above it. If the image plane specified is already at the top of the Z order list, nothing occurs. If to_top is passed as true, the specified image plane is pushed to the top of the Z order list.

Inputs

id
The unique ID of the image plane to modify.
?to_top?
If “true” is specified, the image plane will be put at the top of the z order list.

Example

The example below creates four image planes. The default Z order is “4 3 2 1”. The image plane with ID 1 is moved up one, making the Z order “4 3 1 2”. The image plane with ID 1 is then moved to the top of the Z order list, making the Z order “1 4 3 2”.
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 Logo1]
ipc_handle GetImagePlaneHandle imageplane_handle $ipid
imageplane_handle SetFileName g:/samples2/VideoOverlay/logo1.jpg
imageplane_handle SetMode background
imageplane_handle ReleaseHandle
set ipid [ipc_handle AddImagePlane Logo2]
ipc_handle GetImagePlaneHandle imageplane_handle $ipid
imageplane_handle SetFileName g:/samples2/VideoOverlay/logo2.jpg
imageplane_handle SetMode background
imageplane_handle ReleaseHandle
set ipid [ipc_handle AddImagePlane Video1]
ipc_handle GetImagePlaneHandle imageplane_handle $ipid
imageplane_handle SetFileName g:/samples2/VideoOverlay/video1.jpg
imageplane_handle SetMode background
imageplane_handle ReleaseHandle
set ipid [ipc_handle AddImagePlane Video2]
ipc_handle GetImagePlaneHandle imageplane_handle $ipid
imageplane_handle SetFileName g:/samples2/VideoOverlay/video2.jpg
imageplane_handle SetMode background
imageplane_handle ReleaseHandle
set Zlist [ipc_handle GetZOrderList background]
client_handle Draw
puts "The Z Order List is: $Zlist"
ipc_handle RaiseZOrder 1
client_handle Draw
set Zlist [ipc_handle GetZOrderList background]
puts "The Z Order List is: $Zlist"
ipc_handle RaiseZOrder 1 true
set Zlist [ipc_handle GetZOrderList background]
puts "The Z Order List is: $Zlist"
hwi CloseStack

Console Output:

The Z Order List is: 4 3 2 1

The Z Order List is: 4 3 1 2

The Z Order List is: 1 4 3 2

Errors

Returns HW_InvalidHandle if the image plane control handle is invalid, or HW_Warning if the specified image plane ID is not found.