F:/KPlato/koffice/libs/pigment/KoColorConversions.h

Aller à la documentation de ce fichier.
00001 /*
00002  *  Copyright (c) 2005 Boudewijn Rempt <boud@valdyas.org>
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU Lesser General Public License as published
00006  *  by the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Lesser General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  */
00018 
00019 #ifndef _KIS_CONVERSIONS_H_
00020 #define _KIS_CONVERSIONS_H_
00021 
00022 #include <qglobal.h>
00023 #include <koffice_export.h>
00024 
00029 // 8-bit integer versions. RGBSL are 0-255, H is 0-360.
00030  PIGMENT_EXPORT void rgb_to_hsv(int R, int G, int B, int *H, int *S, int *V);
00031  PIGMENT_EXPORT void hsv_to_rgb(int H, int S, int V, int *R, int *G, int *B);
00032 
00033 // Floating point versions. RGBSL are 0-1, H is 0-360.
00034  PIGMENT_EXPORT void RGBToHSV(float r, float g, float b, float *h, float *s, float *v);
00035  PIGMENT_EXPORT void HSVToRGB(float h, float s, float v, float *r, float *g, float *b);
00036 
00037  PIGMENT_EXPORT void RGBToHSL(float r, float g, float b, float *h, float *s, float *l);
00038  PIGMENT_EXPORT void HSLToRGB(float h, float sl, float l, float *r, float *g, float *b);
00039 
00040  PIGMENT_EXPORT void rgb_to_hls(quint8 r, quint8 g, quint8 b, float * h, float * l, float * s);
00041 
00042  PIGMENT_EXPORT float hue_value(float n1, float n2, float hue);
00043 
00044  PIGMENT_EXPORT void hls_to_rgb(float h, float l, float s, quint8 * r, quint8 * g, quint8 * b);
00045 
00046  PIGMENT_EXPORT void rgb_to_hls(quint8 r, quint8 g, quint8 b, int * h, int * l, int * s);
00047  PIGMENT_EXPORT void hls_to_rgb(int h, int l, int s, quint8 * r, quint8 * g, quint8 * b);
00048 
00049 #endif // _KIS_CONVERSIONS_H_
00050 

Généré le Wed Nov 22 23:41:13 2006 pour KPlato par  doxygen 1.5.1-p1