Scribus
Open source desktop publishing at your fingertips
sccolorengine.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 /***************************************************************************
8  sccolor.h - description
9  -------------------
10  begin : Sun Sep 9 2001
11  copyright : (C) 2001 by Franz Schmid
12  email : Franz.Schmid@altmuehlnet.de
13  ***************************************************************************/
14 
15 /***************************************************************************
16  * *
17  * This program is free software; you can redistribute it and/or modify *
18  * it under the terms of the GNU General Public License as published by *
19  * the Free Software Foundation; either version 2 of the License, or *
20  * (at your option) any later version. *
21  * *
22  ***************************************************************************/
23 
24 #ifndef SCCOLORENGINE_H
25 #define SCCOLORENGINE_H
26 
27 #include "scribusapi.h"
28 #include "sccolor.h"
29 #include "scribusstructs.h"
30 class ScribusDoc;
31 
32 class SCRIBUS_API ScColorEngine
33 {
34 public:
35 
37  static QColor getRGBColor(const ScColor& color, const ScribusDoc* doc);
38 
39  static ScColor convertToModel(const ScColor& color, const ScribusDoc* doc, colorModel model);
40 
42  static void getRGBValues(const ScColor& color, const ScribusDoc* doc, RGBColor& rgb);
43 
45  static void getCMYKValues(const ScColor& color, const ScribusDoc* doc, CMYKColor& cmyk);
46 
48  static void getShadeColorRGB(const ScColor& color, const ScribusDoc* doc, RGBColor&, double level);
49 
51  static void getShadeColorCMYK(const ScColor& color, const ScribusDoc* doc, CMYKColor& cmyk, double level);
52 
54  static QColor getDisplayColor(const ScColor& color, const ScribusDoc* doc);
55 
58  static QColor getDisplayColor(const ScColor& color, const ScribusDoc* doc, double level);
59 
62  static QColor getDisplayColorGC(const ScColor& color, const ScribusDoc* doc, bool *outOfG = NULL);
63 
66  static QColor getColorProof(const ScColor& color, const ScribusDoc* doc, bool gamutCheck = false);
67 
70  static QColor getShadeColor(const ScColor& color, const ScribusDoc* doc, double level);
71 
74  static QColor getShadeColorProof(const ScColor& color, const ScribusDoc* doc, double level);
75 
78  static QColor getColorProof(RGBColor& rgb, const ScribusDoc* doc, bool spot, bool gamutCkeck);
79 
82  static QColor getColorProof(CMYKColor& cmyk, const ScribusDoc* doc, bool spot, bool gamutCkeck);
83 
86  static QColor getDisplayColor(RGBColor& rgb, const ScribusDoc* doc, bool spot);
87 
90  static QColor getDisplayColor(CMYKColor& cmyk, const ScribusDoc* doc, bool spot);
91 
93  static bool isOutOfGamut(const ScColor& color, const ScribusDoc* doc);
94 
96  static void applyGCR(ScColor& color, const ScribusDoc* doc);
97 };
98 
99 #endif
Definition: sccolor.h:51
Definition: scribusstructs.h:49
Definition: sccolorengine.h:32
Definition: scribusstructs.h:41
the Document Class
Definition: scribusdoc.h:90