Changeset View
Changeset View
Standalone View
Standalone View
libs/pigment/KoColorConversionSystem.cpp
Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Line(s) | 282 | } else if ((!bestPath->isGood && path->isGood) || pQC.lessWorseThan(path, bestPath)) { | |||
---|---|---|---|---|---|
284 | bestPath = path; | 284 | bestPath = path; | ||
285 | } else { | 285 | } else { | ||
286 | delete path; | 286 | delete path; | ||
287 | } | 287 | } | ||
288 | } | 288 | } | ||
289 | } | 289 | } | ||
290 | Q_ASSERT(bestPath); | 290 | Q_ASSERT(bestPath); | ||
291 | const KoColorSpace* endColorSpace = defaultColorSpaceForNode(bestPath->endNode()); | 291 | const KoColorSpace* endColorSpace = defaultColorSpaceForNode(bestPath->endNode()); | ||
292 | fromCS = createTransformationFromPath(bestPath, colorSpace, endColorSpace, KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags); | 292 | fromCS = createTransformationFromPath(bestPath, colorSpace, endColorSpace, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags()); | ||
293 | Path* returnPath = findBestPath(bestPath->endNode(), csNode); | 293 | Path* returnPath = findBestPath(bestPath->endNode(), csNode); | ||
294 | Q_ASSERT(returnPath); | 294 | Q_ASSERT(returnPath); | ||
295 | toCS = createTransformationFromPath(returnPath, endColorSpace, colorSpace, KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags); | 295 | toCS = createTransformationFromPath(returnPath, endColorSpace, colorSpace, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags()); | ||
296 | Q_ASSERT(*toCS->dstColorSpace() == *fromCS->srcColorSpace()); | 296 | Q_ASSERT(*toCS->dstColorSpace() == *fromCS->srcColorSpace()); | ||
297 | Q_ASSERT(*fromCS->dstColorSpace() == *toCS->srcColorSpace()); | 297 | Q_ASSERT(*fromCS->dstColorSpace() == *toCS->srcColorSpace()); | ||
298 | } | 298 | } | ||
299 | 299 | | |||
300 | KoColorConversionTransformation* KoColorConversionSystem::createTransformationFromPath(const Path* path, const KoColorSpace * srcColorSpace, const KoColorSpace * dstColorSpace, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags) const | 300 | KoColorConversionTransformation* KoColorConversionSystem::createTransformationFromPath(const Path* path, const KoColorSpace * srcColorSpace, const KoColorSpace * dstColorSpace, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags) const | ||
301 | { | 301 | { | ||
302 | Q_ASSERT(srcColorSpace->colorModelId().id() == path->startNode()->modelId); | 302 | Q_ASSERT(srcColorSpace->colorModelId().id() == path->startNode()->modelId); | ||
303 | Q_ASSERT(srcColorSpace->colorDepthId().id() == path->startNode()->depthId); | 303 | Q_ASSERT(srcColorSpace->colorDepthId().id() == path->startNode()->depthId); | ||
▲ Show 20 Lines • Show All 233 Lines • Show Last 20 Lines |