r15104 by jghali - some fixes for sccolorspace class
scribus-commit
scribus-commit at lists.scribus.net
Mon May 24 23:00:23 CEST 2010
Revision: 15104
Author: jghali
Date: 2010-05-24T20:51:28.327136Z
Commit message: some fixes for sccolorspace class
Changeset:
M /trunk/Scribus/scribus/colormgmt/sccolorspace.h
M /trunk/Scribus/scribus/colormgmt/sccolorspace.cpp
Diffs:
Index: scribus/colormgmt/sccolorspace.cpp
===================================================================
--- scribus/colormgmt/sccolorspace.cpp (revision 15103)
+++ scribus/colormgmt/sccolorspace.cpp (revision 15104)
@@ -67,11 +67,11 @@
m_data->flattenAlpha(dataIn, numElems);
}
-ScColorTransform ScColorSpace::createTransform(const ScColorSpaceData& outputSpace, eRenderIntent renderIntent,
+ScColorTransform ScColorSpace::createTransform(const ScColorSpace& outputSpace, eRenderIntent renderIntent,
long transformFlags)
{
- if (m_data)
- m_data->createTransform(outputSpace, renderIntent, transformFlags);
+ if (m_data && outputSpace.m_data)
+ return m_data->createTransform(*outputSpace.m_data, renderIntent, transformFlags);
return ScColorTransform();
}
@@ -79,16 +79,16 @@
eRenderIntent renderIntent, long transformFlags)
{
if (m_data)
- m_data->createTransform(outputProfile, outputFormat, renderIntent, transformFlags);
+ return m_data->createTransform(outputProfile, outputFormat, renderIntent, transformFlags);
return ScColorTransform();
}
-ScColorTransform ScColorSpace::createProofingTransform(const ScColorSpaceData& outputSpace, const ScColorProfile& proofing,
+ScColorTransform ScColorSpace::createProofingTransform(const ScColorSpace& outputSpace, const ScColorProfile& proofing,
eRenderIntent renderIntent, eRenderIntent proofingIntent,
long transformFlags)
{
- if (m_data)
- m_data->createProofingTransform(outputSpace, proofing, renderIntent, proofingIntent, transformFlags);
+ if (m_data && outputSpace.m_data)
+ return m_data->createProofingTransform(*outputSpace.m_data, proofing, renderIntent, proofingIntent, transformFlags);
return ScColorTransform();
}
@@ -97,23 +97,23 @@
eRenderIntent proofingIntent, long transformFlags)
{
if (m_data)
- m_data->createProofingTransform(outputProfile, outputFormat, proofing, renderIntent, proofingIntent, transformFlags);
+ return m_data->createProofingTransform(outputProfile, outputFormat, proofing, renderIntent, proofingIntent, transformFlags);
return ScColorTransform();
}
-bool ScColorSpace::convert(ScColorSpaceData& data, eRenderIntent renderIntent, long transformFlags,
+bool ScColorSpace::convert(ScColorSpace& data, eRenderIntent renderIntent, long transformFlags,
void* dataIn, void* dataOut, uint numElems, ScColorTransform* lastTrans)
{
- if (m_data)
- return m_data->convert(data, renderIntent, transformFlags, dataIn, dataOut, numElems, lastTrans);
+ if (m_data && data.m_data)
+ return m_data->convert(*data.m_data, renderIntent, transformFlags, dataIn, dataOut, numElems, lastTrans);
return false;
}
-bool ScColorSpace::convert(ScColorSpaceData& data, eRenderIntent renderIntent, long transformFlags,
+bool ScColorSpace::convert(ScColorSpace& data, eRenderIntent renderIntent, long transformFlags,
void* dataIn, QIODevice* device, uint numElems, ScColorTransform* lastTrans)
{
- if (m_data)
- return m_data->convert(data, renderIntent, transformFlags, dataIn, device, numElems, lastTrans);
+ if (m_data && data.m_data)
+ return m_data->convert(*data.m_data, renderIntent, transformFlags, dataIn, device, numElems, lastTrans);
return false;
}
Index: scribus/colormgmt/sccolorspace.h
===================================================================
--- scribus/colormgmt/sccolorspace.h (revision 15103)
+++ scribus/colormgmt/sccolorspace.h (revision 15104)
@@ -40,13 +40,13 @@
void flattenAlpha(void* dataIn, uint numElems);
// Function to create transform to a specific output color space
- ScColorTransform createTransform(const ScColorSpaceData& outputSpace, eRenderIntent renderIntent,
+ ScColorTransform createTransform(const ScColorSpace& outputSpace, eRenderIntent renderIntent,
long transformFlags);
ScColorTransform createTransform(const ScColorProfile& outputProfile, eColorFormat outputFormat,
eRenderIntent renderIntent, long transformFlags);
// Function to create proofing transform to a specific output color space and a specific proofing device
- ScColorTransform createProofingTransform(const ScColorSpaceData& outputSpace, const ScColorProfile& proofing,
+ ScColorTransform createProofingTransform(const ScColorSpace& outputSpace, const ScColorProfile& proofing,
eRenderIntent renderIntent, eRenderIntent proofingIntent,
long transformFlags);
ScColorTransform createProofingTransform(const ScColorProfile& outputProfile, eColorFormat outputFormat,
@@ -54,9 +54,9 @@
eRenderIntent proofingIntent, long transformFlags);
// Convert color data to a specific color space
- bool convert(ScColorSpaceData& data, eRenderIntent renderIntent, long transformFlags,
+ bool convert(ScColorSpace& data, eRenderIntent renderIntent, long transformFlags,
void* dataIn, void* dataOut, uint numElems, ScColorTransform* lastTrans = 0);
- bool convert(ScColorSpaceData& data, eRenderIntent renderIntent, long transformFlags,
+ bool convert(ScColorSpace& data, eRenderIntent renderIntent, long transformFlags,
void* dataIn, QIODevice* device, uint numElems, ScColorTransform* lastTrans = 0);
const ScColorSpaceData* data() const { return m_data.data(); }
More information about the scribus-commit
mailing list