The Agent Tool  1.01
An Agent Based Graphic Sound Synthesis Environment
Public Member Functions | Public Attributes
RGBA Class Reference

RGBA represents a pixel of data containing Red, Green, Blue and Alpha components. More...

#include <RGBA.hpp>

List of all members.

Public Member Functions

RGBA new () RGBA.new(int r
 A default constructor will provide you with an RGBA with its attributes set to 0.
RGBA new (int r, int g, int b)
 Allows the construction without providing an alpha component.
int r ()
int g ()
int b ()
int a ()
int mean ()
RGBA operator+ (int r)
 Allows the scalar addition of an RGBA affecting all of its components.
RGBA operator+ (RGBA r)
 Allows addition of two RGBA's.
RGBA operator- (int r)
 Allows the scalar subtraction from an RGBA.
RGBA operator- (RGBA r)
 Allows subtraction of one RGBA from another.
RGBA operator* (float r)
 Allows the scalar multiplication of an RGBA.
RGBA operator* (RGBA r)
 Allows multiplication of one RGBA and another.
RGBA operator* (float r)
 Allows the division of an RGBA by a scalar.
RGBA operator/ (RGBA r)
 Allows division of one RGBA by another.

Public Attributes

RGBA int g
RGBA int int b
RGBA int int int a

Detailed Description

RGBA represents a pixel of data containing Red, Green, Blue and Alpha components.

Colour attributes in The Agent Tool are represented as integer values between 0 and 255. To create a RGBA in Lua you must call RGBA.new() to create an instance of this object. To execute on of the classes functions you must utilize a colon followed by the name ot the function. For example colour:r() You can consequently set attributes via this mechanism. colour:r() = 255


Member Function Documentation

int RGBA::a ( )
Returns:
The alpha component
int RGBA::b ( )
Returns:
The blue component
int RGBA::g ( )
Returns:
The green component
int RGBA::mean ( )
Returns:
The average/mean of the Red, Green and Blue components
RGBA RGBA::new ( ) [new]

A default constructor will provide you with an RGBA with its attributes set to 0.

Allows the construction with provided attributes

RGBA RGBA::operator* ( float  r)

Allows the scalar multiplication of an RGBA.

Returns:
A new RGBA reflecting the scalar multiplication
RGBA RGBA::operator* ( RGBA  r)

Allows multiplication of one RGBA and another.

Returns:
A new RGBA reflecting the multiplication
RGBA RGBA::operator* ( float  r)

Allows the division of an RGBA by a scalar.

Returns:
A new RGBA reflecting the division
RGBA RGBA::operator+ ( int  r)

Allows the scalar addition of an RGBA affecting all of its components.

Returns:
A new RGBA reflecting the scalar summation
RGBA RGBA::operator+ ( RGBA  r)

Allows addition of two RGBA's.

Returns:
A new RGBA reflecting the summation of two RGBA's
RGBA RGBA::operator- ( int  r)

Allows the scalar subtraction from an RGBA.

Returns:
A new RGBA reflecting the scalar subtraction
RGBA RGBA::operator- ( RGBA  r)

Allows subtraction of one RGBA from another.

Returns:
A new RGBA reflecting the subtraction
RGBA RGBA::operator/ ( RGBA  r)

Allows division of one RGBA by another.

Returns:
A new RGBA reflecting the division
int RGBA::r ( )
Returns:
The red component

The documentation for this class was generated from the following file:
 All Classes Files Functions