Back to index

scribus-ng  1.3.4.dfsg+svn20071115
sccolorengine.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 /***************************************************************************
00008                           sccolor.h  -  description
00009                              -------------------
00010     begin                : Sun Sep 9 2001
00011     copyright            : (C) 2001 by Franz Schmid
00012     email                : Franz.Schmid@altmuehlnet.de
00013  ***************************************************************************/
00014 
00015 /***************************************************************************
00016  *                                                                         *
00017  *   This program is free software; you can redistribute it and/or modify  *
00018  *   it under the terms of the GNU General Public License as published by  *
00019  *   the Free Software Foundation; either version 2 of the License, or     *
00020  *   (at your option) any later version.                                   *
00021  *                                                                         *
00022  ***************************************************************************/
00023 
00024 #ifndef SCCOLORENGINE_H
00025 #define SCCOLORENGINE_H
00026 
00027 #include "scribusapi.h"
00028 #include "sccolor.h"
00029 #include "scribusstructs.h"
00030 class ScribusDoc;
00031 
00032 class SCRIBUS_API ScColorEngine
00033 {
00034 public:
00035 
00037        static QColor getRGBColor(const ScColor& color, const ScribusDoc* doc);
00038 
00039        static ScColor convertToModel(const ScColor& color, const ScribusDoc* doc, colorModel model);
00040 
00042        static void getRGBValues(const ScColor& color, const ScribusDoc* doc, RGBColor& rgb);
00043 
00045        static void getCMYKValues(const ScColor& color, const ScribusDoc* doc, CMYKColor& cmyk);
00046 
00048        static void getShadeColorRGB(const ScColor& color, const ScribusDoc* doc, RGBColor&, int level);
00049        
00051        static void getShadeColorCMYK(const ScColor& color, const ScribusDoc* doc, CMYKColor& cmyk, int level);
00052 
00054        static QColor getDisplayColor(const ScColor& color, const ScribusDoc* doc);
00055 
00058        static QColor getDisplayColor(const ScColor& color, const ScribusDoc* doc, int level);
00059 
00062        static QColor getDisplayColorGC(const ScColor& color, const ScribusDoc* doc);
00063 
00066        static QColor getColorProof(const ScColor& color, const ScribusDoc* doc, bool gamutCheck = false);
00067 
00070        static QColor getShadeColor(const ScColor& color, const ScribusDoc* doc, int level);
00071 
00074        static QColor getShadeColorProof(const ScColor& color, const ScribusDoc* doc, int level);
00075 
00078        static QColor getColorProof(RGBColor& rgb, const ScribusDoc* doc, bool spot, bool gamutCkeck);
00079 
00082        static QColor getColorProof(CMYKColor& cmyk, const ScribusDoc* doc, bool spot, bool gamutCkeck);
00083 
00086        static QColor getDisplayColor(RGBColor& rgb, const ScribusDoc* doc, bool spot);
00087 
00090        static QColor getDisplayColor(CMYKColor& cmyk, const ScribusDoc* doc, bool spot);
00091 
00093        static bool isOutOfGamut(const ScColor& color, const ScribusDoc* doc);
00094 
00096        static void applyGCR(ScColor& color, const ScribusDoc* doc);
00097 };
00098 
00099 #endif