Commit 3440921f authored by Blackbeard (alberto flores)'s avatar Blackbeard (alberto flores) 🚢

Merge branch 'master' into blackbeard/T10930-load-avb

parents b024e4fb 73e29047
/*
* Copyright (c) 2012 Dmitry Kazakov <dimula73@gmail.com>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (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_ANIMATED_BRUSHES_
#define KIS_ANIMATED_BRUSHES_
#include <kis_animated_brushes.h>
#include <kis_brushes_pipe.h>
#include <kis_vectoranimated_brush.h>
class KisAnimatedBrushes : public KisVectorAnimatedBrush
{
public:
KisAnimatedBrushes()
: m_isInitialized(false)
{
}
protected:
int chooseNextBrush(const KisPaintInformation& info) override {
if (!m_isInitialized) {
m_imageIndex = 0;
m_isInitialized = true;
} else {
m_imageIndex ++;
}
return m_imageIndex;
}
};
#endif /* __KIS_ANIMATED_BRUSHES_ */
/*
* Copyright (c) 2012 Dmitry Kazakov <dimula73@gmail.com>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (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_ANIMATED_BRUSHES_
#define KIS_ANIMATED_BRUSHES_
#include <kis_brushes_pipe.h>
#include <kis_vectoranimated_brush.h>
class KisImageBrushesPipe();
class BRUSH_EXPORT KisAnimatedBrushes : public KisVectorAnimatedBrush
{
public:
KisAnimatedBrushes(const QString& filename);
private:
int m_imageIndex;
struct Private;
Private * const m_d;
};
#endif /* __KIS_ANIMATED_BRUSHES_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment