|
| double | alpha () const |
| |
| double | aX () const |
| |
| double | aY () const |
| |
| double | aZ () const |
| |
| double | boundsRotation () const |
| |
| QVector3D | cameraPos () const |
| |
| KisToolChangesTrackerData * | clone () const override |
| |
| const ToolTransformArgs * | continuedTransform () const |
| |
| bool | defaultPoints () const |
| |
| KisPaintDeviceSP | externalSource () const |
| |
| KisFilterStrategy * | filter () const |
| |
| QString | filterId () const |
| |
| QTransform | flattenedPerspectiveTransform () const |
| |
| void | initLiquifyTransformMode (const QRect &srcRect) |
| |
| bool | isEditingTransformPoints () const |
| |
| bool | isIdentity () const |
| |
| bool | isSameMode (const ToolTransformArgs &other) const |
| |
| bool | isUnchanging () const |
| |
| bool | keepAspectRatio () const |
| |
| KisLiquifyProperties * | liquifyProperties () |
| |
| const KisLiquifyProperties * | liquifyProperties () const |
| |
| KisLiquifyTransformWorker * | liquifyWorker () const |
| |
| bool | meshScaleHandles () const |
| |
| bool | meshShowHandles () const |
| |
| bool | meshSymmetricalHandles () const |
| |
| KisBezierTransformMesh * | meshTransform () |
| |
| const KisBezierTransformMesh * | meshTransform () const |
| |
| TransformMode | mode () const |
| |
| int | numPoints () const |
| |
| ToolTransformArgs & | operator= (const ToolTransformArgs &args) |
| |
| bool | operator== (const ToolTransformArgs &other) const |
| |
| QPointF | originalCenter () const |
| |
| QPointF & | origPoint (int i) |
| |
| const QVector< QPointF > & | origPoints () const |
| |
| int | pixelPrecision () const |
| |
| int | previewPixelPrecision () const |
| |
| QVector< QPointF > & | refOriginalPoints () |
| |
| QVector< QPointF > & | refTransformedPoints () |
| |
| void | restoreContinuedState () |
| |
| QPointF | rotationCenterOffset () const |
| |
| void | saveContinuedState () |
| |
| void | saveLiquifyTransformMode () const |
| |
| void | scale3dSrcAndDst (qreal scale) |
| |
| double | scaleX () const |
| |
| double | scaleY () const |
| |
| void | setAlpha (double alpha) |
| |
| void | setAX (double aX) |
| |
| void | setAY (double aY) |
| |
| void | setAZ (double aZ) |
| |
| void | setBoundsRotation (double boundsRotation) |
| |
| void | setCameraPos (const QVector3D &pos) |
| |
| void | setDefaultPoints (bool defaultPoints) |
| |
| void | setEditingTransformPoints (bool value) |
| |
| void | setExternalSource (KisPaintDeviceSP externalSource) |
| |
| void | setFilterId (const QString &id) |
| |
| void | setFlattenedPerspectiveTransform (const QTransform &value) |
| |
| void | setKeepAspectRatio (bool value) |
| |
| void | setMeshScaleHandles (bool meshScaleHandles) |
| |
| void | setMeshShowHandles (bool value) |
| |
| void | setMeshSymmetricalHandles (bool meshSymmetricalHandles) |
| |
| void | setMode (TransformMode mode) |
| |
| void | setOriginalCenter (QPointF originalCenter) |
| |
| void | setPixelPrecision (int precision) |
| |
| void | setPoints (QVector< QPointF > origPoints, QVector< QPointF > transfPoints) |
| |
| void | setPreviewPixelPrecision (int precision) |
| |
| void | setRotationCenterOffset (QPointF rotationCenterOffset) |
| |
| void | setScaleX (double scaleX) |
| |
| void | setScaleY (double scaleY) |
| |
| void | setShearX (double shearX) |
| |
| void | setShearY (double shearY) |
| |
| void | setTransformAroundRotationCenter (bool value) |
| |
| void | setTransformedCenter (QPointF transformedCenter) |
| |
| void | setWarpCalculation (KisWarpTransformWorker::WarpCalculation warpCalc) |
| |
| void | setWarpType (KisWarpTransformWorker::WarpType warpType) |
| |
| double | shearX () const |
| |
| double | shearY () const |
| |
| | ToolTransformArgs () |
| |
| | ToolTransformArgs (const ToolTransformArgs &args) |
| |
| | ToolTransformArgs (TransformMode mode, QPointF transformedCenter, QPointF originalCenter, QPointF rotationCenterOffset, bool transformAroundRotationCenter, double aX, double aY, double aZ, double scaleX, double scaleY, double shearX, double shearY, double boundsRotation, KisWarpTransformWorker::WarpType warpType, double alpha, bool defaultPoints, const QString &filterId, int pixelPrecision, int previewPixelPrecision, KisPaintDeviceSP externalSource) |
| |
| void | toXML (QDomElement *e) const |
| |
| bool | transformAroundRotationCenter () const |
| |
| QPointF | transformedCenter () const |
| |
| void | transformSrcAndDst (const QTransform &t) |
| |
| QPointF & | transfPoint (int i) |
| |
| const QVector< QPointF > & | transfPoints () const |
| |
| void | translateDstSpace (const QPointF &offset) |
| |
| void | translateSrcAndDst (const QPointF &offset) |
| |
| KisWarpTransformWorker::WarpCalculation | warpCalculation () |
| |
| KisWarpTransformWorker::WarpType | warpType () const |
| |
| | ~ToolTransformArgs () |
| |
| virtual | ~KisToolChangesTrackerData () |
| |
Class used to store the parameters of a transformation. Some parameters are specific to free transform mode, and others to warp mode : maybe add a union to save a little more memory.
Definition at line 34 of file tool_transform_args.h.
Definition at line 443 of file tool_transform_args.cc.
444{
446
447 int newMode = e.attribute("mode", "0").toInt();
449
451
452
454
455 bool result = false;
456
458
459 QDomElement freeEl;
460
462
463 result =
465
469
473
475
478
481
485
486
487
490 }
491
492
493 if (!KisDomUtils::loadValue(freeEl,
"boundsRotation", &args.
m_boundsRotation)) {
495 }
496
497 if (result) {
500 }
501
503 QDomElement warpEl;
504
506
507 result =
509
511
514
517
519
520
521
522
525 }
526
529 } else {
530 result = false;
531 }
532
534 QDomElement liquifyEl;
535
536 result =
538
542 QDomElement meshEl;
543
544 result =
546
548
549 } else {
551 }
552
555 }
556
557 return args;
558}
static KisFilterStrategyRegistry * instance()
static KisLiquifyProperties fromXML(const QDomElement &e)
const T value(const QString &id) const
#define KIS_SAFE_ASSERT_RECOVER(cond)
#define KIS_ASSERT_RECOVER_NOOP(cond)
typedef void(QOPENGLF_APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC)(GLuint buffer)
bool findOnlyElement(const QDomElement &parent, const QString &tag, QDomElement *el, QStringList *errorMessages)
bool loadValue(const QDomElement &e, float *v)
References CAGE, filterId(), KisDomUtils::findOnlyElement(), FREE_TRANSFORM, KisLiquifyTransformWorker::fromXML(), KisLiquifyProperties::fromXML(), KisFilterStrategyRegistry::instance(), KIS_ASSERT_RECOVER_NOOP, KIS_SAFE_ASSERT_RECOVER, LIQUIFY, KisDomUtils::loadValue(), m_alpha, m_aX, m_aY, m_aZ, m_boundsRotation, m_cameraPos, m_defaultPoints, m_editTransformPoints, m_filter, m_flattenedPerspectiveTransform, m_keepAspectRatio, m_liquifyProperties, m_liquifyWorker, m_meshTransform, m_mode, m_originalCenter, m_origPoints, m_pixelPrecision, m_previewPixelPrecision, m_rotationCenterOffset, m_scaleX, m_scaleY, m_shearX, m_shearY, m_transformAroundRotationCenter, m_transformedCenter, m_transfPoints, m_warpType, MESH, KisWarpTransformWorker::N_MODES, N_MODES, PERSPECTIVE_4POINT, ToolTransformArgs(), KoGenericRegistry< T >::value(), void(), WARP, and warpType().
Definition at line 51 of file tool_transform_args.cc.
References alpha(), aX(), aY(), aZ(), boundsRotation(), defaultPoints(), externalSource(), keepAspectRatio(), m_alpha, m_aX, m_aY, m_aZ, m_boundsRotation, m_cameraPos, m_continuedTransformation, m_defaultPoints, m_editTransformPoints, m_externalSource, m_filter, m_flattenedPerspectiveTransform, m_keepAspectRatio, m_liquifyWorker, m_meshScaleHandles, m_meshShowHandles, m_meshSymmetricalHandles, m_meshTransform, m_mode, m_originalCenter, m_origPoints, m_pixelPrecision, m_previewPixelPrecision, m_rotationCenterOffset, m_scaleX, m_scaleY, m_shearX, m_shearY, m_transformAroundRotationCenter, m_transformedCenter, m_transfPoints, m_warpType, mode(), originalCenter(), origPoints(), pixelPrecision(), previewPixelPrecision(), rotationCenterOffset(), scaleX(), scaleY(), shearX(), shearY(), transformAroundRotationCenter(), transformedCenter(), transfPoints(), and warpType().
Definition at line 179 of file tool_transform_args.cc.
180{
182
183 bool result = true;
184
196
205
209
214
215 result &=
219
222 } else {
224 }
225
226 return result;
227}
#define KIS_SAFE_ASSERT_RECOVER_NOOP(cond)
References CAGE, FREE_TRANSFORM, KIS_SAFE_ASSERT_RECOVER_NOOP, LIQUIFY, m_aX, m_aY, m_aZ, m_boundsRotation, m_flattenedPerspectiveTransform, m_liquifyProperties, m_liquifyWorker, m_meshTransform, m_mode, m_originalCenter, m_origPoints, m_scaleX, m_scaleY, m_shearX, m_shearY, m_transformedCenter, m_transfPoints, MESH, PERSPECTIVE_4POINT, and WARP.
| void ToolTransformArgs::toXML |
( |
QDomElement * | e | ) |
const |
Definition at line 373 of file tool_transform_args.cc.
374{
375 e->setAttribute(
"mode", (
int)
m_mode);
376
377 QDomDocument doc = e->ownerDocument();
378
380
381 QDomElement freeEl = doc.createElement("free_transform");
382 e->appendChild(freeEl);
383
388
392
394
397
400
401
403
406
408
410 QDomElement warpEl = doc.createElement("warp_transform");
411 e->appendChild(warpEl);
412
416
419
423 }
424
426 QDomElement liqEl = doc.createElement("liquify_transform");
427 e->appendChild(liqEl);
428
432 QDomElement meshEl = doc.createElement("mesh_transform");
433 e->appendChild(meshEl);
434
436 } else {
438 }
439
440
441}
#define KIS_ASSERT_RECOVER_RETURN(cond)
void saveValue(QDomElement *parent, const QString &tag, const QSize &size)
References CAGE, FREE_TRANSFORM, KisFilterStrategy::id(), KIS_ASSERT_RECOVER_RETURN, LIQUIFY, m_alpha, m_aX, m_aY, m_aZ, m_boundsRotation, m_cameraPos, m_defaultPoints, m_filter, m_flattenedPerspectiveTransform, m_keepAspectRatio, m_liquifyProperties, m_liquifyWorker, m_meshTransform, m_mode, m_originalCenter, m_origPoints, m_pixelPrecision, m_previewPixelPrecision, m_rotationCenterOffset, m_scaleX, m_scaleY, m_shearX, m_shearY, m_transformAroundRotationCenter, m_transformedCenter, m_transfPoints, m_warpType, MESH, PERSPECTIVE_4POINT, KisDomUtils::saveValue(), and WARP.