KisInterstrokeData.h 828 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
/*
 *  SPDX-FileCopyrightText: 2021 Dmitry Kazakov <dimula73@gmail.com>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef KISINTERSTROKEDATA_H
#define KISINTERSTROKEDATA_H

#include <kritaimage_export.h>
#include <QSharedPointer>
12
13
#include <QPoint>
#include <kis_types.h>
14
15

class KUndo2Command;
16
class KoColorSpace;
17
18
19
20
21


class KRITAIMAGE_EXPORT KisInterstrokeData
{
public:
22
    KisInterstrokeData(KisPaintDeviceSP device);
23
24
25
26
    virtual ~KisInterstrokeData();

    virtual void beginTransaction() = 0;
    virtual KUndo2Command* endTransaction() = 0;
27
28
29
30
31
32
33

    bool isStillCompatible() const;

private:
    QPoint m_linkedDeviceOffset;
    const KoColorSpace *m_linkedColorSpace = 0;
    KisPaintDeviceWSP m_linkedPaintDevice;
34
35
36
37
38
39
};

using KisInterstrokeDataSP = QSharedPointer<KisInterstrokeData>;


#endif // KISINTERSTROKEDATA_H