![]() |
The Agent Tool
1.01
An Agent Based Graphic Sound Synthesis Environment
|
RGBA represents a pixel of data containing Red, Green, Blue and Alpha components. More...
#include <RGBA.hpp>
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 |
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
int RGBA::a | ( | ) |
int RGBA::b | ( | ) |
int RGBA::g | ( | ) |
int RGBA::mean | ( | ) |
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 | ) |
RGBA RGBA::operator* | ( | float | r | ) |
RGBA RGBA::operator+ | ( | int | r | ) |
Allows addition of two RGBA's.
RGBA RGBA::operator- | ( | int | r | ) |
int RGBA::r | ( | ) |