Subversion Repositories Scribus

Rev

Rev 5940 | Rev 6070 | 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
 
5959 jghali 30
CMSettings::CMSettings(ScribusDoc* doc, const QString& profileName, int intent) :
5783 cbradney 31
m_Doc(doc),
5959 jghali 32
m_ProfileName(profileName),
33
m_Intent(intent)
5783 cbradney 34
{
35
}
36
 
37
CMSettings::~CMSettings()
38
{
39
}
5788 jghali 40
 
41
bool CMSettings::useColorManagement() const
42
{
5813 jghali 43
        if (m_Doc)
5940 jghali 44
                return m_Doc->HasCMS;
5792 jghali 45
        return false;
5813 jghali 46
}
47
 
48
QString CMSettings::defaultMonitorProfile()
49
{
50
        if (m_Doc)
51
                return m_Doc->CMSSettings.DefaultMonitorProfile;
52
        return QString();
53
}
54
 
55
QString CMSettings::defaultPrinterProfile()
56
{
57
        if (m_Doc)
58
                return m_Doc->CMSSettings.DefaultPrinterProfile;
59
        return QString();
60
}
61
 
62
QString CMSettings::defaultImageRGBProfile()
63
{
64
        if (m_Doc)
65
                return m_Doc->CMSSettings.DefaultImageRGBProfile;
66
        return QString();
67
}
68
 
69
QString CMSettings::defaultImageCMYKProfile()
70
{
71
        if (m_Doc)
72
                return m_Doc->CMSSettings.DefaultImageCMYKProfile;
73
        return QString();
74
}
75
 
76
QString CMSettings::defaultSolidColorRGBProfile()
77
{
78
        if (m_Doc)
79
                return m_Doc->CMSSettings.DefaultSolidColorRGBProfile;
80
        return QString();
81
}
82
 
83
QString CMSettings::defaultSolidColorCMYKProfile()
84
{
85
        if (m_Doc)
86
                return m_Doc->CMSSettings.DefaultSolidColorCMYKProfile;
87
        return QString();
88
}
89
 
90
int CMSettings::colorRenderingIntent() const
91
{
92
        if (m_Doc)
93
                return m_Doc->IntentColors;
94
        return -1;
95
}
96
 
97
int CMSettings::imageRenderingIntent() const
98
{
99
        if (m_Doc)
100
                return m_Doc->IntentImages;
101
        return -1;
102
}
103
 
104
bool CMSettings::useBlackPoint() const
105
{
106
        if (m_Doc)
107
                return m_Doc->CMSSettings.BlackPoint;
5788 jghali 108
        return false;
109
}
110
 
5813 jghali 111
bool CMSettings::doSoftProofing() const
112
{
113
        if (m_Doc)
114
                return m_Doc->CMSSettings.SoftProofOn;
115
        return false;
116
}
117
 
118
bool CMSettings::doGamutCheck() const
119
{
120
        if (m_Doc)
121
                return m_Doc->CMSSettings.GamutCheck;
122
        return false;
123
}
124
 
5788 jghali 125
#ifdef HAVE_CMS
126
cmsHPROFILE CMSettings::monitorProfile() const
127
{
5940 jghali 128
        if (m_Doc->HasCMS)
5788 jghali 129
                return m_Doc->DocOutputProf;
130
        return NULL;
131
}
132
 
133
cmsHPROFILE CMSettings::printerProfile() const
134
{
5940 jghali 135
        if (m_Doc->HasCMS)
5788 jghali 136
                return m_Doc->DocPrinterProf;
137
        return NULL;
138
}
139
 
140
cmsHTRANSFORM CMSettings::rgbColorDisplayTransform() const  // stdTransRGBMonG
141
{
5940 jghali 142
        if (m_Doc->HasCMS)
5788 jghali 143
                return m_Doc->stdTransRGBMon;
144
        return NULL;
145
}
146
 
147
cmsHTRANSFORM CMSettings::rgbColorProofingTransform() const  // stdProofG
148
{
5940 jghali 149
        if (m_Doc->HasCMS)
5788 jghali 150
                return m_Doc->stdProof;
151
        return NULL;
152
}
153
 
154
cmsHTRANSFORM CMSettings::rgbImageDisplayTransform() const   // stdTransImgG
155
{
5940 jghali 156
        if (m_Doc->HasCMS)
5788 jghali 157
                return m_Doc->stdTransImg;
158
        return NULL;
159
}
160
 
161
cmsHTRANSFORM CMSettings::rgbImageProofingTransform() const  // stdProofImgG
162
{
5940 jghali 163
        if (m_Doc->HasCMS)
5788 jghali 164
                return m_Doc->stdProofImg;
165
        return NULL;
166
}
167
 
168
cmsHTRANSFORM CMSettings::rgbToCymkColorTransform() const // stdTransCMYKG
169
{
5940 jghali 170
        if (m_Doc->HasCMS)
5788 jghali 171
                return m_Doc->stdTransCMYK;
172
        return NULL;
173
}
174
 
175
cmsHTRANSFORM CMSettings::rgbGamutCheckTransform() const // stdProofGCG
176
{
5940 jghali 177
        if (m_Doc->HasCMS)
5788 jghali 178
                return m_Doc->stdProofGC;
179
        return NULL;
180
}
181
 
182
cmsHTRANSFORM CMSettings::cmykColorDisplayTransform() const // stdTransCMYKMonG
183
{
5940 jghali 184
        if (m_Doc->HasCMS)
5788 jghali 185
                return m_Doc->stdTransCMYKMon;
186
        return NULL;
187
}
188
 
189
cmsHTRANSFORM CMSettings::cmykColorProofingTransform() const // stdProofCMYKG
190
{
5940 jghali 191
        if (m_Doc->HasCMS)
5788 jghali 192
                return m_Doc->stdProofCMYK;
193
        return NULL;
194
}
195
 
196
cmsHTRANSFORM CMSettings::cmykToRgbColorTransform() const  // stdTransRGBG
197
{
5940 jghali 198
        if (m_Doc->HasCMS)
5788 jghali 199
                return m_Doc->stdTransRGB;
200
        return NULL;
201
}
202
 
203
cmsHTRANSFORM CMSettings::cmykGamutCheckTransform() const //stdProofCMYKGCG
204
{
5940 jghali 205
        if (m_Doc->HasCMS)
5788 jghali 206
                return m_Doc->stdProofCMYKGC;
207
        return NULL;
208
}
209
 
210
#endif