18#ifndef KIS_ROTATE_VISITOR_H_
19#define KIS_ROTATE_VISITOR_H_
22#include "kis_progress_subject.h"
26class KisProgressDisplayInterface;
28class KisRotateVisitor :
public KisProgressSubject {
29 typedef KisProgressSubject super;
37 void visitKisPaintDevice(KisPaintDevice* dev);
39 void rotate(
double angle,
bool rotateAboutImageCentre, KisProgressDisplayInterface *progress);
40 void shear(
double angleX,
double angleY, KisProgressDisplayInterface *progress);
43 KisPaintDeviceSP m_dev;
46 bool m_cancelRequested;
47 virtual void cancel() { m_cancelRequested =
true; }
49 void initProgress(TQ_INT32 totalSteps);
50 void incrementProgress();
51 void setProgressDone();
53 KisProgressDisplayInterface *m_progress;
54 TQ_INT32 m_progressStep;
55 TQ_INT32 m_progressTotalSteps;
56 TQ_INT32 m_lastProgressPerCent;
58 KisPaintDeviceSP rotateRight90(KisPaintDeviceSP src);
59 KisPaintDeviceSP rotateLeft90(KisPaintDeviceSP src);
60 KisPaintDeviceSP rotate180(KisPaintDeviceSP src);
61 KisPaintDeviceSP rotate(KisPaintDeviceSP src,
double angle, KisPoint centreOfRotation);
63 KisPaintDeviceSP xShear(KisPaintDeviceSP src,
double shearX);
64 KisPaintDeviceSP yShear(KisPaintDeviceSP src,
double shearY);
68inline KisRotateVisitor::KisRotateVisitor()
72inline KisRotateVisitor::~KisRotateVisitor()
76inline void KisRotateVisitor::visitKisPaintDevice(
KisPaintDevice* dev)
A paint device contains the actual pixel data and offers methods to read and write pixels.