lab_inheritance
Insidious Inheritance
 All Classes Namespaces Files Functions Variables
cs225::HSLAPixel Class Reference

#include <HSLAPixel.h>

Public Member Functions

 HSLAPixel ()
 Constructs a default HSLAPixel. More...
 
 HSLAPixel (double hue, double saturation, double luminance)
 Constructs an opaque HSLAPixel with the given hue, saturation, and luminance values. More...
 
 HSLAPixel (double hue, double saturation, double luminance, double alpha)
 Constructs an opaque HSLAPixel with the given hue, saturation, luminance, and alpha values. More...
 
bool operator== (HSLAPixel const &other) const
 
bool operator!= (HSLAPixel const &other) const
 
bool operator< (HSLAPixel const &other) const
 

Public Attributes

double h
 Double for the hue of the pixel, in degrees [0, 360). More...
 
double s
 Double for the saturation of the pixel, [0, 1]. More...
 
double l
 Double for the luminance of the pixel, [0, 1]. More...
 
double a
 Double for the alpha of the pixel, [0, 1]. More...
 

Constructor & Destructor Documentation

cs225::HSLAPixel::HSLAPixel ( )

Constructs a default HSLAPixel.

A default pixel is completely opaque (non-transparent) and white. Opaque implies that the alpha component of the pixel is 1.0. Lower values are transparent.

cs225::HSLAPixel::HSLAPixel ( double  hue,
double  saturation,
double  luminance 
)

Constructs an opaque HSLAPixel with the given hue, saturation, and luminance values.

The alpha component of the pixel constructed should be 1.0.

Parameters
hueHue value for the new pixel, in degrees [0, 360).
saturationSaturation value for the new pixel, [0, 1].
luminanceLuminance value for the new pixel, [0, 1].
cs225::HSLAPixel::HSLAPixel ( double  hue,
double  saturation,
double  luminance,
double  alpha 
)

Constructs an opaque HSLAPixel with the given hue, saturation, luminance, and alpha values.

Parameters
hueHue value for the new pixel, in degrees [0, 360).
saturationSaturation value for the new pixel, [0, 1].
luminanceLuminance value for the new pixel, [0, 1].
alphaAlpha value for the new pixel, [0, 1].

Member Function Documentation

bool cs225::HSLAPixel::operator!= ( HSLAPixel const &  other) const
bool cs225::HSLAPixel::operator< ( HSLAPixel const &  other) const
bool cs225::HSLAPixel::operator== ( HSLAPixel const &  other) const

Member Data Documentation

double cs225::HSLAPixel::a

Double for the alpha of the pixel, [0, 1].

double cs225::HSLAPixel::h

Double for the hue of the pixel, in degrees [0, 360).

double cs225::HSLAPixel::l

Double for the luminance of the pixel, [0, 1].

double cs225::HSLAPixel::s

Double for the saturation of the pixel, [0, 1].


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