~ubuntu-branches/ubuntu/oneiric/koffice/oneiric-updates

« back to all changes in this revision

Viewing changes to krita/image/kis_indirect_painting_support.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
 *  Copyright (c) 2004 Bart Coppens <kde@bartcoppens.be>
 
3
 *  Copyright (c) 2010 Dmitry Kazakov <dimula73@gmail.com>
 
4
 *
 
5
 *  This program is free software; you can redistribute it and/or modify
 
6
 *  it under the terms of the GNU General Public License as published by
 
7
 *  the Free Software Foundation; either version 2 of the License, or
 
8
 *  (at your option) any later version.
 
9
 *
 
10
 *  This program is distributed in the hope that it will be useful,
 
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *  GNU General Public License for more details.
 
14
 *
 
15
 *  You should have received a copy of the GNU General Public License
 
16
 *  along with this program; if not, write to the Free Software
 
17
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
18
 */
 
19
 
 
20
#ifndef KIS_INDIRECT_PAINTING_SUPPORT_H_
 
21
#define KIS_INDIRECT_PAINTING_SUPPORT_H_
 
22
 
 
23
#include "krita_export.h"
 
24
#include "kis_types.h"
 
25
#include "kis_node.h"
 
26
 
 
27
 
 
28
/**
 
29
 * For classes that support indirect painting.
 
30
 *
 
31
 * XXX: Name doesn't suggest an object -- is KisIndirectPaintingLayer
 
32
 * a better name? (BSAR)
 
33
 */
 
34
class KRITAIMAGE_EXPORT KisIndirectPaintingSupport
 
35
{
 
36
    KisIndirectPaintingSupport(const KisIndirectPaintingSupport&);
 
37
    KisIndirectPaintingSupport& operator=(const KisIndirectPaintingSupport&);
 
38
public:
 
39
 
 
40
    KisIndirectPaintingSupport();
 
41
    virtual ~KisIndirectPaintingSupport();
 
42
 
 
43
    bool hasTemporaryTarget() const;
 
44
 
 
45
    void setTemporaryTarget(KisPaintDeviceSP t);
 
46
    void setTemporaryCompositeOp(const KoCompositeOp* c);
 
47
    void setTemporaryOpacity(quint8 o);
 
48
 
 
49
    /**
 
50
     * Writes the temporary target into the paint device of the layer.
 
51
     * This action will lock the temporary target itself.
 
52
     */
 
53
    void mergeToLayer(KisLayerSP layer, const QRegion &region,
 
54
                      const QString &transactionText);
 
55
 
 
56
    /**
 
57
     * Lock the temporary target.
 
58
     * It should be done for guarding every access to
 
59
     * temporaryTarget() or original()
 
60
     * NOTE: well, not "every", but...
 
61
     */
 
62
    void lockTemporaryTarget() const;
 
63
 
 
64
    /**
 
65
     * Unlock the temporary target
 
66
     * 
 
67
     * \see lockTemporaryTarget()
 
68
     */
 
69
    void unlockTemporaryTarget() const;
 
70
 
 
71
    KisPaintDeviceSP temporaryTarget();
 
72
    const KisPaintDeviceSP temporaryTarget() const;
 
73
    const KoCompositeOp* temporaryCompositeOp() const;
 
74
    quint8 temporaryOpacity() const;
 
75
 
 
76
private:
 
77
    struct Private;
 
78
    Private* const d;
 
79
 
 
80
};
 
81
 
 
82
 
 
83
#endif /* KIS_INDIRECT_PAINTING_SUPPORT_H_ */