poIImagePlane SetPosition
Sets an image plane in the background or foreground mode to a predefined window location.
Syntax
Imageplane_handle SetPosition position
Application
HyperView Tcl Modify
Description
This command positions an image plane within the client window. This call is only valid when the image plane is in foreground or background mode. If the StretchToFit flag is set, positioning has no affect.
Inputs
- position
- Indicates the new image position:
- Center
- Center of the window.
- NW or NORTHWEST
- Upper left corner
- NE or NORTHEAST
- Upper right corner
- SW or SOUTHWEST
- Lower left corner
- SE or SOUTHEAST
- Lower right corner
Example
hwi OpenStack
if {[catch {
hwi GetActiveClientHandle client_handle
hwi GetSessionHandle session_handle
client_handle GetImagePlaneCtrlHandle ipc_handle
set ipid1 [ipc_handle AddImagePlane Logo1]
ipc_handle GetImagePlaneHandle imageplane_handle $ipid1
imageplane_handle SetFileName g:/samples2/VideoOverlay/Altair_logo.jpg
imageplane_handle SetMode background
imageplane_handle SetCrop 0 0 0.9995 0.995
imageplane_handle SetUserTransform "0.5 0.5 0 0"
imageplane_handle SetPosition "NW"
imageplane_handle SetFilterType ColorAlpha;
imageplane_handle SetFilterMode equal;
imageplane_handle SetColorAlphaTarget "255 255 255"
imageplane_handle SetColorAlphaTolerance 18
imageplane_handle SetMipMapMode Linear1
client_handle Draw
} result]} {
global errorInfo;
puts stderr $result;
puts "[session_handle GetError]";
puts stderr "*** Tcl TRACE ***";
puts stderr $errorInfo;
} else {
puts "No errors.";
puts "Warnings: ";
puts " [session_handle GetError]";
}
hwi CloseStack
Errors
Returns HW_InvalidHandle if the image plane handle is invalid, or HW_InvalidArgs if the position is incorrectly specified.