Pencil2D Animation
Download Community News Docs Contribute
  • Overview
  • Articles
  • Code
  •  
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • File List
Loading...
Searching...
No Matches
  • core_lib
  • src
  • tool
buckettool.h
1/*
2
3Pencil2D - Traditional Animation Software
4Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
5Copyright (C) 2012-2020 Matthew Chiawen Chang
6
7This program is free software; you can redistribute it and/or
8modify it under the terms of the GNU General Public License
9as published by the Free Software Foundation; version 2 of the License.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16*/
17
18#ifndef BUCKETTOOL_H
19#define BUCKETTOOL_H
20
21#include "stroketool.h"
22
23#include "bitmapimage.h"
24#include "bitmapbucket.h"
25
26class Layer;
27class VectorImage;
28
29class BucketTool : public StrokeTool
30{
31 Q_OBJECT
32public:
33 explicit BucketTool(QObject* parent = nullptr);
34 ToolType type() override;
35 void loadSettings() override;
36 void saveSettings() override;
37 void resetToDefault() override;
38 QCursor cursor() override;
39
40 void pointerPressEvent(PointerEvent*) override;
41 void pointerMoveEvent(PointerEvent*) override;
42 void pointerReleaseEvent(PointerEvent*) override;
43
44 void setTolerance(const int tolerance) override;
45 void setToleranceEnabled(const bool enabled) override;
46 void setWidth(const qreal width) override;
47 void setFillExpand(const int fillExpandValue) override;
48 void setFillExpandEnabled(const bool enabled) override;
49 void setFillReferenceMode(int referenceMode) override;
50 void setFillMode(int mode) override;
51
52 void paintBitmap();
53 void paintVector(Layer* layer);
54 void drawStroke();
55
56 void applyChanges();
57
58private:
59
60 BitmapBucket mBitmapBucket;
61 VectorImage* vectorImage = nullptr;
62
63 bool mFilledOnMove = false;
64};
65
66#endif // BUCKETTOOL_H
BitmapBucket
Definition: bitmapbucket.h:35
BucketTool
Definition: buckettool.h:30
BucketTool::setWidth
void setWidth(const qreal width) override
BrushTool::setWidth.
Definition: buckettool.cpp:115
Layer
Definition: layer.h:33
PointerEvent
Definition: pointerevent.h:8
StrokeTool
Definition: stroketool.h:34
VectorImage
Definition: vectorimage.h:32
QCursor
QObject
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::parent
QObject * parent() const const
Generated on Thu May 8 2025 04:47:53 for Pencil2D by doxygen 1.9.6 based on revision 4513250b1d5b1a3676ec0e67b06b7a885ceaae39