currentMaskColor

currentMaskColor(): Integer;

The currentMaskColor method of the JadeMask class returns the color of the pixel in the mask picture corresponding to the last position of the mouse when it was over the control. This method would normally be called only during one of the mouse events for the mask control.

This method is relevant only when the style property of the JadeMask control is set to Style_Mask_Color (3). If the style is not Style_Mask_Color, the returned value is undefined.

An example of the use of this is a control that displays a map of a road network. The picture mask is built with the roads drawn in different colors and the rest of the map drawn as some other color (for example, white).

When the user moves the mouse over the control, the mouseMove event calls the currentMaskColor method. If the returned value is not white, the color is used to index the name of the road and this is displayed to the user in bubble help.

When using this style, the roll over (pictureRollOver) and roll under (pictureRollUnder) features do not apply.