#include <PixelRGB.h>
Public Methods | |
| PixelRGB () | |
| The default constructor. More... | |
| PixelRGB (int red, int green, int blue) | |
| Create a pixel with the specified values. More... | |
| PixelRGB& | operator= (PixelRGB &p) |
| Overloaded assignment operator. More... | |
| int& | operator[] (int i) |
| Overloaded array operator. More... | |
| operator int * () | |
| Overloaded Cast operator. More... | |
| bool | operator== (PixelRGB &p) |
| Overloaded equality operator. More... | |
| bool | operator!= (PixelRGB &p) |
| Overloaded test for none equality. More... | |
| PixelRGB& | operator+= (PixelRGB &p) |
| Overloaded addition operator. More... | |
| PixelRGB& | operator-= (PixelRGB &p) |
| Overloaded subtraction(difference) operator. More... | |
| PixelRGB& | operator *= (double k) |
| Overloaded multiplication operator. More... | |
Protected Attributes | |
| int | pixel [3] |
| The pixels data as an array of ints. | |
The pixel is stored as an array of three ints which can be access as seperate colour fields using the FieldSelector enum in the ImageRGB class.
Definition at line 29 of file PixelRGB.h.
|
|
The default constructor. This zero's the values of the red, green and blue colour fields. Definition at line 66 of file PixelRGB.h. |
|
|
Create a pixel with the specified values. This constructor creates a new pixel with the red, green and blue values specified as arguments. Definition at line 76 of file PixelRGB.h. |
|
|
Overloaded multiplication operator. Multiply the fields of this pixel by a scalar value.
Definition at line 219 of file PixelRGB.h. |
|
|
Overloaded Cast operator. This operator allows the pixel to be easily cast to an int pointer. Since the pixel data is just an array of ints, this operator allows the pixel to be treated as such. Definition at line 127 of file PixelRGB.h. |
|
|
Overloaded test for none equality. This tests whether the pixel and the one specified are not equal i.e. they have at least one field in which their values differ.
Definition at line 164 of file PixelRGB.h. |
|
|
Overloaded addition operator. Add the values of the pixel specified to the fields of this pixel. Note NO checking that values are within range 0-255 is done.
Definition at line 182 of file PixelRGB.h. |
|
|
Overloaded subtraction(difference) operator. Assign the difference of the values of the pixel specified and this pixel to the fields of this pixel.
Definition at line 201 of file PixelRGB.h. |
|
|
Overloaded assignment operator. Assign the values of the pixel specified to the fields of this pixel.
Definition at line 94 of file PixelRGB.h. |
|
|
Overloaded equality operator. This tests whether this pixel and the one specified are equal i.e. have the same values for all fields.
Definition at line 144 of file PixelRGB.h. |
|
|
Overloaded array operator. This operator allows easy access to the data of the pixel as if you were refering to the data directly.
Definition at line 114 of file PixelRGB.h. |
|
|
Outputs a pixel to the output stream. This overlaoded operator inserts a representation of the pixel into the output stream (os) in the form '(r,g,b)' where r, g, b are the red, green and blue fields respectively.
Definition at line 50 of file PixelRGB.h. |
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001