Name

winop

winop operation [[window] [arg arg...] ]

Perform assorted window operations on Tk windows using Xlib functions. Also, some miscellaneous image operations are defined in preparation for a new image type in a later BLT release. The following operations are defined:

winop convolve srcPhoto destPhoto filter

Set the photo image destPhoto to the result of the convolution of photo image srcPhoto with the given filter. Filter is a list of N×N real numbers representing the square matrix for the mean filter.

winop lower [window...]

Lower given windows to the bottom of window stack.

winop map [window...]

Map given windows to scr een (ignored if already mapped).

winop move window x y

Move the window to the screen coordinates specified by x and y.

winop raise [window...]

Raise given window s to top of window stack.

winop readjpeg filename photoName

Read the JPEG image data from the file filename into the photo image photoName, which must already exist. Only available if BLT was compiled with JPEG image support.

winop resample srcPhoto destPhoto [horzFilter[vertFilter] ]

Set the photo image destPhoto to the result of resampling the photo image srcPhoto with the given filters. Valid values for horzFilter and vertFilter are bell, box, bessel, bspline, catrom, default, dummy, gaussian, lanczos3, mitchell, none, sinc, and triangle.

winop snap window photoName [width height]

Take a snapshot of the window and store the contents in photo image photoName. The window must be totally visible and photoName must already exist. If width and height are specified, they constrain the size of the snapshot.

winop subsample srcPhoto destPhoto x y width height [horzFilter[vertFilter] ]

Set the photo image destPhoto to the result of subsampling the photo image srcPhoto with the given filters. The region of the source image to subsample is given by x y width height. Valid values for horzFilter and vertFilter are the same as for the resample operation.

winop unmap [window...]

Unmap given windows from the screen.

winop warpto [window]

Move the mouse pointer to window. Window can also be specified in the form @x,y to indicate @x,y to indicate specific coordinates. If window is omitted, Returns the current x- and y-coordinates of the mouse pointer as a two-element list.

Example

set img [image create photo]
    winop snap .h $img
    winop warpto @100, 100
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset