Package slum :: Module datatypes :: Class color
[hide private]
[frames] | no frames]

Class color

source code

Known Subclasses:

slum datatype to hold color data. The "internal" variable is a list that defines all the possible keys for this datatype. For color, they are [r,g,b], but they can be overriden by derivated classes, like vector, which defines it as x,y,z. This datatype is defined to simplify a shader implementation, specially when defining slum shader parameters.

Instance Methods [hide private]
 
__init__(self, data=0, *args) source code
 
checkKey(self, key) source code
 
checkValue(self, value) source code
 
__getitem__(self, key) source code
 
__setitem__(self, key, value) source code
 
__repr__(self) source code
 
__len__(self) source code
 
__delitem__(self, key) source code
 
__add__(self, x) source code
 
__mul__(self, x) source code
 
__div__(self, x) source code
 
__sub__(self, x) source code
 
__neg__(self) source code
Class Variables [hide private]
  internal = ['r', 'g', 'b']