Laxkit  0.0.7.1
misc.h
1 //
2 //
3 // The Laxkit, a windowing toolkit
4 // Please consult http://laxkit.sourceforge.net about where to send any
5 // correspondence about this software.
6 //
7 // This library is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU Library General Public
9 // License as published by the Free Software Foundation; either
10 // version 2 of the License, or (at your option) any later version.
11 //
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // Library General Public License for more details.
16 //
17 // You should have received a copy of the GNU Library General Public
18 // License along with this library; if not, write to the Free Software
19 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 //
21 // Copyright (C) 2004-2010,2012-2013 by Tom Lechner
22 //
23 #ifndef _LAX_MISC_H
24 #define _LAX_MISC_H
25 
26 namespace Laxkit {
27 
28 unsigned long getUniqueNumber();
29 char *make_id(const char *base);
30 
31 
32 //----------------------------- Simple, non color managed color conversions ----------------------------
33 void simple_rgb_to_cmyk(int r,int g,int b,int *c,int *m,int *y,int *k,int max);
34 void simple_rgb_to_cmyk(int *rgb, int *cmyk, int max);
35 void simple_rgb_to_cmyk(double r,double g,double b,double *c,double *m,double *y,double *k);
36 void simple_rgb_to_cmyk(double *rgb, double *cmyk);
37 
38 void simple_cmyk_to_rgb(int c,int m,int y,int k,int *r,int *g,int *b,int max);
39 void simple_cmyk_to_rgb(int *cmyk, int *rgb, int max);
40 void simple_cmyk_to_rgb(double c,double m,double y,double k,double *r,double *g,double *b);
41 void simple_cmyk_to_rgb(double *cmyk, double *rgb);
42 
43 
44 void simple_hsv_to_rgb(int h,int s,int v,int *r,int *g,int *b,int max);
45 void simple_hsv_to_rgb(int *hsv, int *rgb, int max);
46 void simple_hsv_to_rgb(double h,double s,double v,double *r,double *g,double *b);
47 void simple_hsv_to_rgb(double *hsv, double *rgb);
48 
49 void simple_rgb_to_hsv(int r,int g,int b,int *h,int *s,int *v,int max);
50 void simple_rgb_to_hsv(int *rgb, int *hsv, int max);
51 void simple_rgb_to_hsv(double r,double g,double b,double *h,double *s,double *v);
52 void simple_rgb_to_hsv(double *rgb, double *hsv);
53 
54 
55 } //namespace Laxkit
56 
57 #endif
58 

Mon Feb 17 2014 11:52:57, Laxkit