libpgplotxx.a (C++ interface to PGPLOT)

◆ sethls()

Tlinestyle & pgplot::Tlinestyle::sethls ( const Tcol hls)

set color representation with hls values

set hls values

Definition at line 85 of file xpgplotxx.cc.

References pgplot::Tcol::b, Fhls, Frgb, pgplot::Tcol::g, pgplot::Tcol::h, pgplot::Tcol::l, pgplot::helpers::limit(), Mcol, Mflags, pgplot::Tcol::r, and pgplot::Tcol::s.

86  {
87  Mflags &= (~Frgb);
88  Mflags |= Fhls;
89  Mcol.r = helpers::limit(hls.h, 0., 360.);
90  Mcol.g = helpers::limit(hls.l, 0., 1.);
91  Mcol.b = helpers::limit(hls.s, 0., 1.);
92  }
int Mflags
flags
Definition: xpgplotxx.h:129
Tcol Mcol
rgb or hls colour setting
Definition: xpgplotxx.h:131
float r
Definition: structs.h:222
float g
Definition: structs.h:224
float b
Definition: structs.h:226
T limit(const T &v, const T2 &min, const T2 &max)
limit a value to min and max
Definition: xpgplotxx.cc:58
Here is the call graph for this function: