Current Version: 1.0.10
Project Name: csspp
Public Member Functions | Private Attributes | List of all members
csspp::color Class Reference

#include <color.h>

Public Member Functions

void adjust_hue (float hue)
 
void adjust_lightness (float change)
 
void adjust_saturation (float change)
 
rgba_color_t get_color () const
 
void get_color (color_component_t &red, color_component_t &green, color_component_t &blue, color_component_t &alpha) const
 
void get_hsl (color_component_t &hue, color_component_t &saturation, color_component_t &lightness, color_component_t &alpha) const
 
bool is_solid () const
 
bool is_transparent () const
 
void set_color (rgba_color_t const rgba)
 
void set_color (byte_component_t red, byte_component_t green, byte_component_t blue, byte_component_t alpha)
 
void set_color (unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha)
 
void set_color (int red, int green, int blue, int alpha)
 
void set_color (color_component_t red, color_component_t green, color_component_t blue, color_component_t alpha)
 
void set_color (double red, double green, double blue, double alpha)
 
bool set_color (std::string const &name, bool name_only)
 
void set_hsl (color_component_t h, color_component_t s, color_component_t l, color_component_t alpha)
 
std::string to_string () const
 

Private Attributes

color_component_t f_alpha = 1.0
 
color_component_t f_blue = 0.0
 
color_component_t f_green = 0.0
 
color_component_t f_red = 0.0
 

Detailed Description

Definition at line 39 of file color.h.

Member Function Documentation

void csspp::color::adjust_hue ( float  hue)
void csspp::color::adjust_lightness ( float  change)
void csspp::color::adjust_saturation ( float  change)
rgba_color_t csspp::color::get_color ( ) const
void csspp::color::get_color ( color_component_t red,
color_component_t green,
color_component_t blue,
color_component_t alpha 
) const

Definition at line 466 of file color.cpp.

References f_alpha, f_blue, f_green, and f_red.

void csspp::color::get_hsl ( color_component_t hue,
color_component_t saturation,
color_component_t lightness,
color_component_t alpha 
) const
bool csspp::color::is_solid ( ) const

Definition at line 474 of file color.cpp.

References f_alpha.

bool csspp::color::is_transparent ( ) const

Definition at line 479 of file color.cpp.

References f_alpha.

void csspp::color::set_color ( rgba_color_t const  rgba)
void csspp::color::set_color ( byte_component_t  red,
byte_component_t  green,
byte_component_t  blue,
byte_component_t  alpha 
)

Definition at line 225 of file color.cpp.

References f_alpha, f_blue, f_green, and f_red.

void csspp::color::set_color ( unsigned int  red,
unsigned int  green,
unsigned int  blue,
unsigned int  alpha 
)

Definition at line 241 of file color.cpp.

References f_alpha, f_blue, f_green, and f_red.

void csspp::color::set_color ( int  red,
int  green,
int  blue,
int  alpha 
)

Definition at line 233 of file color.cpp.

References f_alpha, f_blue, f_green, and f_red.

void csspp::color::set_color ( color_component_t  red,
color_component_t  green,
color_component_t  blue,
color_component_t  alpha 
)

Definition at line 249 of file color.cpp.

References f_alpha, f_blue, f_green, and f_red.

void csspp::color::set_color ( double  red,
double  green,
double  blue,
double  alpha 
)

Definition at line 257 of file color.cpp.

References f_alpha, f_blue, f_green, and f_red.

bool csspp::color::set_color ( std::string const &  name,
bool  name_only 
)
void csspp::color::set_hsl ( color_component_t  h,
color_component_t  s,
color_component_t  l,
color_component_t  alpha 
)
std::string csspp::color::to_string ( ) const

Definition at line 484 of file color.cpp.

References csspp::decimal_number_to_string(), f_alpha, and get_color().

Referenced by csspp::node::to_string().

Member Data Documentation

color_component_t csspp::color::f_alpha = 1.0
private

Definition at line 66 of file color.h.

Referenced by get_color(), get_hsl(), is_solid(), is_transparent(), set_color(), set_hsl(), and to_string().

color_component_t csspp::color::f_blue = 0.0
private

Definition at line 65 of file color.h.

Referenced by get_color(), get_hsl(), set_color(), and set_hsl().

color_component_t csspp::color::f_green = 0.0
private

Definition at line 64 of file color.h.

Referenced by get_color(), get_hsl(), set_color(), and set_hsl().

color_component_t csspp::color::f_red = 0.0
private

Definition at line 63 of file color.h.

Referenced by get_color(), get_hsl(), set_color(), and set_hsl().


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

Documentation of CSS Preprocessor.

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.