Error getting tags :
error 404Error getting tags :
error 404 windowShape | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Expander triangle

set the windowShape of stack to {imageID | 0}

Platform Support
MacOS,Mac OS X,Windows,Linux
None required
Specifies an image whose mask is used as the shape of the window.

set the windowShape of this stack to 974

Additional Comments
Expander triangle

Use the windowShape property to display a special-purpose window shape.


The windowShape of a stack is the ID of an image whose mask will be used as the window shape. Revolution looks for the specified image first in the current stack, then in other open stacks.

By default, the windowShape property of newly created stacks is set to zero.


If the image has a 1-bit transparency mask, the shape of this mask is used to clip the window: the mask is superimposed on the window, and any pixels that fall outside the mask are not displayed. For example, if you set a stack's windowShape to an image whose mask is a rectangle with rounded corners, the window is shown with rounded corners, and the parts of the stack in the corners are hidden.

If the image has a full alpha-mask and the running platform supports the feature (currently Windows 2000 and later, and MacOS X) then the alpha-mask of the window will be set to that of the image. This will result in the transparency of each pixel in the window being determined by the corresponding pixel in the alpha-mask of the image. Any pixel more transparent than a system-specific threshold value will be treated as fully transparent with regards to mouse-clicks and other events.

For 1-bit masks, the window needs to be re-created whenever the windowShape property is set making it unsuitable for animation. However, alpha-masked windows suffer no such limitation and it is possible to set the windowShape property successively to such images without any flicker.

Important! The border and title bar of a stack are not shown if the stack's windowShape is set. This means you will need to provide methods of dragging and closing the window if you want the user to be able to do these tasks.

To revert to the normal window shape, set the windowShape to zero.

Changes to Revolution:

The ability to use images with full (> 1-bit) alpha masks was introduced in version 2.6.

User Comments
Expander triangle
User thumbnail
Trevor DeVore
Mar 11, 2010
A note on the system specific thresholds are so that mouseclicks pass through would be nice.