|
MP 2
Image Manipulation II
|
Represents a single pixel in an image. More...
#include <rgbapixel.h>
Public Member Functions | |
| bool | operator== (RGBAPixel const &other) const |
| Equality operator. More... | |
| bool | operator!= (RGBAPixel const &other) const |
| Inequality operator. More... | |
| bool | operator< (RGBAPixel const &other) const |
| Less than operator. More... | |
| RGBAPixel () | |
| Constructs a default RGBAPixel. More... | |
| RGBAPixel (uint8_t red, uint8_t green, uint8_t blue) | |
| Constructs an opaque RGBAPixel with the given red, green, blue color values. More... | |
| RGBAPixel (uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha) | |
| Constructs an RGBAPixel with the given red, green, blue, and alpha components. More... | |
Public Attributes | |
| uint8_t | red |
| Byte for the red component of the pixel. More... | |
| uint8_t | green |
| Byte for the green component of the pixel. More... | |
| uint8_t | blue |
| Byte for the blue component of the pixel. More... | |
| uint8_t | alpha |
| Byte for the alpha component of the pixel. More... | |
Represents a single pixel in an image.
| RGBAPixel::RGBAPixel | ( | ) |
Constructs a default RGBAPixel.
A default pixel is completely opaque (non-transparent) and white. Opaque implies that the alpha component of the pixel is 255. Lower values are transparent.
| RGBAPixel::RGBAPixel | ( | uint8_t | red, |
| uint8_t | green, | ||
| uint8_t | blue | ||
| ) |
Constructs an opaque RGBAPixel with the given red, green, blue color values.
The alpha component of the pixel constructed should be 255.
| red | Red component for the new pixel. |
| green | Green component for the new pixel. |
| blue | Blue component for the new pixel. |
| RGBAPixel::RGBAPixel | ( | uint8_t | red, |
| uint8_t | green, | ||
| uint8_t | blue, | ||
| uint8_t | alpha | ||
| ) |
Constructs an RGBAPixel with the given red, green, blue, and alpha components.
| red | Red component for the new pixel. |
| green | Green component for the new pixel. |
| blue | Blue component for the new pixel. |
| alpha | Alpha component for the new pixel (controls transparency). |
| bool RGBAPixel::operator== | ( | RGBAPixel const & | other | ) | const |
Equality operator.
| other | Other pixel to check equality with. |
| bool RGBAPixel::operator!= | ( | RGBAPixel const & | other | ) | const |
Inequality operator.
| other | Other pixel to check inequality with. |
| bool RGBAPixel::operator< | ( | RGBAPixel const & | other | ) | const |
Less than operator.
Provided to give some ordering notion to RGBAPixels.
| other | Other pixel to compare with. |
| uint8_t RGBAPixel::red |
Byte for the red component of the pixel.
| uint8_t RGBAPixel::green |
Byte for the green component of the pixel.
| uint8_t RGBAPixel::blue |
Byte for the blue component of the pixel.
| uint8_t RGBAPixel::alpha |
Byte for the alpha component of the pixel.
1.8.9.1