poIImagePlane SetMipMapMode
Sets the current mipmap mode for an image plane.
Syntax
Imageplane_handle SetMipMapModemode
Application
HyperView Tcl Modify
Description
Mipmaps are a way to shrink an image while retaining detail, before rending the final image to the display. Some mipmap modes work better than others, depending on the type of image being drawn and how much it is being shrunk. This command sets the current mipmap mode for an image plane.
Inputs
- mode
- The mip map mode. Use GetMipMapModeList to get the possible values. “None” specifies no mipmaps are used. Linear1 and Linear2 are variants of linear pixel interpolation. Nearest1 and Nearest2 are variants of nearest pixel selection.
Example
hwi OpenStack
if {[catch {
::post::GetPostHandle 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 SetFilterType Edge;
imageplane_handle SetFilterMode Sobel;
imageplane_handle SetEdgeColor "255 255 255";
imageplane_handle SetMipMapMode Linear1
puts " Filter Type: [imageplane_handle GetFilterType]";
puts " Filter Mode: [imageplane_handle GetFilterMode]";
puts " Edge Color: [imageplane_handle GetEdgeColor]";
puts " MipMap Mode: [imageplane_handle GetMipMapMode]";
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
Console Output:
Filter Type: Edge
Filter Mode: Sobel
Edge Color: 255 255 255
MipMap Mode: Linear1
No errors.
Warnings:
Errors
Returns HW_InvalidHandle if the image plane handle is invalid.