9#ifndef TOOL_TRANSFORM_ARGS_H_
10#define TOOL_TRANSFORM_ARGS_H_
17#include "kritatooltransform_export.h"
23#include <QScopedPointer>
63 QPointF transformedCenter,
64 QPointF originalCenter,
65 QPointF rotationCenterOffset,
bool transformAroundRotationCenter,
66 double aX,
double aY,
double aZ,
67 double scaleX,
double scaleY,
68 double shearX,
double shearY,
69 double boundsRotation,
73 const QString &filterId,
74 int pixelPrecision,
int previewPixelPrecision,
90 return m_pixelPrecision;
94 m_pixelPrecision = precision;
98 return m_previewPixelPrecision;
102 m_previewPixelPrecision = precision;
106 return m_externalSource;
110 m_externalSource = externalSource;
116 return m_origPoints.size();
119 return m_origPoints[i];
122 return m_transfPoints[i];
128 return m_transfPoints;
135 return m_transfPoints;
145 return m_defaultPoints;
152 m_warpType = warpType;
155 m_warpCalculation = warpCalc;
158 return m_warpCalculation;
165 m_defaultPoints = defaultPoints;
170 return m_transformedCenter;
173 return m_originalCenter;
176 return m_rotationCenterOffset;
179 return m_transformAroundRotationCenter;
181 inline double aX()
const {
184 inline double aY()
const {
187 inline double aZ()
const {
200 return m_keepAspectRatio;
209 return m_boundsRotation;
213 m_transformedCenter = transformedCenter;
216 m_originalCenter = originalCenter;
219 m_rotationCenterOffset = rotationCenterOffset;
221 void setTransformAroundRotationCenter(
bool value);
242 m_keepAspectRatio =
value;
251 m_boundsRotation = boundsRotation;
255 return m_filter->id();
258 void setFilterId(
const QString &
id);
266 bool isIdentity()
const;
271 bool isUnchanging()
const;
274 return m_flattenedPerspectiveTransform;
278 m_flattenedPerspectiveTransform =
value;
282 return m_editTransformPoints;
286 m_editTransformPoints =
value;
290 return m_liquifyProperties.data();
294 return m_liquifyProperties.data();
297 void initLiquifyTransformMode(
const QRect &srcRect);
298 void saveLiquifyTransformMode()
const;
301 return m_liquifyWorker.data();
304 void toXML(QDomElement *e)
const;
307 void translateSrcAndDst(
const QPointF &offset);
308 void transformSrcAndDst(
const QTransform &t);
309 void translateDstSpace(
const QPointF &offset);
311 void saveContinuedState();
312 void restoreContinuedState();
318 bool meshShowHandles()
const;
319 void setMeshShowHandles(
bool value);
321 bool meshSymmetricalHandles()
const;
322 void setMeshSymmetricalHandles(
bool meshSymmetricalHandles);
324 bool meshScaleHandles()
const;
325 void setMeshScaleHandles(
bool meshScaleHandles);
327 void scale3dSrcAndDst(qreal scale);
336 bool m_defaultPoints {
true};
342 double m_alpha {1.0};
351 bool m_transformAroundRotationCenter {
false};
357 QVector3D m_cameraPos {QVector3D(0,0,1024)};
358 double m_scaleX {1.0};
359 double m_scaleY {1.0};
360 double m_shearX {0.0};
361 double m_shearY {0.0};
362 double m_boundsRotation {0.0};
363 bool m_keepAspectRatio {
false};
369 bool m_editTransformPoints {
false};
374 bool m_meshShowHandles =
true;
375 bool m_meshSymmetricalHandles =
true;
376 bool m_meshScaleHandles =
false;
386 int m_pixelPrecision {8};
387 int m_previewPixelPrecision {16};
float value(const T *src, size_t ch)
bool operator==(const KisRegion &lhs, const KisRegion &rhs)
#define KIS_ASSERT_RECOVER_NOOP(cond)