FBColorAndAlpha Class Reference

FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha FBColorAndAlpha
Inheritance diagram for FBColorAndAlpha:
Inheritance graph
[legend]

List of all members.


Detailed Description

FBColorAndAlpha class.

Color and alpha vector.

This class creates a list like object, which can be modified using the list protocol method. But unlike lists, its length is fixed: it always contain 4 floating point values. Thus it does not support the any list methods that would affect its length. The values within can be changed, usually via the bracket operator.

    # Supported list protocol methods:
    color = FBColorAndAlpha()
    len(color)
    print color[0]
        color[0] = 1.0
Warning:
Slicing is not supported by this object.

Public Member Functions

  FBColorAndAlpha ()
  Constructor.
  FBColorAndAlpha (FBColor pColor)
  Constructor.
  FBColorAndAlpha (float pR, float pG, float pB, float pAlpha)
  Constructor.
  FBColorAndAlpha (tuple< float, float, float, float >)
  Constructor.
int  __len__ ()
  Returns the number of elements.
float  __getitem__ (int pIndex)
  Returns the ith component Corresponds to python: print color[1].
  __setitem__ (int pIndex, float pComponentValue)
  Sets the ith components Corresponds to python: color[1] = 0.5.
  FBColorAndAlpha ()
  Constructor.
  FBColorAndAlpha (float pValue)
  Constructor from array.
  FBColorAndAlpha (float pRed, float pGreen, float pBlue, float pAlpha=1.0)
  Constructor.
  FBColorAndAlpha (FBColor pValue)
  Constructor from FBColor.
  FBColorAndAlpha (FBColorAndAlpha pVector)
  Copy Constructor.

Constructor & Destructor Documentation

FBColorAndAlpha (  ) 

Constructor.

Default constructor, all values within are set to 0.0, except for the Alpha value which is set to 1.0.

FBColorAndAlpha ( FBColor  pColor  ) 

Constructor.

Copy constructor. Copy values from another instance.

FBColorAndAlpha ( float  pR,
float  pG,
float  pB,
float  pAlpha  
)

Constructor.

Explicitely construct a vector by specifying its RGBA values. Should the Alpha value not be relevant, just set it to 1.0.

FBColorAndAlpha ( tuple< float, float, float, float  ) 

Constructor.

A vector can be built from any python object with supports the tuple interface and is of a lenght of 4.

FBColorAndAlpha (  ) 

Constructor.

FBColorAndAlpha ( float  pValue  ) 

Constructor from array.

Parameters:
pValue  Array to take values from.

FBColorAndAlpha ( float  pRed,
float  pGreen,
float  pBlue,
float  pAlpha = 1.0  
)

Constructor.

Parameters:
pRed  Red component.
pGreen  Green component.
pBlue  Blue component.
pAlpha  Alpha component(default=1.0).

FBColorAndAlpha ( FBColor  pValue  ) 

Constructor from FBColor.

Parameters:
pValue  FBColor to take values from.

FBColorAndAlpha ( FBColorAndAlpha  pVector  ) 

Copy Constructor.


Member Function Documentation

int __len__ (  ) 

Returns the number of elements.

Corresponds to python: len(object)

float __getitem__ ( int  pIndex  ) 

Returns the ith component Corresponds to python: print color[1].

Parameters:
pIndex  Index of the components to get (0:Red, 1:Green, 2:Blue)
Returns:
Color component value.

__setitem__ ( int  pIndex,
float  pComponentValue  
)

Sets the ith components Corresponds to python: color[1] = 0.5.

Parameters:
pIndex  Index of the components to set (0:Red, 1:Green, 2:Blue)
pComponentValue  Value of component to set

Generated on Tue Feb 9 19:34:01 2010 for Python Reference Guide by  doxygen 1.5.3