scifir-units 2.0.0
scifir-units is a library of units of measurement, angles, coordinates, fields, and related data, all lightweight, that help in the development of scientific software and scientific machines
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
scifir::color Class Reference

#include <color.hpp>

Public Member Functions

 color ()
 
 color (int, int, int, int=255)
 
const intget_red () const
 
const intget_green () const
 
const intget_blue () const
 
const intget_alpha () const
 
bool is_opaque () const
 
bool is_transparent () const
 
bool is_full_transparent () const
 

Private Attributes

int red
 
int blue
 
int green
 
int alpha
 

Detailed Description

Definition at line 11 of file color.hpp.

Constructor & Destructor Documentation

◆ color() [1/2]

scifir::color::color ( )

Definition at line 7 of file color.cpp.

7 : red(),blue(),green(),alpha()
8 {
9 }

◆ color() [2/2]

scifir::color::color ( int  new_red,
int  new_green,
int  new_blue,
int  new_alpha = 255 
)

Definition at line 11 of file color.cpp.

11 : red(new_red),blue(new_blue),green(new_green),alpha(new_alpha)
12 {
13 }

Member Function Documentation

◆ get_alpha()

const int & scifir::color::get_alpha ( ) const
inline

Definition at line 32 of file color.hpp.

33 {
34 return alpha;
35 }

◆ get_blue()

const int & scifir::color::get_blue ( ) const
inline

Definition at line 27 of file color.hpp.

28 {
29 return blue;
30 }

◆ get_green()

const int & scifir::color::get_green ( ) const
inline

Definition at line 22 of file color.hpp.

23 {
24 return green;
25 }

◆ get_red()

const int & scifir::color::get_red ( ) const
inline

Definition at line 17 of file color.hpp.

18 {
19 return red;
20 }

◆ is_full_transparent()

bool scifir::color::is_full_transparent ( ) const
inline

Definition at line 47 of file color.hpp.

48 {
49 return (alpha == 0);
50 }

◆ is_opaque()

bool scifir::color::is_opaque ( ) const
inline

Definition at line 37 of file color.hpp.

38 {
39 return (alpha == 255);
40 }

◆ is_transparent()

bool scifir::color::is_transparent ( ) const
inline

Definition at line 42 of file color.hpp.

43 {
44 return (alpha < 255);
45 }

Member Data Documentation

◆ alpha

int scifir::color::alpha
private

Definition at line 56 of file color.hpp.

◆ blue

int scifir::color::blue
private

Definition at line 54 of file color.hpp.

◆ green

int scifir::color::green
private

Definition at line 55 of file color.hpp.

◆ red

int scifir::color::red
private

Definition at line 53 of file color.hpp.


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