Livecode Wiki
Advertisement

Specifies one of the transfer modes that can be used with the ink property.Syntax:

srcAnd

Examples:

set the ink of graphic "Outline" to srcAnd

Use the srcAnd keyword to make the light-colored parts of an object transparent.

The ink property determines how an object's colors combine with the colors of the pixels underneath the object(glossary) to determine how the object's color is displayed.

When the srcAnd transfer mode is used, LiveCode performs a bitAnd operation on each component of the object(glossary) color with the corresponding component of the color under the object(glossary).

object component bitAnd background component

The effect is that the lighter an object is, the more transparent it is. White parts of an object are completely transparent, and black parts are completely opaque.

For example, suppose an object's color is 45,0,255, and the color of the pixels under the object is 20,45,100. If the srcAnd transfer mode is used, the object's displayed color is 4,0,100 (the decimal equivalent).

The srcAnd mode can be used only on Unix and Windows systems. On Mac OS systems, objects whose ink property is set to this mode appear as though their ink were set to noOp.

See also: bitAnd (operator),ink (property),pixels (property),

Advertisement