kis_vectoranimated_brush.h 2.19 KB
Newer Older
1
/*
2
 *  Copyright (c) 2019 Alberto Eleuterio Flores Guerrero <barbanegra+bugs@posteo.mx>
3 4 5
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
6
 *  the Free Software Foundation; either version 3 of the License, or
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

#ifndef KIS_VECTORANIMATED_BRUSH_
#define KIS_VECTORANIMATED_BRUSH_

22 23 24 25 26 27
#include <kis_scaling_size_brush.h>


#include <KoShapePainter.h>
#include <SvgParser.h>
#include <KoXmlReader.h>
28
#include <kis_vectorbrush_parasite.h>
29

30
//
31 32 33 34

class BRUSH_EXPORT KisVectorAnimatedBrush : public KisScalingSizeBrush
{
public:
35 36


37 38 39 40 41 42 43 44 45 46 47 48
    /// Construct brush to load filename later as brush
    KisVectorAnimatedBrush(const QString& filename);
    KisVectorAnimatedBrush(const KisVectorAnimatedBrush& rhs);
    KisBrush* clone() const override;

    bool load() override;
    bool loadFromDevice(QIODevice *dev) override;
    bool save() override;
    bool saveToDevice(QIODevice *dev) const override;

    QString defaultFileExtension() const override;
    void toXML(QDomDocument& d, QDomElement& e) const override;
49

50
    void newbrushTip();
51

52 53
    // void notifyStrokeStarted() override;   
    // void notifyCachedDabPainted(const KisPaintInformation& info) override;
54
    void prepareForSeqNo(const KisPaintInformation& info, int seqNo) override;
55 56 57 58 59 60
/*
    // Asks for the new image
    KisFixedPaintDeviceSP paintDevice(const KoColorSpace * colorSpace,
            KisDabShape const&,
            const KisPaintInformation& info,
            double subPixelX = 0, double subPixelY = 0) const override;
61
*/
62

63

64 65
private:
    QByteArray m_svg;
66
    static KisVectorBrushParasite m_parasite;
67

68 69
    /* struct Private;
    Private * const m_d; */
70 71 72
};

#endif