krita

kis_perspectivetransform_worker.h

00001 /*
00002  * This file is part of Krita
00003  *
00004  *  Copyright (c) 2006 Cyrille Berger <cberger@cberger.net>
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; version 2 of the License.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018  */
00019 
00020 #ifndef KIS_PERSPECTIVETRANSFORM_WORKER_H
00021 #define KIS_PERSPECTIVETRANSFORM_WORKER_H
00022 
00023 #include "kis_types.h"
00024 #include "kis_progress_subject.h"
00025 
00026 class KisPoint;
00027 class KisProgressDisplayInterface;
00028 
00029 class KisPerspectiveTransformWorker : public KisProgressSubject
00030 {
00031     public:
00032         KisPerspectiveTransformWorker(KisPaintDeviceSP dev, const KisPoint& topLeft, const KisPoint& topRight, const KisPoint& bottomLeft, const KisPoint& bottomRight, KisProgressDisplayInterface *progress);
00033     
00034         ~KisPerspectiveTransformWorker();
00035         
00036         void run();
00037         bool isCanceled() { return m_cancelRequested; };
00038     private:
00039         virtual void cancel() { m_cancelRequested = true; }
00040     private:
00041         Q_INT32 m_progressTotalSteps;
00042         Q_INT32 m_lastProgressReport;
00043         Q_INT32 m_progressStep;
00044         double m_xcenter, m_ycenter, m_p, m_q;
00045         KisPaintDeviceSP m_dev;
00046         bool m_cancelRequested;
00047         KisProgressDisplayInterface *m_progress;
00048         double m_matrix[3][3];
00049         QRect m_r;
00050 };
00051 
00052 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys