Back to index

scribus-ng  1.3.4.dfsg+svn20071115
colorutil.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef COLORUTIL_H
00008 #define COLORUTIL_H
00009 
00010 #include <qcolor.h>
00011 #include <qimage.h>
00012 #include <qpixmap.h>
00013 #include <qstring.h>
00014 
00015 #include "fpointarray.h"
00016 #include "sccolor.h"
00017 #include "scribusapi.h"
00018 
00019 class ScribusDoc;
00020 
00021 QColor SCRIBUS_API SetColor(ScribusDoc *currentDoc, QString color, int shad);
00022 
00027 QPixmap SCRIBUS_API *getSmallPixmap(QColor rgb);
00028 QPixmap SCRIBUS_API *getWidePixmap(QColor rgb);
00029 QPixmap SCRIBUS_API *getFancyPixmap(const ScColor& col, ScribusDoc* doc);
00040 void SCRIBUS_API paintAlert(QPixmap &toPaint, QPixmap &target, int x = 0, int y = 0, bool useMask = true);
00041 QImage SCRIBUS_API ProofImage(QImage *Im, ScribusDoc* doc);
00042 
00049 void SCRIBUS_API handleOldColorShade(ScribusDoc* doc, QString& colName, int& shade);
00050 
00055 QColor SCRIBUS_API getOldColorShade(const QColor& color, int shade);
00062 QColor SCRIBUS_API getOldColorShade(uchar red, uchar green, uchar blue, int shade);
00068 unsigned char SCRIBUS_API INT_MULT ( unsigned char a, unsigned char b );
00074 void SCRIBUS_API RGBTOHSV ( uchar& red, uchar& green, uchar& blue );
00080 void SCRIBUS_API HSVTORGB ( uchar& hue, uchar& saturation, uchar& value );
00081 void SCRIBUS_API RGBTOHLS ( uchar& red, uchar& green, uchar& blue );
00088 double SCRIBUS_API HLSVALUE ( double n1, double n2, double hue );
00094 void SCRIBUS_API HLSTORGB ( uchar& hue, uchar& lightness, uchar& saturation );
00095 
00096 double SCRIBUS_API getCurveYValue(FPointArray &curve, double x, bool linear = false);
00097 
00098 double SCRIBUS_API Lum(uchar red, uchar green, uchar blue);
00099 double SCRIBUS_API LumD(double red, double green, double blue);
00100 void SCRIBUS_API setLum(uchar& red, uchar& green, uchar& blue, double lum);
00101 void SCRIBUS_API clipColor(double& red, double& green, double& blue);
00102 
00103 #endif