Scribus
Open source desktop publishing at your fingertips
util_color.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef _UTIL_COLOR_H
8 #define _UTIL_COLOR_H
9 
10 #include <QColor>
11 #include <QImage>
12 #include <QPixmap>
13 #include <QString>
14 
15 #include "fpointarray.h"
16 #include "vgradient.h"
17 #include "sccolor.h"
18 #include "scribusapi.h"
19 
20 class ScribusDoc;
21 
22 QColor SCRIBUS_API SetColor(ScribusDoc *currentDoc, QString color, int shad);
23 
28 QPixmap SCRIBUS_API *getSmallPixmap(QColor rgb);
29 QPixmap SCRIBUS_API *getWidePixmap(QColor rgb);
30 QPixmap SCRIBUS_API *getFancyPixmap(const ScColor& col, ScribusDoc* doc);
42 void SCRIBUS_API paintAlert(QPixmap &toPaint, QPixmap &target, int x = 0, int y = 0, bool useMask = true);
43 QImage SCRIBUS_API ProofImage(QImage *Im, ScribusDoc* doc);
44 
51 void SCRIBUS_API handleOldColorShade(ScribusDoc* doc, QString& colName, int& shade);
52 
57 QColor SCRIBUS_API getOldColorShade(const QColor& color, int shade);
64 QColor SCRIBUS_API getOldColorShade(uchar red, uchar green, uchar blue, int shade);
70 void SCRIBUS_API RGBTOHSV ( uchar& red, uchar& green, uchar& blue );
71 
72 unsigned char SCRIBUS_API INT_MULT ( unsigned char a, unsigned char b );
73 
79 void SCRIBUS_API HSVTORGB ( uchar& hue, uchar& saturation, uchar& value );
85 void SCRIBUS_API RGBTOHLS ( uchar& red, uchar& green, uchar& blue );
92 double SCRIBUS_API HLSVALUE ( double n1, double n2, double hue );
98 void SCRIBUS_API HLSTORGB ( uchar& hue, uchar& lightness, uchar& saturation );
99 
100 double SCRIBUS_API getCurveYValue(FPointArray &curve, double x, bool linear = false);
101 
102 double SCRIBUS_API Lum(uchar red, uchar green, uchar blue);
103 double SCRIBUS_API LumD(double red, double green, double blue);
104 void SCRIBUS_API setLum(uchar& red, uchar& green, uchar& blue, double lum);
105 void SCRIBUS_API clipColor(double& red, double& green, double& blue);
107 QString SCRIBUS_API colorSpaceText(int cs);
108 
114 bool SCRIBUS_API importColorsFromFile(QString fileName, ColorList &EditColors, QHash<QString,VGradient> *dialogGradients = NULL, bool merge = false);
115 
116 #endif
Definition: sccolor.h:51
Definition: sccolor.h:155
the Document Class
Definition: scribusdoc.h:90
Definition: fpointarray.h:42