Subversion Repositories Scribus

Rev

Rev 5788 | Rev 5813 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5783 cbradney 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
 *   Copyright (C) 2006 by Craig Bradney                                   *
9
 *   mrb@scribus.info                                                      *
10
 *                                                                         *
11
 *   This program is free software; you can redistribute it and/or modify  *
12
 *   it under the terms of the GNU General Public License as published by  *
13
 *   the Free Software Foundation; either version 2 of the License, or     *
14
 *   (at your option) any later version.                                   *
15
 *                                                                         *
16
 *   This program is distributed in the hope that it will be useful,       *
17
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
18
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
19
 *   GNU General Public License for more details.                          *
20
 *                                                                         *
21
 *   You should have received a copy of the GNU General Public License     *
22
 *   along with this program; if not, write to the                         *
23
 *   Free Software Foundation, Inc.,                                       *
24
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
25
 ***************************************************************************/
26
 
27
#include "cmsettings.h"
28
#include "scribusdoc.h"
29
 
30
CMSettings::CMSettings(ScribusDoc* doc, const QString& profileName) :
31
m_Doc(doc),
32
m_ProfileName(profileName)
33
{
34
}
35
 
36
CMSettings::~CMSettings()
37
{
38
}
5788 jghali 39
 
40
bool CMSettings::useColorManagement() const
41
{
42
#ifdef HAVE_CMS
5792 jghali 43
        if(m_Doc)
44
                return m_Doc->CMSSettings.CMSinUse;
45
        return false;
5788 jghali 46
#else
47
        return false;
48
#endif
49
}
50
 
51
#ifdef HAVE_CMS
52
cmsHPROFILE CMSettings::monitorProfile() const
53
{
54
        if(m_Doc->CMSSettings.CMSinUse)
55
                return m_Doc->DocOutputProf;
56
        return NULL;
57
}
58
 
59
cmsHPROFILE CMSettings::printerProfile() const
60
{
61
        if(m_Doc->CMSSettings.CMSinUse)
62
                return m_Doc->DocPrinterProf;
63
        return NULL;
64
}
65
 
66
cmsHTRANSFORM CMSettings::rgbColorDisplayTransform() const  // stdTransRGBMonG
67
{
68
        if(m_Doc->CMSSettings.CMSinUse)
69
                return m_Doc->stdTransRGBMon;
70
        return NULL;
71
}
72
 
73
cmsHTRANSFORM CMSettings::rgbColorProofingTransform() const  // stdProofG
74
{
75
        if(m_Doc->CMSSettings.CMSinUse)
76
                return m_Doc->stdProof;
77
        return NULL;
78
}
79
 
80
cmsHTRANSFORM CMSettings::rgbImageDisplayTransform() const   // stdTransImgG
81
{
82
        if(m_Doc->CMSSettings.CMSinUse)
83
                return m_Doc->stdTransImg;
84
        return NULL;
85
}
86
 
87
cmsHTRANSFORM CMSettings::rgbImageProofingTransform() const  // stdProofImgG
88
{
89
        if(m_Doc->CMSSettings.CMSinUse)
90
                return m_Doc->stdProofImg;
91
        return NULL;
92
}
93
 
94
cmsHTRANSFORM CMSettings::rgbToCymkColorTransform() const // stdTransCMYKG
95
{
96
        if(m_Doc->CMSSettings.CMSinUse)
97
                return m_Doc->stdTransCMYK;
98
        return NULL;
99
}
100
 
101
cmsHTRANSFORM CMSettings::rgbGamutCheckTransform() const // stdProofGCG
102
{
103
        if(m_Doc->CMSSettings.CMSinUse)
104
                return m_Doc->stdProofGC;
105
        return NULL;
106
}
107
 
108
cmsHTRANSFORM CMSettings::cmykColorDisplayTransform() const // stdTransCMYKMonG
109
{
110
        if(m_Doc->CMSSettings.CMSinUse)
111
                return m_Doc->stdTransCMYKMon;
112
        return NULL;
113
}
114
 
115
cmsHTRANSFORM CMSettings::cmykColorProofingTransform() const // stdProofCMYKG
116
{
117
        if(m_Doc->CMSSettings.CMSinUse)
118
                return m_Doc->stdProofCMYK;
119
        return NULL;
120
}
121
 
122
cmsHTRANSFORM CMSettings::cmykToRgbColorTransform() const  // stdTransRGBG
123
{
124
        if(m_Doc->CMSSettings.CMSinUse)
125
                return m_Doc->stdTransRGB;
126
        return NULL;
127
}
128
 
129
cmsHTRANSFORM CMSettings::cmykGamutCheckTransform() const //stdProofCMYKGCG
130
{
131
        if(m_Doc->CMSSettings.CMSinUse)
132
                return m_Doc->stdProofCMYKGC;
133
        return NULL;
134
}
135
 
136
int CMSettings::colorRenderingIntent() const
137
{
138
        return m_Doc->IntentColors;
139
}
140
 
141
int CMSettings::imageRenderingIntent() const
142
{
143
        return m_Doc->IntentImages;
144
}
145
 
146
bool CMSettings::useBlackPoint() const
147
{
148
        return m_Doc->CMSSettings.BlackPoint;
149
}
150
 
151
bool CMSettings::doSoftProofing() const
152
{
153
        return m_Doc->CMSSettings.SoftProofOn;
154
}
155
 
156
bool CMSettings::doGamutCheck() const
157
{
158
        return m_Doc->CMSSettings.GamutCheck;
159
}
160
 
161
#endif