IBM TJ Watson Research

IBMMaterialKey

IBMMaterialKey.mp4

Description

Three flower images; each flower is 150x150 pixels. Each flower has been created in an image such that the background of the image is a single color; Green (0.0 1.0 0.0), Magenta (1.0 0.0 1.0) and Blue (0.0 0.0 1.0). The 'Green' one is the upper left, the 'Magenta' lower middle, and 'Blue' upper right.

The toggle buttons, when clicked, each act on one of the isKeyed fields; as indicated by the color of the button. For example the Green toggle button will toggle the isKeyed field of the MaterialKey for the 'Green' flower, in the upper left, between true and false, etc. See IBMFlipFlop for the technique used for the toggle.

For the Bitmap geometry of each flower there is a TouchSensor whose isOver field is routed to the filled field of the small circle indicator of the same color at the top of the screen. When the isKeyed field is true only the visible part of the flower should be sensed (Bitmap geometry is defined by non-transparent pixels). When isKeyed is false the entire 150x150 shape will be sensed. Ie when isKeyed is toggled the key color is made transparent or not and hence the geometry is altered with it.

Screenshot

Snapshot with all isKeyed fields true, as at startup

Snapshot taken after all isKeyed fields set to false; and pointer over 'green' flower.



Back to main index