~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to krita/image/kis_perspectivetransform_worker.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-27 17:52:57 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101027175257-s04zqqk5bs8ckm9o
Tags: 1:2.2.83-0ubuntu1
* Merge with Debian git remaining changes:
 - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
   create-resources, libspnav-dev
 - Remove needless build-dep on libwv2-dev
 - koffice-libs recommends create-resources
 - krita recommends pstoedit
 - Keep our patches
* New upstream release 2.3 beta 3
  - Remove debian/patches fixed by upstream
  - Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of Krita
 
3
 *
 
4
 *  Copyright (c) 2006 Cyrille Berger <cberger@cberger.net>
 
5
 *  Copyright (c) 2010 Marc Pegon <pe.marc@free.fr>
 
6
 *
 
7
 *  This program is free software; you can redistribute it and/or modify
 
8
 *  it under the terms of the GNU Lesser General Public License as published by
 
9
 *  the Free Software Foundation; version 2 of the License.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU Lesser General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
19
 */
 
20
 
 
21
#ifndef KIS_PERSPECTIVETRANSFORM_WORKER_H
 
22
#define KIS_PERSPECTIVETRANSFORM_WORKER_H
 
23
 
 
24
#include "kis_types.h"
 
25
#include "krita_export.h"
 
26
 
 
27
#include <QRect>
 
28
#include <QTransform>
 
29
 
 
30
#include <KoUpdater.h>
 
31
typedef QPointer<KoUpdater> KoUpdaterPtr;
 
32
 
 
33
class KRITAIMAGE_EXPORT KisPerspectiveTransformWorker : public QObject
 
34
{
 
35
 
 
36
    Q_OBJECT
 
37
 
 
38
public:
 
39
    KisPerspectiveTransformWorker(KisPaintDeviceSP dev, KisSelectionSP selection, const QPointF& topLeft, const QPointF& topRight, const QPointF& bottomLeft, const QPointF& bottomRight, KoUpdaterPtr progress);
 
40
    KisPerspectiveTransformWorker(KisPaintDeviceSP dev, QRect r, QPointF center, double aX, double aY, double distance, KoUpdaterPtr progress);
 
41
 
 
42
    ~KisPerspectiveTransformWorker();
 
43
 
 
44
    void run();
 
45
private:
 
46
    qint32 m_progressTotalSteps;
 
47
    qint32 m_lastProgressReport;
 
48
    qint32 m_progressStep;
 
49
    double m_xcenter, m_ycenter, m_p, m_q;
 
50
    QTransform m_transform;
 
51
    KisPaintDeviceSP m_dev;
 
52
    KoUpdaterPtr m_progress;
 
53
    KisSelectionSP m_selection;
 
54
    double m_matrix[3][3];
 
55
    QRect m_r;
 
56
};
 
57
 
 
58
#endif