Changeset View
Changeset View
Standalone View
Standalone View
plugins/tools/tool_transform2/tool_transform_args.cc
Context not available. | |||||
98 | m_filter = args.m_filter; | 98 | m_filter = args.m_filter; | ||
---|---|---|---|---|---|
99 | m_flattenedPerspectiveTransform = args.m_flattenedPerspectiveTransform; | 99 | m_flattenedPerspectiveTransform = args.m_flattenedPerspectiveTransform; | ||
100 | m_editTransformPoints = args.m_editTransformPoints; | 100 | m_editTransformPoints = args.m_editTransformPoints; | ||
101 | m_pixelPrecision = 8; | 101 | m_pixelPrecision = args.pixelPrecision(); | ||
102 | m_previewPixelPrecision = 16; | 102 | m_previewPixelPrecision = args.previewPixelPrecision(); | ||
103 | 103 | | |||
104 | if (args.m_liquifyWorker) { | 104 | if (args.m_liquifyWorker) { | ||
105 | m_liquifyWorker.reset(new KisLiquifyTransformWorker(*args.m_liquifyWorker.data())); | 105 | m_liquifyWorker.reset(new KisLiquifyTransformWorker(*args.m_liquifyWorker.data())); | ||
Context not available. | |||||
233 | KisWarpTransformWorker::WarpType warpType, | 233 | KisWarpTransformWorker::WarpType warpType, | ||
234 | double alpha, | 234 | double alpha, | ||
235 | bool defaultPoints, | 235 | bool defaultPoints, | ||
236 | const QString &filterId) | 236 | const QString &filterId, | ||
237 | int pixelPrecision, int previewPixelPrecision) | ||||
237 | : m_mode(mode) | 238 | : m_mode(mode) | ||
238 | , m_defaultPoints(defaultPoints) | 239 | , m_defaultPoints(defaultPoints) | ||
239 | , m_origPoints {QVector<QPointF>()} | 240 | , m_origPoints {QVector<QPointF>()} | ||
Context not available. | |||||
252 | , m_shearX(shearX) | 253 | , m_shearX(shearX) | ||
253 | , m_shearY(shearY) | 254 | , m_shearY(shearY) | ||
254 | , m_liquifyProperties(new KisLiquifyProperties()) | 255 | , m_liquifyProperties(new KisLiquifyProperties()) | ||
255 | , m_pixelPrecision(8) | 256 | , m_pixelPrecision(pixelPrecision) | ||
256 | , m_previewPixelPrecision(16) | 257 | , m_previewPixelPrecision(previewPixelPrecision) | ||
257 | { | 258 | { | ||
258 | setFilterId(filterId); | 259 | setFilterId(filterId); | ||
259 | } | 260 | } | ||
Context not available. | |||||
366 | KisDomUtils::saveValue(&warpEl, "warpType", (int)m_warpType); // limited! | 367 | KisDomUtils::saveValue(&warpEl, "warpType", (int)m_warpType); // limited! | ||
367 | KisDomUtils::saveValue(&warpEl, "alpha", m_alpha); | 368 | KisDomUtils::saveValue(&warpEl, "alpha", m_alpha); | ||
368 | 369 | | |||
370 | if(m_mode == CAGE){ | ||||
371 | KisDomUtils::saveValue(&warpEl,"pixelPrecision",m_pixelPrecision); | ||||
372 | KisDomUtils::saveValue(&warpEl,"previewPixelPrecision",m_previewPixelPrecision); | ||||
373 | } | ||||
374 | | ||||
369 | } else if (m_mode == LIQUIFY) { | 375 | } else if (m_mode == LIQUIFY) { | ||
370 | QDomElement liqEl = doc.createElement("liquify_transform"); | 376 | QDomElement liqEl = doc.createElement("liquify_transform"); | ||
371 | e->appendChild(liqEl); | 377 | e->appendChild(liqEl); | ||
Context not available. | |||||
445 | KisDomUtils::loadValue(warpEl, "warpType", &warpType) && | 451 | KisDomUtils::loadValue(warpEl, "warpType", &warpType) && | ||
446 | KisDomUtils::loadValue(warpEl, "alpha", &args.m_alpha); | 452 | KisDomUtils::loadValue(warpEl, "alpha", &args.m_alpha); | ||
447 | 453 | | |||
454 | if(args.m_mode == CAGE){ | ||||
455 | result = result && | ||||
456 | KisDomUtils::loadValue(warpEl, "pixelPrecision", &args.m_pixelPrecision) && | ||||
457 | KisDomUtils::loadValue(warpEl, "previewPixelPrecision", &args.m_previewPixelPrecision); | ||||
458 | } | ||||
459 | | ||||
448 | if (result && warpType >= 0 && warpType < KisWarpTransformWorker::N_MODES) { | 460 | if (result && warpType >= 0 && warpType < KisWarpTransformWorker::N_MODES) { | ||
449 | args.m_warpType = (KisWarpTransformWorker::WarpType_) warpType; | 461 | args.m_warpType = (KisWarpTransformWorker::WarpType_) warpType; | ||
450 | } else { | 462 | } else { | ||
Context not available. |