MP 1
Image Manipulation I
RGBAPixel Class Reference

Represents a single pixel in an image. More...

#include "rgbapixel.h"

+ Collaboration diagram for RGBAPixel:

Public Member Functions

 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...
 

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...
 

Detailed Description

Represents a single pixel in an image.

Constructor & Destructor Documentation

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.

Parameters
redRed component for the new pixel.
greenGreen component for the new pixel.
blueBlue component for the new pixel.

Member Data Documentation

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.


The documentation for this class was generated from the following files: