Fade2D Documentation pages v2.16.8
Delaunay Features
GEOM_FADE2D::Color Class Reference

Color for visualization. More...

#include <Color.h>

Public Member Functions

 Color ()
 
 Color (Colorname c, float width=0.001, bool bFill=false)
 
 Color (double r, double g, double b, double width, bool bFill=false)
 
bool operator!= (const Color &other) const
 
bool operator< (const Color &other) const
 
bool operator== (const Color &other) const
 

Static Public Member Functions

static Colorname getNextColorName ()
 Get the next available predefined color name. More...
 

Public Attributes

float b
 Blue component.
 
bool bFill
 Fill the shape or not.
 
float g
 Green component.
 
float r
 Red component.
 
float width
 Line width.
 

Friends

std::ostream & operator<< (std::ostream &stream, const Color &c)
 Stream output for color information. More...
 

Detailed Description

This class represents a color for Postscript and PDF visualization used together with Visualizer2.

See also
Visualizer2

Constructor & Destructor Documentation

◆ Color() [1/3]

GEOM_FADE2D::Color::Color ( double  r,
double  g,
double  b,
double  width,
bool  bFill = false 
)
Parameters
[in]r,g,bRed, green, blue components of the color (0.0 to 1.0).
widthLine width for visualization (default: 0.001).
bFillIf true, objects with an area (e.g., Triangle2, Circle2, VoroCell2) will be filled with the specified color while x-marks will be placed at the endpoints of line segments. If false, the objects will not be filled, and line segments will have x-marks at their endpoints.

◆ Color() [2/3]

GEOM_FADE2D::Color::Color ( Colorname  c,
float  width = 0.001,
bool  bFill = false 
)
explicit
Parameters
[in]cPredefined color name
widthLine width for visualization (default: 0.001).
bFillIf true, objects with an area (e.g., Triangle2, Circle2, VoroCell2) will be filled with the specified color while x-marks will be placed at the endpoints of line segments. If false, the objects will not be filled, and line segments will have x-marks at their endpoints.

◆ Color() [3/3]

GEOM_FADE2D::Color::Color ( )

Default constructor for black color (no fill).

Member Function Documentation

◆ getNextColorName()

static Colorname GEOM_FADE2D::Color::getNextColorName ( )
static

This function returns the next color name in the enumeration.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
const Color c 
)
friend

This function outputs the color information (red, green, blue, linewidth, and fill status) of a Color object to the provided output stream.

Parameters
[in]streamThe output stream to which the color information will be printed.
[in]cThe Color object whose details are to be printed.
Returns
The output stream with the color information appended.

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