2
* kis_tool_fill.h - part of Krayon^Krita
4
* Copyright (c) 2004 Bart Coppens <kde@bartcoppens.be>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
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.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
#ifndef __filltool_h__
22
#define __filltool_h__
27
#include "kis_tool_paint.h"
34
class KActionCollection;
36
class KisToolFill : public KisToolPaint {
38
typedef KisToolPaint super;
44
virtual ~KisToolFill();
46
virtual void setup(KActionCollection *collection);
47
virtual void update(KisCanvasSubject *subject);
49
virtual void buttonPress(KisButtonPressEvent*);
51
bool flood(int startX, int startY);
53
virtual QWidget* createOptionWidget(QWidget* parent);
56
virtual void slotSetThreshold(int);
57
virtual void slotSetUsePattern(int);
63
QUANTUM* m_oldColor, *m_color;
64
KisPainter *m_painter;
65
KisCanvasSubject *m_subject;
66
KisImageSP m_currentImage;
67
bool *m_map, m_samplemerged, m_usePattern, m_useSelection;
68
KisSelectionSP m_selection;
70
QLabel *m_lbThreshold;
71
KIntNumInput *m_slThreshold;
72
QCheckBox *m_checkUsePattern;
76
#include "kis_tool_factory.h"
78
class KisToolFillFactory : public KisToolFactory {
79
typedef KisToolFactory super;
81
KisToolFillFactory(KActionCollection * ac) : super(ac) {};
82
virtual ~KisToolFillFactory(){};
84
virtual KisTool * createTool() {
85
KisToolFill * t = new KisToolFill();
90
virtual KisID id() { return KisID("fill", i18n("Fill tool")); }
97
#endif //__filltool_h__