~ubuntu-branches/debian/sid/scribus/sid

« back to all changes in this revision

Viewing changes to scribus/colormgmt/sclcms2colormgmtengineimpl.h

  • Committer: Package Import Robot
  • Author(s): Oleksandr Moskalenko
  • Date: 2012-02-09 21:50:56 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120209215056-2wrx1ara0jbm7fi5
Tags: 1.4.0.dfsg+r17287-1
* New upstream stable release upload into Debian (Closes: #654703).
* Applied the Ubuntu armel patch.
* Removed non-free color swatches from resources.
* debian/control:
  - Moved icc-profiles from Recommends to Suggests (Closes: #655885).
  - Updated Standards-Version to 3.9.2.
  - Updated extended description per lintian warning.
* debian/rules:
  - Update mailcap (Closes: #630751). A request for mime.types update has
    been sent to the mime-support maintainer.
  - Added build-arch and build-indep targets per lintian warning.
* debian/patches:
  - top_cmakelists.patch - don't copy extra docs and changelogs.
  - scribus_cmakelists.patch - don't copy extra docs and changelogs.
  - scribus_cmakelists.patch - don't install the non-free "doc" dir.
  - profiles_cmakelists.patch - don't install non-free sRGB profile.
* debian/copyright: 
  - Converted to the DEP5 machine readable foramt.
  - Added licenses for free color swatches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
#ifndef SCLCMS2COLORMGMTENGINEIMPL_H
 
9
#define SCLCMS2COLORMGMTENGINEIMPL_H
 
10
 
 
11
#include <stdexcept>
 
12
 
 
13
#include "lcms2.h"
 
14
#include "sccolormgmtenginedata.h"
 
15
#include "sccolorprofilecache.h"
 
16
 
 
17
class ScLcms2ColorMgmtEngineImpl : public ScColorMgmtEngineData
 
18
{
 
19
        friend class ScLcms2ColorProfileImpl;
 
20
        friend class ScLcms2ColorTransformImpl;
 
21
 
 
22
public:
 
23
        ScLcms2ColorMgmtEngineImpl();
 
24
 
 
25
        // function for getting available profile in a directory
 
26
        virtual QList<ScColorProfileInfo> getAvailableProfileInfo(const QString& directory, bool recursive);
 
27
        
 
28
        // functions for opening icc profiles
 
29
        virtual ScColorProfile openProfileFromFile(const QString& filePath);
 
30
        virtual ScColorProfile openProfileFromMem (const QByteArray& array);
 
31
        
 
32
        // functions for creating profiles
 
33
        virtual ScColorProfile createProfile_sRGB();
 
34
        virtual ScColorProfile createProfile_Lab ();
 
35
        
 
36
        // functions for creating transforms
 
37
        virtual ScColorTransform createTransform(const ScColorProfile& inputProfile , eColorFormat inputFormat,
 
38
                                                 const ScColorProfile& outputProfile, eColorFormat outputFormat,
 
39
                                                                                         eRenderIntent renderIntent, long transformFlags);
 
40
        virtual ScColorTransform createProofingTransform(const ScColorProfile& inputProfile , eColorFormat inputFormat,
 
41
                                                 const ScColorProfile& outputProfile, eColorFormat outputFormat,
 
42
                                                                                         const ScColorProfile& proofing, eRenderIntent renderIntent, 
 
43
                                                 eRenderIntent proofingIntent, long transformFlags);
 
44
 
 
45
protected:
 
46
 
 
47
        // Color profile cache
 
48
        static QSharedPointer<ScColorProfileCache> m_profileCache;
 
49
 
 
50
        // Color transform cache
 
51
        static QSharedPointer<ScColorTransformPool> m_transformPool;
 
52
 
 
53
        static cmsUInt32Number translateFlagsToLcmsFlags(long flags);
 
54
        static cmsUInt32Number translateFormatToLcmsFormat(eColorFormat format);
 
55
        static int translateIntentToLcmsIntent(eRenderIntent intent, eRenderIntent defaut = Intent_Relative_Colorimetric);
 
56
        static eColorSpaceType translateLcmsColorSpaceType(cmsColorSpaceSignature);
 
57
        static eProfileClass   translateLcmsProfileClass(cmsProfileClassSignature);
 
58
 
 
59
        /*!
 
60
        \brief Simple error handler for use in conjunction with littlecms
 
61
        \param ErrorCode error code issued by little cms
 
62
        \param ErrorText error message corresponding to the error code
 
63
        */
 
64
        static void cmsErrorHandler(cmsContext contextID, cmsUInt32Number ErrorCode, const char *ErrorText);
 
65
};
 
66
 
 
67
#endif