MCPcopy Create free account
hub / github.com/FreeFem/FreeFem-sources / DefColorX11

Function DefColorX11

src/Graphics/Xrgraph.cpp:277–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275
276
277static XColor DefColorX11( int k,int nb, bool hsv,bool grey,int nbcolors,float *colors)
278{
279 XColor C;
280 float r,g,b;
281extern void DefColor(float & r, float & g, float & b,
282 int k,int nb, bool hsv,bool grey,int nbcolors,float *colors);
283 DefColor(r,g,b, k,nb,hsv,grey,nbcolors,colors);
284 C.red=65535*r;
285 C.green=65535*g;
286 C.blue=65535*b;
287 C.flags = DoRed | DoGreen | DoBlue;
288 C.pixel=k;
289 // cout << " color : " << k << " " << C.red << " "<< C.green << " " << C.blue << " " << r << endl;
290 return C;
291}
292
293void SetColorTable1(int nb,bool hsv,int nbcolors,float *colors)
294{

Callers 1

SetColorTable1Function · 0.85

Calls 1

DefColorFunction · 0.70

Tested by

no test coverage detected