Top  Previous  Next

This array of objects provides functionality of user-defined controls. A user-defined control is displayed as a horizontal dialog containing a slider and text box with spin buttons. By moving the slider or clicking the spin buttons the user modifies the control's Value, which can be accessed anywhere in the script. Unlike the Input or Dialog statements that pause the script and wait for the user's input, Control objects, after being instantiated, function independently of the script allowing the user to control desired script parameters in real time. ImageWarp support up to 12 simultaneously open user-defined controls.

A floating value associated with the control and displayed in the text box. Can be modified interactively by moving the control's slider, clicking the spin buttons or typing a new value in the text box.  
setTitle ( string Title )  
Sets the title to be displayed in the caption of the control.  
Title – a string specifying the title of the control.  
setRange ( floating Min, floating Max )  
Sets the allowed range for the Value of the control.  
Min, Max – floating arguments specifying the minimum and maximum limits for Value.  
setPos ( integer X0, integer Y0 )  
Sets the position of the control on screen.  
X0, Y0 – positive integers specifying the coordinates of the top left corner of the control relative to the top left corner of ImageWarp's client area.  
chageSize ( integer Dx, integer Dy )  
Modifies the default size of the control.  
Dx, Dy – integers specifying the offsets to the default width and height of the control respectively. Positive values will increase the size of the corresponding dimensions, negative values will decrease them.  
set ( string Title, integer Min, integer Max, floating Value )  
Sets the title, range and value of the control. See above for the description of parameters.  
done ( )  
Closes the control.  

This set of statements continuously grabs and emphasizes an image using a Control object to adjust the strength of sharpening:  
grabIm  (100)  
emphasize (100, 1, Control(0).value)  
This set of statements uses two Control objects to move the image across the screen: The controls are placed to the specified positions on screen:  
Control(1).set("Horizontal position",0,800,0)  
Control(2).Set("Vertical position",0,600,0)  
setImPos(1,Control(1).value, Control(2).value)