Name: notSrcAndReverse

Type: keyword

Syntax: notSrcAndReverse

Summary: Specifies one of the <transfer mode|transfer modes> that can be used with the <ink> <property>.

Introduced: 1.0

OS: windows,linux,ios,android

Platforms: desktop,server,web,mobile

Example:
set the ink of card button 1 to notSrcAnd

The result: Each component of the resulting color is equal to the result of this expression:.

Description:
Use the <notSrcAndReverse> <keyword> to invert the colors under an object and make the light parts opaque.

The <ink> <property> determines how an <object|object's> colors combine with the colors of the <pixels> underneath the <object> to determine how the <object|object's> color (also called the source color) is displayed.

The <notSrcAndReverse> <transfer mode> performs the following steps to compute the color of each <pixel> :

1. Each component of the object's color--the number indicating the amount of red, green, or blue--is changed to its inverse. (If the color is expressed as three integers between zero and 255--one for each of red, green, and blue--then the inverse of each component is equal to 255 minus the component's value.)

2. Each component of the color underneath the object is changed to its inverse.

3. LiveCode performs a bitAnd <operation> on each component of the inverted object color with the corresponding component of the inverted color under the <object>.

  (255 - object component) bitAnd (255 - background component)

The effect is that the color of the object is reversed, and the darker an object is, the more transparent it is. Black parts of an object are completely transparent, and white parts are completely opaque.

For example, suppose an object's color is 120,0,255, and the color of the pixels under the object is 50,20,240. If the <notSrcAndReverse> <transfer mode> is used, the <object|object's> displayed color is 135,235,0.

The <notSrcAndReverse> mode can be used only on <Unix> and <Windows|Windows systems>. On <Mac OS|Mac OS systems>, <object|objects> whose <ink> <property> is set to this mode appear as though their <ink> were set to <srcCopy>.

References: srcCopy (keyword), notSrcCopy (keyword), ink (property), pixels (property), object (object), property (glossary), pixel (glossary), operation (glossary), Windows (glossary), transfer mode (glossary), Mac OS (glossary), keyword (glossary), Unix (glossary)

Tags: ui
