poIImagePlaneCtrl AddImagePlane

Adds a new image plane.

Syntax

Imageplane_ctrl_handle AddImagePlane ?label? ?id?

Application

HyperView Tcl Modify

Description

This command adds/creates a new image plane. The image allows the placing of a graphic image or video into the HyperView model window.

Inputs

label
Specifies a label to be assigned to the image plane. If not specified, this will be blank.
Id
Specified a unique ID to be assigned to the image plane. If not specified, a unique ID will be automatically assigned.
Upon success, it returns the ID of the newly created image plane.

Example

To create an image plane that puts a logo image into the background:
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
client_handle Draw
hwi CloseStack

Errors

Returns HW_InvalidHandle if the image plane control handle is invalid, PO_DuplicateName if the specified label already exists on another image plane, or HW_FailedToCreate if a memory allocation problem occurred.

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