Module gwy :: Class LayerMask
[hide private]
[frames] | no frames]

Class LayerMask

source code

Instance Methods [hide private]
 
__init__()
Creates a new mask layer.
source code
 
set_color_key(prefix)
Sets the container key of colour components of a mask layer.
source code
 
get_color_key()
Gets prefix identifying color components.
source code
 
get_color()
Returns the color used by a mask layer.
source code
Method Details [hide private]

__init__()
(Constructor)

source code 

Creates a new mask layer.

By default, is uses a transparent color (thus not displaying anything).

Returns:
The newly created layer. (PixmapLayer)

set_color_key(prefix)

source code 

Sets the container key of colour components of a mask layer.

Parameters:
  • prefix - Prefix of keys identifying mask color components, "/red", "/green", "/blue", and "/alpha" is appended to it to get the individual keys. (string)

get_color_key()

source code 

Gets prefix identifying color components.

Returns:
The prefix, or None if it isn't set. (string)

get_color()

source code 

Returns the color used by a mask layer.

Returns:
The color as RGBA. (RGBA)