\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.7 - IO Streams
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Color Class Reference

#include <CGAL/IO/Color.h>

Definition

An object of the class Color is a color available for drawing operations in many CGAL output streams.

Each color is defined by a triple of unsigned chars (r,g,b) with 0 \(\le\) r,g,b \( \le \) 255, the so-called rgb-value of the color.

See also
CGAL::Geomview_stream

Creation

 Color ()
 creates a color with rgb-value (0,0,0), i.e. black. More...
 
 Color (unsigned char red, unsigned char green, unsigned char blue)
 creates a color with rgb-value (red,green,blue). More...
 

Operations

bool operator== (const Color &q) const
 Test for equality: Two colors are equal, iff their rgb-values are equal. More...
 
bool operator!= (const Color &q) const
 Test for inequality. More...
 
unsigned char red () const
 returns the red component of c. More...
 
unsigned char green () const
 returns the green component of c. More...
 
unsigned char blue () const
 returns the blue component of c. More...
 

Constants

The following constants are predefined:

const Color BLACK = Color(0, 0, 0)
 Black. More...
 
const Color WHITE = Color(255, 255, 255)
 White. More...
 
const Color RED = Color(255, 0, 0)
 Red. More...
 
const Color GREEN = Color(0, 255, 0)
 Green. More...
 
const Color BLUE = Color(0, 0, 255)
 Blue. More...
 
const Color VIOLET = Color(255, 0, 255)
 Violet. More...
 
const Color ORANGE = Color(255, 170, 0)
 Orange. More...
 

Constructor & Destructor Documentation

CGAL::Color::Color ( )

creates a color with rgb-value (0,0,0), i.e. black.

CGAL::Color::Color ( unsigned char  red,
unsigned char  green,
unsigned char  blue 
)

creates a color with rgb-value (red,green,blue).

Member Function Documentation

unsigned char CGAL::Color::blue ( ) const

returns the blue component of c.

unsigned char CGAL::Color::green ( ) const

returns the green component of c.

bool CGAL::Color::operator!= ( const Color q) const

Test for inequality.

bool CGAL::Color::operator== ( const Color q) const

Test for equality: Two colors are equal, iff their rgb-values are equal.

unsigned char CGAL::Color::red ( ) const

returns the red component of c.

Member Data Documentation

const Color CGAL::Color::BLACK = Color(0, 0, 0)

Black.

const Color CGAL::Color::BLUE = Color(0, 0, 255)

Blue.

const Color CGAL::Color::GREEN = Color(0, 255, 0)

Green.

const Color CGAL::Color::ORANGE = Color(255, 170, 0)

Orange.

const Color CGAL::Color::RED = Color(255, 0, 0)

Red.

const Color CGAL::Color::VIOLET = Color(255, 0, 255)

Violet.

const Color CGAL::Color::WHITE = Color(255, 255, 255)

White.