9#ifndef TOOL_TRANSFORM_ARGS_H_
10#define TOOL_TRANSFORM_ARGS_H_
17#include "kritatooltransform_export.h"
25#include <QScopedPointer>
65 QPointF transformedCenter,
66 QPointF originalCenter,
67 QPointF rotationCenterOffset,
bool transformAroundRotationCenter,
68 double aX,
double aY,
double aZ,
69 double scaleX,
double scaleY,
70 double shearX,
double shearY,
71 double boundsRotation,
75 const QString &filterId,
76 int pixelPrecision,
int previewPixelPrecision,
92 return m_pixelPrecision;
96 m_pixelPrecision = precision;
100 return m_previewPixelPrecision;
104 m_previewPixelPrecision = precision;
108 return m_externalSource;
112 m_externalSource = externalSource;
118 return m_origPoints.size();
121 return m_origPoints[i];
124 return m_transfPoints[i];
130 return m_transfPoints;
137 return m_transfPoints;
147 return m_defaultPoints;
154 m_warpType = warpType;
157 m_warpCalculation = warpCalc;
160 return m_warpCalculation;
167 m_defaultPoints = defaultPoints;
172 return m_transformedCenter;
175 return m_originalCenter;
178 return m_rotationCenterOffset;
181 return m_transformAroundRotationCenter;
183 inline double aX()
const {
186 inline double aY()
const {
189 inline double aZ()
const {
202 return m_keepAspectRatio;
211 return m_boundsRotation;
215 m_transformedCenter = transformedCenter;
218 m_originalCenter = originalCenter;
221 m_rotationCenterOffset = rotationCenterOffset;
223 void setTransformAroundRotationCenter(
bool value);
244 m_keepAspectRatio =
value;
253 m_boundsRotation = boundsRotation;
257 return m_filter->id();
260 void setFilterId(
const QString &
id);
268 bool isIdentity()
const;
273 bool isUnchanging()
const;
276 return m_flattenedPerspectiveTransform;
280 m_flattenedPerspectiveTransform =
value;
284 return m_editTransformPoints;
288 m_editTransformPoints =
value;
292 return m_liquifyProperties.data();
296 return m_liquifyProperties.data();
299 void initLiquifyTransformMode(
const QRect &srcRect);
300 void saveLiquifyTransformMode()
const;
303 return m_liquifyWorker.data();
306 void toXML(QDomElement *e)
const;
309 void translateSrcAndDst(
const QPointF &offset);
310 void transformSrcAndDst(
const QTransform &t);
311 void translateDstSpace(
const QPointF &offset);
313 void saveContinuedState();
314 void restoreContinuedState();
320 bool meshShowHandles()
const;
321 void setMeshShowHandles(
bool value);
323 bool meshSymmetricalHandles()
const;
324 void setMeshSymmetricalHandles(
bool meshSymmetricalHandles);
326 bool meshScaleHandles()
const;
327 void setMeshScaleHandles(
bool meshScaleHandles);
329 void scale3dSrcAndDst(qreal scale);
338 bool m_defaultPoints {
true};
344 double m_alpha {1.0};
353 bool m_transformAroundRotationCenter {
false};
359 QVector3D m_cameraPos {QVector3D(0,0,1024)};
360 double m_scaleX {1.0};
361 double m_scaleY {1.0};
362 double m_shearX {0.0};
363 double m_shearY {0.0};
364 double m_boundsRotation {0.0};
365 bool m_keepAspectRatio {
false};
371 bool m_editTransformPoints {
false};
376 bool m_meshShowHandles =
true;
377 bool m_meshSymmetricalHandles =
true;
378 bool m_meshScaleHandles =
false;
388 int m_pixelPrecision {8};
389 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)