Krita Source Code Documentation
Loading...
Searching...
No Matches
KisToolBasicBrushBase Class Referenceabstract

#include <KisToolBasicBrushBase.h>

+ Inheritance diagram for KisToolBasicBrushBase:

Public Types

enum  ToolType { PAINT , SELECT }
 
- Public Types inherited from KisTool
enum  { FLAG_USES_CUSTOM_PRESET =0x01 , FLAG_USES_CUSTOM_COMPOSITEOP =0x02 , FLAG_USES_CUSTOM_SIZE =0x04 }
 
enum  AlternateAction {
  ChangeSize = AlternateChangeSize , ChangeSizeSnap = AlternateChangeSizeSnap , SampleFgNode = AlternateSampleFgNode , SampleBgNode = AlternateSampleBgNode ,
  SampleFgImage = AlternateSampleFgImage , SampleBgImage = AlternateSampleBgImage , Secondary = AlternateSecondary , Third = AlternateThird ,
  Fourth = AlternateFourth , Fifth = AlternateFifth , NONE = 10000
}
 
enum  NodePaintAbility {
  VECTOR , CLONE , PAINT , UNPAINTABLE ,
  MYPAINTBRUSH_UNPAINTABLE
}
 
enum  ToolAction {
  Primary , AlternateChangeSize , AlternateChangeSizeSnap , AlternateSampleFgNode ,
  AlternateSampleBgNode , AlternateSampleFgImage , AlternateSampleBgImage , AlternateSecondary ,
  AlternateThird , AlternateFourth , AlternateFifth , Alternate_NONE = 10000
}
 

Public Slots

void activate (const QSet< KoShape * > &shapes) override
 
void deactivate () override
 
void setPreviewColor (const QColor &color)
 
- Public Slots inherited from KisToolShape
void activate (const QSet< KoShape * > &shapes) override
 
virtual void fillSettingChanged (int value)
 
virtual void outlineSettingChanged (int value)
 
virtual void patternRotationSettingChanged (qreal value)
 
virtual void patternScaleSettingChanged (qreal value)
 
- Public Slots inherited from KisToolPaint
void activate (const QSet< KoShape * > &shapes) override
 
void deactivate () override
 
- Public Slots inherited from KisTool
void activate (const QSet< KoShape * > &shapes) override
 
void canvasResourceChanged (int key, const QVariant &res) override
 
void deactivate () override
 
virtual void updateSettingsViews ()
 
- Public Slots inherited from KoToolBase
virtual void activate (const QSet< KoShape * > &shapes)
 
virtual void deactivate ()
 
virtual void documentResourceChanged (int key, const QVariant &res)
 
virtual void repaintDecorations ()
 
virtual void requestRedoDuringStroke ()
 
virtual void requestStrokeCancellation ()
 
virtual void requestStrokeEnd ()
 
virtual void requestUndoDuringStroke ()
 
void setStatusText (const QString &statusText)
 
void updateOptionsWidgetIcons ()
 

Public Member Functions

void activateAlternateAction (AlternateAction action) override
 
void beginAlternateAction (KoPointerEvent *event, AlternateAction action) override
 
void beginPrimaryAction (KoPointerEvent *event) override
 
void continueAlternateAction (KoPointerEvent *event, AlternateAction action) override
 
void continuePrimaryAction (KoPointerEvent *event) override
 
void deactivateAlternateAction (AlternateAction action) override
 
void endAlternateAction (KoPointerEvent *event, AlternateAction action) override
 
void endPrimaryAction (KoPointerEvent *event) override
 
 KisToolBasicBrushBase (KoCanvasBase *canvas, ToolType type, const QCursor &cursor=KisCursor::loadWithSize("tool_outline_selection_cursor.svg", 32, 32, 5, 5))
 
void mouseMoveEvent (KoPointerEvent *event) override
 
void paint (QPainter &gc, const KoViewConverter &converter) override
 
qreal pressureToCurve (qreal pressure)
 
 ~KisToolBasicBrushBase () override
 
- Public Member Functions inherited from KisToolShape
int flags () const override
 
 KisToolShape (KoCanvasBase *canvas, const QCursor &cursor)
 
 ~KisToolShape () override
 
- Public Member Functions inherited from KisToolPaint
 KisToolPaint (KoCanvasBase *canvas, const QCursor &cursor)
 
void mouseMoveEvent (KoPointerEvent *event) override
 
void mousePressEvent (KoPointerEvent *event) override
 
void mouseReleaseEvent (KoPointerEvent *event) override
 
KisPopupWidgetInterfacepopupWidget () override
 
 ~KisToolPaint () override
 
- Public Member Functions inherited from KisTool
virtual bool alternateActionSupportsHiResEvents (AlternateAction action) const
 
virtual void beginAlternateDoubleClickAction (KoPointerEvent *event, AlternateAction action)
 
virtual void beginPrimaryDoubleClickAction (KoPointerEvent *event)
 
void deleteSelection () override
 
bool isActive () const
 
 KisTool (KoCanvasBase *canvas, const QCursor &cursor)
 
void mouseDoubleClickEvent (KoPointerEvent *event) override
 
void mouseTripleClickEvent (KoPointerEvent *event) override
 
virtual void newActivationWithExternalSource (KisPaintDeviceSP externalSource)
 newActivationWithExternalSource Makes sure that the tool is active and starts a new stroke, which will be able to access the pixels from the specified external source.
 
KisTool::NodePaintAbility nodePaintAbility ()
 
virtual bool primaryActionSupportsHiResEvents () const
 
virtual bool supportsPaintingAssistants () const
 
 ~KisTool () override
 
- Public Member Functions inherited from Private
 Private (KisCanvas2 *c)
 
- Public Member Functions inherited from KoToolBase
QAction * action (const QString &name) const
 
KoCanvasBasecanvas () const
 Returns the canvas the tool is working on.
 
virtual void copy () const
 
QCursor cursor () const
 return the last emitted cursor
 
virtual void customMoveEvent (KoPointerEvent *event)
 
virtual void customPressEvent (KoPointerEvent *event)
 
virtual void customReleaseEvent (KoPointerEvent *event)
 
virtual void cut ()
 
virtual QRectF decorationsRect () const
 
int decorationThickness () const
 decorationThickness The minimum thickness for tool decoration lines, this is derived from the screen magnification, thus the HiDPI settings. Note: to use this effectively, also set the pen to isCosmetic(true);
 
virtual void deselect ()
 deselect the tool should clear the selection if it has one.
 
virtual void dragLeaveEvent (QDragLeaveEvent *event)
 
virtual void dragMoveEvent (QDragMoveEvent *event, const QPointF &point)
 
virtual void dropEvent (QDropEvent *event, const QPointF &point)
 
virtual void explicitUserStrokeEndRequest ()
 explicitUserStrokeEndRequest is called by the input manager when the user presses the Enter key or any equivalent key. This callback comes before requestStrokeEnd(), which comes from a different source.
 
KoToolFactoryBasefactory () const
 
virtual void focusInEvent (QFocusEvent *event)
 
virtual void focusOutEvent (QFocusEvent *event)
 
virtual bool hasSelection ()
 
virtual void inputMethodEvent (QInputMethodEvent *event)
 
virtual QVariant inputMethodQuery (Qt::InputMethodQuery query) const
 
bool isInTextMode () const
 
bool isOpacityPresetMode () const
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void keyReleaseEvent (QKeyEvent *event)
 
 KoToolBase (KoCanvasBase *canvas)
 
bool maskSyntheticEvents () const
 
QList< QPointer< QWidget > > optionWidgets ()
 
virtual bool paste ()
 
virtual QMenu * popupActionsMenu ()
 
virtual bool selectAll ()
 selectAll select all data the tool can select.
 
virtual KoToolSelectionselection ()
 
Q_INVOKABLE QString toolId () const
 
virtual bool wantsAutoScroll () const
 
 ~KoToolBase () override
 

Protected Slots

void resetCursorStyle () override
 
void updateSettings ()
 
- Protected Slots inherited from KisTool
virtual void resetCursorStyle ()
 

Protected Member Functions

virtual void finishStroke (const QPainterPath &stroke)=0
 
KisOptimizedBrushOutline getOutlinePath (const QPointF &documentPos, const KoPointerEvent *event, KisPaintOpSettings::OutlineMode outlineMode) override
 
- Protected Member Functions inherited from KisToolShape
void addPathShape (KoPathShape *pathShape, const KUndo2MagicString &name)
 
void addShape (KoShape *shape)
 
virtual void beginShape ()
 
QWidget * createOptionWidget () override
 
qreal currentStrokeWidth () const
 
virtual void endShape ()
 
KisToolShapeUtils::FillStyle fillStyle ()
 
QTransform fillTransform ()
 
ShapeAddInfo shouldAddShape (KisNodeSP currentNode) const
 
KisToolShapeUtils::StrokeStyle strokeStyle ()
 
- Protected Member Functions inherited from KisToolPaint
void activateAlternateAction (AlternateAction action) override
 
void activatePrimaryAction () override
 
void addOptionWidgetLayout (QLayout *layout)
 Add the tool-specific layout to the default option widget layout.
 
virtual void addOptionWidgetOption (QWidget *control, QWidget *label=nullptr)
 Add a widget and a label to the current option widget layout.
 
void beginAlternateAction (KoPointerEvent *event, AlternateAction action) override
 
void canvasResourceChanged (int key, const QVariant &v) override
 
void continueAlternateAction (KoPointerEvent *event, AlternateAction action) override
 
void deactivateAlternateAction (AlternateAction action) override
 
void deactivatePrimaryAction () override
 
void enableControl (QWidget *control, bool value)
 
void endAlternateAction (KoPointerEvent *event, AlternateAction action) override
 
bool isEraser () const
 
bool isOutlineEnabled () const
 
bool isOutlineVisible () const
 
void paint (QPainter &gc, const KoViewConverter &converter) override
 
virtual QString quickHelp () const
 
virtual void requestUpdateOutline (const QPointF &outlineDocPoint, const KoPointerEvent *event)
 
void setMode (ToolMode mode) override
 
void setOutlineEnabled (bool enabled)
 
void setOutlineVisible (bool visible)
 
void setSupportOutline (bool supportOutline)
 
void showControl (QWidget *control, bool value)
 
- Protected Member Functions inherited from KisTool
bool blockUntilOperationsFinished ()
 
void blockUntilOperationsFinishedForced ()
 
QPointF convertDocumentToWidget (const QPointF &pt)
 
QPoint convertToImagePixelCoordFloored (KoPointerEvent *e)
 
QPointF convertToPixelCoord (const QPointF &pt)
 
QPointF convertToPixelCoord (KoPointerEvent *e)
 
QPointF convertToPixelCoordAndAlignOnWidget (const QPointF &pt)
 
QPointF convertToPixelCoordAndSnap (const QPointF &pt, const QPointF &offset=QPointF())
 
QPointF convertToPixelCoordAndSnap (KoPointerEvent *e, const QPointF &offset=QPointF(), bool useModifiers=true)
 
QRectF convertToPt (const QRectF &rect)
 
qreal convertToPt (qreal value)
 
KoColor currentBgColor ()
 
KoColor currentFgColor ()
 
KisFilterConfigurationSP currentGenerator ()
 
KoAbstractGradientSP currentGradient ()
 
KisImageWSP currentImage ()
 
KisNodeSP currentNode () const
 
KisPaintOpPresetSP currentPaintOpPreset ()
 
KoPatternSP currentPattern ()
 
QCursor cursor () const
 
KisImageWSP image () const
 
virtual bool listeningToModifiers ()
 
virtual void listenToModifiers (bool listen)
 
virtual ToolMode mode () const
 
bool nodeEditable ()
 Checks checks if the current node is editable.
 
bool overrideCursorIfNotEditable ()
 Override the cursor appropriately if current node is not editable.
 
void paintToolOutline (QPainter *painter, const KisOptimizedBrushOutline &path)
 
KisOptimizedBrushOutline pixelToView (const KisOptimizedBrushOutline &path) const
 
QPainterPath pixelToView (const QPainterPath &pixelPath) const
 Convert a pixel path into a view path.
 
QPointF pixelToView (const QPoint &pixelCoord) const
 
QPointF pixelToView (const QPointF &pixelCoord) const
 Convert a floating point pixel coordinate into a view coordinate.
 
QPolygonF pixelToView (const QPolygonF &pixelPolygon) const
 Convert a pixel polygon into a view path.
 
QRectF pixelToView (const QRectF &pixelRect) const
 Convert a pixel rectangle into a view rectangle.
 
KisNodeList selectedNodes () const
 
bool selectionEditable ()
 Checks checks if the selection is editable, only applies to local selection as global selection is always editable.
 
void setCursor (const QCursor &cursor)
 
void updateCanvasPixelRect (const QRectF &pixelRect)
 Update the canvas for the given rectangle in image pixel coordinates.
 
void updateCanvasViewRect (const QRectF &viewRect)
 Update the canvas for the given rectangle in view coordinates.
 
QPointF viewToPixel (const QPointF &viewCoord) const
 
QPointF widgetCenterInWidgetPixels ()
 
- Protected Member Functions inherited from KoToolBase
virtual QList< QPointer< QWidget > > createOptionWidgets ()
 
int grabSensitivity () const
 Convenience function to get the current grab sensitivity.
 
qreal handleDocRadius () const
 
QRectF handleGrabRect (const QPointF &position) const
 
QRectF handlePaintRect (const QPointF &position) const
 
int handleRadius () const
 Convenience function to get the current handle radius.
 
bool isActivated () const
 
 KoToolBase (KoToolBasePrivate &dd)
 
KoPointerEventlastDeliveredPointerEvent () const
 
void setAbstractResource (KoAbstractCanvasResourceInterfaceSP abstractResource)
 
void setConverter (KoDerivedResourceConverterSP converter)
 
void setIsOpacityPresetMode (bool value)
 
void setMaskSyntheticEvents (bool value)
 
void setTextMode (bool value)
 
QHash< int, KoAbstractCanvasResourceInterfaceSPtoolAbstractResources ()
 
QHash< int, KoDerivedResourceConverterSPtoolConverters ()
 
void useCursor (const QCursor &cursor)
 

Private Slots

void updatePreviewColor ()
 

Private Member Functions

QPainterPath generateSegment (const QPointF &point1, qreal radius1, const QPointF &point2, qreal radius2) const
 
void update (const QRectF &strokeSegmentRect)
 

Private Attributes

QPointF m_changeSizeInitialGestureDocPoint
 
QPoint m_changeSizeInitialGestureGlobalPoint
 
QPointF m_changeSizeLastDocumentPoint
 
qreal m_changeSizeLastPaintOpSize {0.0}
 
KoColorDisplayRendererInterfacem_displayRenderer
 
bool m_forceAlwaysFullSizedOutline {true}
 
QPointF m_lastPosition
 
qreal m_lastPressure {1.0}
 
OutlineStyle m_outlineStyle {OUTLINE_FULL}
 
QPainterPath m_path
 
QVector< qreal > m_pressureSamples
 
QColor m_previewColor
 
bool m_showOutlineWhilePainting {true}
 
ToolType m_type {PAINT}
 

Static Private Attributes

static constexpr int feedbackLineWidth {2}
 
static constexpr int levelOfPressureResolution = 1024
 

Additional Inherited Members

- Signals inherited from KisToolPaint
void sigPaintingFinished ()
 
- Signals inherited from KisTool
void isActiveChanged (bool isActivated)
 
- Signals inherited from KoToolBase
void activateTool (const QString &id)
 
void cursorChanged (const QCursor &cursor)
 
void selectionChanged (bool hasSelection)
 
void statusTextChanged (const QString &statusText)
 
void textModeChanged (bool inTextMode)
 
- Static Public Member Functions inherited from KisTool
static AlternateAction actionToAlternateAction (ToolAction action)
 
- Public Attributes inherited from KisToolShape
WdgGeometryOptionsm_shapeOptionsWidget
 
- Public Attributes inherited from KisTool
KoColor currentBgColor
 
float currentExposure {1.0}
 
KoColor currentFgColor
 
KisFilterConfigurationSP currentGenerator
 
KoAbstractGradientSP currentGradient
 
KoPatternSP currentPattern
 
QCursor cursor
 
bool m_isActive {false}
 
ToolMode m_mode {HOVER_MODE}
 
QWidget * optionWidget {0}
 
- Public Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 
- Protected Types inherited from KisTool
enum  ToolMode : int {
  HOVER_MODE , PAINT_MODE , SECONDARY_PAINT_MODE , MIRROR_AXIS_SETUP_MODE ,
  GESTURE_MODE , PAN_MODE , OTHER , OTHER_1
}
 
- Protected Attributes inherited from KisToolShape
KConfigGroup m_configGroup
 
- Protected Attributes inherited from KisToolPaint
KisOptimizedBrushOutline m_currentOutline
 
QRectF m_oldColorPreviewUpdateRect
 
QRectF m_oldOutlineRect
 
QPointF m_outlineDocPoint
 
bool m_paintOutline {false}
 
- Protected Attributes inherited from KoToolBase
KoToolBasePrivated_ptr
 
- Properties inherited from KisTool
bool isActive
 

Detailed Description

Definition at line 15 of file KisToolBasicBrushBase.h.

Member Enumeration Documentation

◆ ToolType

Enumerator
PAINT 
SELECT 

Definition at line 20 of file KisToolBasicBrushBase.h.

Constructor & Destructor Documentation

◆ KisToolBasicBrushBase()

KisToolBasicBrushBase::KisToolBasicBrushBase ( KoCanvasBase * canvas,
ToolType type,
const QCursor & cursor = KisCursor::loadWithSize("tool_outline_selection_cursor.svg", 32, 32, 5, 5) )

Definition at line 26 of file KisToolBasicBrushBase.cpp.

28 , m_type(type)
29 , m_previewColor(0, 255, 0, 128)
31{
33 connect(KisConfigNotifier::instance(), SIGNAL(configChanged()), SLOT(updateSettings()));
34 connect(m_displayRenderer, SIGNAL(displayConfigurationChanged), this, SLOT(updatePreviewColor()));
37}
KoColorDisplayRendererInterface * displayRendererInterface() const override
displayRendererInterface The display renderer interface has a number of color conversion functions wh...
static KisConfigNotifier * instance()
KoColorDisplayRendererInterface * m_displayRenderer
void setSupportOutline(bool supportOutline)
KisToolShape(KoCanvasBase *canvas, const QCursor &cursor)
QCursor cursor
Definition kis_tool.cc:64
KisCanvas2 * canvas

References KisConfigNotifier::instance(), m_displayRenderer, KisToolPaint::setSupportOutline(), updatePreviewColor(), and updateSettings().

◆ ~KisToolBasicBrushBase()

KisToolBasicBrushBase::~KisToolBasicBrushBase ( )
override

Definition at line 39 of file KisToolBasicBrushBase.cpp.

40{}

Member Function Documentation

◆ activate

void KisToolBasicBrushBase::activate ( const QSet< KoShape * > & shapes)
overrideslot

Definition at line 285 of file KisToolBasicBrushBase.cpp.

286{
287 m_lastPressure = 1.0;
288
290}
void activate(const QSet< KoShape * > &shapes) override

References KisToolShape::activate(), and m_lastPressure.

◆ activateAlternateAction()

void KisToolBasicBrushBase::activateAlternateAction ( AlternateAction action)
overridevirtual

Reimplemented from KisTool.

Definition at line 128 of file KisToolBasicBrushBase.cpp.

129{
130 if (action != ChangeSize && action != ChangeSizeSnap) {
132 return;
133 }
134
136 setOutlineVisible(true);
137}
static QCursor blankCursor()
Definition kis_cursor.cc:89
void setOutlineVisible(bool visible)
void useCursor(const QCursor &cursor)
QAction * action(const QString &name) const
virtual void activateAlternateAction(AlternateAction action)
Definition kis_tool.cc:456
@ ChangeSizeSnap
Definition kis_tool.h:136
@ ChangeSize
Definition kis_tool.h:135

References KoToolBase::action(), KisTool::activateAlternateAction(), KisCursor::blankCursor(), KisTool::ChangeSize, KisTool::ChangeSizeSnap, KisToolPaint::setOutlineVisible(), and KoToolBase::useCursor().

◆ beginAlternateAction()

void KisToolBasicBrushBase::beginAlternateAction ( KoPointerEvent * event,
AlternateAction action )
overridevirtual

Reimplemented from KisTool.

Definition at line 150 of file KisToolBasicBrushBase.cpp.

151{
152 if (action != ChangeSize && action != ChangeSizeSnap) {
154 return;
155 }
156
160
161 m_changeSizeLastDocumentPoint = event->point;
162 m_changeSizeLastPaintOpSize = currentPaintOpPreset()->settings()->paintOpSize();
163}
void setMode(ToolMode mode) override
KisPaintOpPresetSP currentPaintOpPreset()
Definition kis_tool.cc:359
@ GESTURE_MODE
Definition kis_tool.h:303
virtual void beginAlternateAction(KoPointerEvent *event, AlternateAction action)
Definition kis_tool.cc:466

References KoToolBase::action(), KisTool::beginAlternateAction(), KisTool::ChangeSize, KisTool::ChangeSizeSnap, KisTool::currentPaintOpPreset(), KisTool::GESTURE_MODE, m_changeSizeInitialGestureDocPoint, m_changeSizeInitialGestureGlobalPoint, m_changeSizeLastDocumentPoint, m_changeSizeLastPaintOpSize, and KisToolPaint::setMode().

◆ beginPrimaryAction()

void KisToolBasicBrushBase::beginPrimaryAction ( KoPointerEvent * event)
overridevirtual

Called by KisToolProxy when a primary action for the tool is started. The event stores the original event that started the stroke. The event is accepted by default. If the tool decides to ignore this particular action (e.g. when the node is not editable), it should call event->ignore(). Then no further continuePrimaryAction() or endPrimaryAction() will be called until the next user action.

Reimplemented from KisTool.

Definition at line 62 of file KisToolBasicBrushBase.cpp.

63{
64 NodePaintAbility paintability = nodePaintAbility();
65 if ((m_type == PAINT && (!nodeEditable() || paintability == UNPAINTABLE || paintability == KisToolPaint::CLONE || paintability == KisToolPaint::MYPAINTBRUSH_UNPAINTABLE)) || (m_type == SELECT && !selectionEditable())) {
66
67 if (paintability == KisToolPaint::CLONE){
68 KisCanvas2 * kiscanvas = static_cast<KisCanvas2*>(canvas());
69 QString message = i18n("This tool cannot paint on clone layers. Please select a paint or vector layer or mask.");
70 kiscanvas->viewManager()->showFloatingMessage(message, koIcon("object-locked"));
71 }
72
73 if (paintability == KisToolPaint::MYPAINTBRUSH_UNPAINTABLE) {
74 KisCanvas2 * kiscanvas = static_cast<KisCanvas2*>(canvas());
75 QString message = i18n("The MyPaint Brush Engine is not available for this colorspace");
76 kiscanvas->viewManager()->showFloatingMessage(message, koIcon("object-locked"));
77 }
78
79 event->ignore();
80 return;
81 }
82
84
85 beginShape();
86
87 const QPointF position = convertToPixelCoord(event);
88 const qreal pressure = pressureToCurve(event->pressure());
89 const qreal radius = pressure * currentPaintOpPreset()->settings()->paintOpSize() / 2.0;
90 m_path = QPainterPath(position);
91 m_path.setFillRule(Qt::WindingFill);
92 m_path.addEllipse(position, radius, radius);
93
94 m_lastPosition = position;
95 m_lastPressure = pressure;
96
97 update(m_path.boundingRect());
98}
KisViewManager * viewManager() const
void update(const QRectF &strokeSegmentRect)
qreal pressureToCurve(qreal pressure)
virtual void beginShape()
void showFloatingMessage(const QString &message, const QIcon &icon, int timeout=4500, KisFloatingMessage::Priority priority=KisFloatingMessage::Medium, int alignment=Qt::AlignCenter|Qt::TextWordWrap)
shows a floating message in the top right corner of the canvas
qreal pressure() const
#define koIcon(name)
Use these macros for icons without any issues.
Definition kis_icon.h:25
QPointF convertToPixelCoord(KoPointerEvent *e)
Definition kis_tool.cc:189
KisTool::NodePaintAbility nodePaintAbility()
Definition kis_tool.cc:539
bool nodeEditable()
Checks checks if the current node is editable.
Definition kis_tool.cc:651
@ PAINT_MODE
Definition kis_tool.h:300
bool selectionEditable()
Checks checks if the selection is editable, only applies to local selection as global selection is al...
Definition kis_tool.cc:685
NodePaintAbility
Definition kis_tool.h:148
@ MYPAINTBRUSH_UNPAINTABLE
Definition kis_tool.h:153
@ UNPAINTABLE
Definition kis_tool.h:152

References KisToolShape::beginShape(), Private::canvas, KisTool::CLONE, KisTool::convertToPixelCoord(), KisTool::currentPaintOpPreset(), koIcon, m_lastPosition, m_lastPressure, m_path, m_type, KisTool::MYPAINTBRUSH_UNPAINTABLE, KisTool::nodeEditable(), KisTool::nodePaintAbility(), PAINT, KisTool::PAINT_MODE, KoPointerEvent::pressure(), pressureToCurve(), SELECT, KisTool::selectionEditable(), KisToolPaint::setMode(), KisViewManager::showFloatingMessage(), KisTool::UNPAINTABLE, update(), and KisCanvas2::viewManager().

◆ continueAlternateAction()

void KisToolBasicBrushBase::continueAlternateAction ( KoPointerEvent * event,
AlternateAction action )
overridevirtual

Reimplemented from KisTool.

Definition at line 165 of file KisToolBasicBrushBase.cpp.

166{
167 if (action != ChangeSize && action != ChangeSizeSnap) {
169 return;
170 }
171
172 QPointF lastWidgetPosition = convertDocumentToWidget(m_changeSizeLastDocumentPoint);
173 QPointF actualWidgetPosition = convertDocumentToWidget(event->point);
174
175 QPointF offset = actualWidgetPosition - lastWidgetPosition;
176
177 KisCanvas2 *canvas2 = dynamic_cast<KisCanvas2 *>(canvas());
178 KIS_ASSERT(canvas2);
179 QRect screenRect = QGuiApplication::primaryScreen()->availableVirtualGeometry();
180
181 qreal scaleX = 0;
182 qreal scaleY = 0;
183 canvas2->coordinatesConverter()->imageScale(&scaleX, &scaleY);
184
185 const qreal maxBrushSize = KisImageConfig(true).maxBrushSize();
186 const qreal effectiveMaxDragSize = 0.5 * screenRect.width();
187 const qreal effectiveMaxBrushSize = qMin(maxBrushSize, effectiveMaxDragSize / scaleX);
188
189 const qreal scaleCoeff = effectiveMaxBrushSize / effectiveMaxDragSize;
190 const qreal sizeDiff = scaleCoeff * offset.x() ;
191
192 if (qAbs(sizeDiff) > 0.01) {
193 KisPaintOpSettingsSP settings = currentPaintOpPreset()->settings();
194
195 qreal newSize = m_changeSizeLastPaintOpSize + sizeDiff;
196
197 if (action == ChangeSizeSnap) {
198 newSize = qMax(qRound(newSize), 1);
199 }
200
201 newSize = qBound(0.01, newSize, maxBrushSize);
202
203 settings->setPaintOpSize(newSize);
204
206
207 m_changeSizeLastDocumentPoint = event->point;
209 }
210}
KisCoordinatesConverter * coordinatesConverter
void imageScale(qreal *scaleX, qreal *scaleY) const
int maxBrushSize(bool defaultValue=false) const
virtual void requestUpdateOutline(const QPointF &outlineDocPoint, const KoPointerEvent *event)
QPointF point
The point in document coordinates.
#define KIS_ASSERT(cond)
Definition kis_assert.h:33
virtual void continueAlternateAction(KoPointerEvent *event, AlternateAction action)
Definition kis_tool.cc:477
QPointF convertDocumentToWidget(const QPointF &pt)
Definition kis_tool.cc:181

References KoToolBase::action(), Private::canvas, KisTool::ChangeSize, KisTool::ChangeSizeSnap, KisTool::continueAlternateAction(), KisTool::convertDocumentToWidget(), KisCanvas2::coordinatesConverter, KisTool::currentPaintOpPreset(), KisCoordinatesConverter::imageScale(), KIS_ASSERT, m_changeSizeInitialGestureDocPoint, m_changeSizeLastDocumentPoint, m_changeSizeLastPaintOpSize, KisImageConfig::maxBrushSize(), KoPointerEvent::point, and KisToolPaint::requestUpdateOutline().

◆ continuePrimaryAction()

void KisToolBasicBrushBase::continuePrimaryAction ( KoPointerEvent * event)
overridevirtual

Called by KisToolProxy when the primary action is in progress of pointer movement. If the tool has ignored the event in beginPrimaryAction(), this method will not be called.

Reimplemented from KisTool.

Definition at line 100 of file KisToolBasicBrushBase.cpp.

101{
103
104 const QPointF position = convertToPixelCoord(event);
105 const qreal pressure = pressureToCurve(event->pressure());
106 const qreal brushRadius = currentPaintOpPreset()->settings()->paintOpSize() / 2.0;
107 const QPainterPath segment = generateSegment(m_lastPosition, m_lastPressure * brushRadius, position, pressure * brushRadius);
108 m_path.addPath(segment);
109
110 m_lastPosition = position;
111 m_lastPressure = pressure;
112
113 requestUpdateOutline(event->point, event);
114 update(segment.boundingRect());
115}
QPainterPath generateSegment(const QPointF &point1, qreal radius1, const QPointF &point2, qreal radius2) const
#define CHECK_MODE_SANITY_OR_RETURN(_mode)
Definition kis_tool.h:27

References CHECK_MODE_SANITY_OR_RETURN, KisTool::convertToPixelCoord(), KisTool::currentPaintOpPreset(), generateSegment(), m_lastPosition, m_lastPressure, m_path, KisTool::PAINT_MODE, KoPointerEvent::point, KoPointerEvent::pressure(), pressureToCurve(), KisToolPaint::requestUpdateOutline(), and update().

◆ deactivate

void KisToolBasicBrushBase::deactivate ( )
overrideslot

Definition at line 292 of file KisToolBasicBrushBase.cpp.

293{
294 KisCanvas2 * kisCanvas = dynamic_cast<KisCanvas2*>(canvas());
295 KIS_ASSERT_RECOVER_RETURN(kisCanvas);
296 kisCanvas->updateCanvas();
297
299}
void updateCanvas(const QRectF &rc) override
virtual void deactivate()
#define KIS_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:75

References Private::canvas, KoToolBase::deactivate(), KIS_ASSERT_RECOVER_RETURN, and KisCanvas2::updateCanvas().

◆ deactivateAlternateAction()

void KisToolBasicBrushBase::deactivateAlternateAction ( AlternateAction action)
overridevirtual

Reimplemented from KisTool.

Definition at line 139 of file KisToolBasicBrushBase.cpp.

140{
141 if (action != ChangeSize && action != ChangeSizeSnap) {
143 return;
144 }
145
147 setOutlineVisible(false);
148}
virtual void deactivateAlternateAction(AlternateAction action)
Definition kis_tool.cc:461

References KoToolBase::action(), KisTool::ChangeSize, KisTool::ChangeSizeSnap, KisTool::deactivateAlternateAction(), resetCursorStyle(), and KisToolPaint::setOutlineVisible().

◆ endAlternateAction()

void KisToolBasicBrushBase::endAlternateAction ( KoPointerEvent * event,
AlternateAction action )
overridevirtual

◆ endPrimaryAction()

void KisToolBasicBrushBase::endPrimaryAction ( KoPointerEvent * event)
overridevirtual

Called by KisToolProxy when the primary action is being finished, that is while mouseRelease or tabletRelease event. If the tool has ignored the event in beginPrimaryAction(), this method will not be called.

Reimplemented from KisTool.

Definition at line 117 of file KisToolBasicBrushBase.cpp.

118{
119 Q_UNUSED(event);
120
123
124 endShape();
126}
virtual void finishStroke(const QPainterPath &stroke)=0
virtual void endShape()

References CHECK_MODE_SANITY_OR_RETURN, KisToolShape::endShape(), finishStroke(), KisTool::HOVER_MODE, m_path, KisTool::PAINT_MODE, and KisToolPaint::setMode().

◆ finishStroke()

virtual void KisToolBasicBrushBase::finishStroke ( const QPainterPath & stroke)
protectedpure virtual

Implemented in KisBrushEnclosingProducer.

◆ generateSegment()

QPainterPath KisToolBasicBrushBase::generateSegment ( const QPointF & point1,
qreal radius1,
const QPointF & point2,
qreal radius2 ) const
private

Definition at line 353 of file KisToolBasicBrushBase.cpp.

354{
355 const QPointF &p1 = radius1 < radius2 ? point2 : point1;
356 const QPointF &p2 = radius1 < radius2 ? point1 : point2;
357 const qreal &r1 = radius1 < radius2 ? radius2 : radius1;
358 const qreal &r2 = radius1 < radius2 ? radius1 : radius2;
359 const QPointF deltaP1P2 = p2 - p1;
360 const qreal deltaR1R2 = r1 - r2;
361 QPointF tangentPointP11, tangentPointP12, tangentPointP21, tangentPointP22;
362
363 if (qFuzzyIsNull(deltaR1R2)) {
364 // Same radius case
365 const qreal deltaP1P2Length = std::sqrt(deltaP1P2.x() * deltaP1P2.x() + deltaP1P2.y() * deltaP1P2.y());
366 const QPointF deltaP1P2Normalized = deltaP1P2 / deltaP1P2Length;
367 tangentPointP11 = p1 + QPointF(deltaP1P2Normalized.y(), -deltaP1P2Normalized.x()) * r1;
368 tangentPointP12 = p1 + QPointF(-deltaP1P2Normalized.y(), deltaP1P2Normalized.x()) * r1;
369 tangentPointP21 = p2 + QPointF(deltaP1P2Normalized.y(), -deltaP1P2Normalized.x()) * r2;
370 tangentPointP22 = p2 + QPointF(-deltaP1P2Normalized.y(), deltaP1P2Normalized.x()) * r2;
371 } else {
372 // General case
373 const QPointF tangentIntersectionPoint(
374 (p2.x() * r1 - p1.x() * r2) / deltaR1R2,
375 (p2.y() * r1 - p1.y() * r2) / deltaR1R2
376 );
377 auto f = [](qreal t1, qreal t2, qreal t3, qreal t4, qreal sign) -> qreal
378 {
379 return (t1 + sign * t2) / t3 + t4;
380 };
381 {
382 const qreal r1Squared = r1 * r1;
383 const QPointF deltaP1TangentIntersectionPoint = tangentIntersectionPoint - p1;
384 const qreal deltaP1TangentIntersectionPointLengthSquared =
385 deltaP1TangentIntersectionPoint.x() * deltaP1TangentIntersectionPoint.x() +
386 deltaP1TangentIntersectionPoint.y() * deltaP1TangentIntersectionPoint.y();
387 const QPointF t11 = r1Squared * deltaP1TangentIntersectionPoint;
388 const QPointF t12 = r1 * deltaP1TangentIntersectionPoint * std::sqrt(deltaP1TangentIntersectionPointLengthSquared - r1Squared);
389 tangentPointP11 = QPointF(
390 f(t11.x(), t12.y(), deltaP1TangentIntersectionPointLengthSquared, p1.x(), 1.0),
391 f(t11.y(), t12.x(), deltaP1TangentIntersectionPointLengthSquared, p1.y(), -1.0)
392 );
393 tangentPointP12 = QPointF(
394 f(t11.x(), t12.y(), deltaP1TangentIntersectionPointLengthSquared, p1.x(), -1.0),
395 f(t11.y(), t12.x(), deltaP1TangentIntersectionPointLengthSquared, p1.y(), 1.0)
396 );
397 }
398 {
399 const qreal r2Squared = r2 * r2;
400 const QPointF deltaP2TangentIntersectionPoint = tangentIntersectionPoint - p2;
401 const qreal deltaP2TangentIntersectionPointLengthSquared =
402 deltaP2TangentIntersectionPoint.x() * deltaP2TangentIntersectionPoint.x() +
403 deltaP2TangentIntersectionPoint.y() * deltaP2TangentIntersectionPoint.y();
404 const QPointF t11 = r2Squared * deltaP2TangentIntersectionPoint;
405 const QPointF t12 = r2 * deltaP2TangentIntersectionPoint * std::sqrt(deltaP2TangentIntersectionPointLengthSquared - r2Squared);
406 tangentPointP21 = QPointF(
407 f(t11.x(), t12.y(), deltaP2TangentIntersectionPointLengthSquared, p2.x(), 1.0),
408 f(t11.y(), t12.x(), deltaP2TangentIntersectionPointLengthSquared, p2.y(), -1.0)
409 );
410 tangentPointP22 = QPointF(
411 f(t11.x(), t12.y(), deltaP2TangentIntersectionPointLengthSquared, p2.x(), -1.0),
412 f(t11.y(), t12.x(), deltaP2TangentIntersectionPointLengthSquared, p2.y(), 1.0)
413 );
414 }
415 }
416
417 QPainterPath path;
418 path.setFillRule(Qt::WindingFill);
419 path.moveTo(tangentPointP11);
420 path.lineTo(tangentPointP21);
421 path.lineTo(tangentPointP22);
422 path.lineTo(tangentPointP12);
423 path.closeSubpath();
424 path.addEllipse(point2, radius2, radius2);
425 return path;
426}
QPointF r2
QPointF r1
QPointF p2
QPointF p1
static bool qFuzzyIsNull(half h)

References p1, p2, qFuzzyIsNull(), r1, r2, and sign().

◆ getOutlinePath()

KisOptimizedBrushOutline KisToolBasicBrushBase::getOutlinePath ( const QPointF & documentPos,
const KoPointerEvent * event,
KisPaintOpSettings::OutlineMode outlineMode )
overrideprotectedvirtual

Reimplemented from KisToolPaint.

Definition at line 258 of file KisToolBasicBrushBase.cpp.

261{
262 Q_UNUSED(documentPos);
263 Q_UNUSED(event);
264
265 if (!outlineMode.isVisible) {
266 return {};
267 }
268 const qreal radius =
269 mode() != KisTool::PAINT_MODE || outlineMode.forceFullSize
270 ? currentPaintOpPreset()->settings()->paintOpSize() / 2.0
271 : m_lastPressure * currentPaintOpPreset()->settings()->paintOpSize() / 2.0;
272 QPainterPath outline;
273 outline.addEllipse(m_lastPosition, radius, radius);
274 return outline;
275}
virtual ToolMode mode() const
Definition kis_tool.cc:407

References KisTool::currentPaintOpPreset(), KisPaintOpSettings::OutlineMode::forceFullSize, KisPaintOpSettings::OutlineMode::isVisible, m_lastPosition, m_lastPressure, KisTool::mode(), and KisTool::PAINT_MODE.

◆ mouseMoveEvent()

void KisToolBasicBrushBase::mouseMoveEvent ( KoPointerEvent * event)
overridevirtual

Called when the mouse or stylus moved over the canvas. Implementors should call event->ignore() if they do not actually use the event.

Parameters
eventstate and reason of this mouse or stylus move

Reimplemented from KisTool.

Definition at line 54 of file KisToolBasicBrushBase.cpp.

55{
56 if (mode() == KisTool::HOVER_MODE) {
58 }
60}
virtual void mouseMoveEvent(KoPointerEvent *event)=0

References KisTool::convertToPixelCoord(), KisTool::HOVER_MODE, m_lastPosition, KisTool::mode(), and KoToolBase::mouseMoveEvent().

◆ paint()

void KisToolBasicBrushBase::paint ( QPainter & painter,
const KoViewConverter & converter )
overridevirtual

Called by the canvas to paint any decorations that the tool deems needed. The painter has the top left of the canvas as its origin.

Parameters
painterused for painting the shape
converterto convert between internal and view coordinates.

Implements KoToolBase.

Definition at line 277 of file KisToolBasicBrushBase.cpp.

278{
279 if (mode() == KisTool::PAINT_MODE) {
280 gc.fillPath(pixelToView(m_path), m_previewColor);
281 }
282 KisToolShape::paint(gc, converter);
283}
virtual void paint(QPainter &painter, const KoViewConverter &converter)=0
QPointF pixelToView(const QPoint &pixelCoord) const
Definition kis_tool.cc:269

References m_path, m_previewColor, KisTool::mode(), KoToolBase::paint(), KisTool::PAINT_MODE, and KisTool::pixelToView().

◆ pressureToCurve()

qreal KisToolBasicBrushBase::pressureToCurve ( qreal pressure)

Definition at line 348 of file KisToolBasicBrushBase.cpp.

349{
351}
QVector< qreal > m_pressureSamples
static qreal interpolateLinear(qreal normalizedValue, const QVector< qreal > &transfer)

References KisCubicCurve::interpolateLinear(), and m_pressureSamples.

◆ resetCursorStyle

void KisToolBasicBrushBase::resetCursorStyle ( )
overrideprotectedslot

Definition at line 306 of file KisToolBasicBrushBase.cpp.

307{
308 KisConfig cfg(true);
309
310 switch (cfg.newCursorStyle()) {
313 break;
316 break;
319 break;
322 break;
325 break;
328 break;
331 break;
334 break;
336 default:
338 break;
339 }
340}
static QCursor pixelBlackCursor()
Definition kis_cursor.cc:44
static QCursor crossCursor()
Definition kis_cursor.cc:34
static QCursor triangleRightHandedCursor()
static QCursor arrowCursor()
Definition kis_cursor.cc:24
static QCursor triangleLeftHandedCursor()
static QCursor roundCursor()
Definition kis_cursor.cc:39
static QCursor pixelWhiteCursor()
Definition kis_cursor.cc:49
@ CURSOR_STYLE_POINTER
Definition kis_global.h:65
@ CURSOR_STYLE_SMALL_ROUND
Definition kis_global.h:66
@ CURSOR_STYLE_CROSSHAIR
Definition kis_global.h:67
@ CURSOR_STYLE_TOOLICON
Definition kis_global.h:64
@ CURSOR_STYLE_TRIANGLE_RIGHTHANDED
Definition kis_global.h:68
@ CURSOR_STYLE_WHITE_PIXEL
Definition kis_global.h:71
@ CURSOR_STYLE_BLACK_PIXEL
Definition kis_global.h:70
@ CURSOR_STYLE_TRIANGLE_LEFTHANDED
Definition kis_global.h:69
@ CURSOR_STYLE_NO_CURSOR
Definition kis_global.h:63
virtual void resetCursorStyle()
Definition kis_tool.cc:613

References KisCursor::arrowCursor(), KisCursor::blankCursor(), KisCursor::crossCursor(), CURSOR_STYLE_BLACK_PIXEL, CURSOR_STYLE_CROSSHAIR, CURSOR_STYLE_NO_CURSOR, CURSOR_STYLE_POINTER, CURSOR_STYLE_SMALL_ROUND, CURSOR_STYLE_TOOLICON, CURSOR_STYLE_TRIANGLE_LEFTHANDED, CURSOR_STYLE_TRIANGLE_RIGHTHANDED, CURSOR_STYLE_WHITE_PIXEL, KisConfig::newCursorStyle(), KisCursor::pixelBlackCursor(), KisCursor::pixelWhiteCursor(), KisTool::resetCursorStyle(), KisCursor::roundCursor(), KisCursor::triangleLeftHandedCursor(), KisCursor::triangleRightHandedCursor(), and KoToolBase::useCursor().

◆ setPreviewColor

void KisToolBasicBrushBase::setPreviewColor ( const QColor & color)
slot

Definition at line 301 of file KisToolBasicBrushBase.cpp.

302{
303 m_previewColor = color;
304}

References m_previewColor.

◆ update()

void KisToolBasicBrushBase::update ( const QRectF & strokeSegmentRect)
private

Definition at line 225 of file KisToolBasicBrushBase.cpp.

226{
227 QRectF segmentRect;
228 QRectF outlineRect;
229 // Segment rect
230 if (mode() == KisTool::PAINT_MODE) {
231 if (strokeSegmentRect.isValid()) {
232 segmentRect = kisGrowRect(strokeSegmentRect, feedbackLineWidth);
233 }
234 }
235 // Outline rect
238 const qreal radius =
240 ? currentPaintOpPreset()->settings()->paintOpSize() / 2.0
241 : m_lastPressure * currentPaintOpPreset()->settings()->paintOpSize() / 2.0;
242 outlineRect =
244 QRectF(m_lastPosition - QPointF(radius, radius), m_lastPosition + QPointF(radius, radius)),
246 );
247 }
248 // Update
249 if (segmentRect.isValid() && outlineRect.isValid()) {
250 updateCanvasPixelRect(segmentRect.united(outlineRect));
251 } else if (segmentRect.isValid()) {
252 updateCanvasPixelRect(segmentRect);
253 } else if (outlineRect.isValid()) {
254 updateCanvasPixelRect(outlineRect);
255 }
256}
static constexpr int feedbackLineWidth
@ OUTLINE_NONE
Definition kis_global.h:54
T kisGrowRect(const T &rect, U offset)
Definition kis_global.h:186
void updateCanvasPixelRect(const QRectF &pixelRect)
Update the canvas for the given rectangle in image pixel coordinates.
Definition kis_tool.cc:322

References KisTool::currentPaintOpPreset(), feedbackLineWidth, kisGrowRect(), m_forceAlwaysFullSizedOutline, m_lastPosition, m_lastPressure, m_outlineStyle, m_showOutlineWhilePainting, KisTool::mode(), OUTLINE_NONE, KisTool::PAINT_MODE, and KisTool::updateCanvasPixelRect().

◆ updatePreviewColor

void KisToolBasicBrushBase::updatePreviewColor ( )
privateslot

Definition at line 342 of file KisToolBasicBrushBase.cpp.

343{
344 KoColor c(QColor(0, 255, 0, 128), KoColorSpaceRegistry::instance()->rgb8());
346}
virtual QColor convertColorToDisplayColorSpace(const KoColor color) const =0
convertColorToDisplayColorSpace
static KoColorSpaceRegistry * instance()

References KoColorDisplayRendererInterface::convertColorToDisplayColorSpace(), KoColorSpaceRegistry::instance(), m_displayRenderer, and m_previewColor.

◆ updateSettings

void KisToolBasicBrushBase::updateSettings ( )
protectedslot

Definition at line 42 of file KisToolBasicBrushBase.cpp.

43{
44 KisConfig cfg(true);
45 // Pressure curve
46 KisCubicCurve curve(cfg.pressureTabletCurve());
47 m_pressureSamples = curve.floatTransfer(levelOfPressureResolution + 1);
48 // Outline options
49 m_outlineStyle = cfg.newOutlineStyle();
50 m_showOutlineWhilePainting = cfg.showOutlineWhilePainting();
51 m_forceAlwaysFullSizedOutline = cfg.forceAlwaysFullSizedOutline();
52}
static constexpr int levelOfPressureResolution

References KisCubicCurve::floatTransfer(), KisConfig::forceAlwaysFullSizedOutline(), levelOfPressureResolution, m_forceAlwaysFullSizedOutline, m_outlineStyle, m_pressureSamples, m_showOutlineWhilePainting, KisConfig::newOutlineStyle(), KisConfig::pressureTabletCurve(), and KisConfig::showOutlineWhilePainting().

Member Data Documentation

◆ feedbackLineWidth

constexpr int KisToolBasicBrushBase::feedbackLineWidth {2}
staticconstexprprivate

Definition at line 62 of file KisToolBasicBrushBase.h.

62{2};

◆ levelOfPressureResolution

constexpr int KisToolBasicBrushBase::levelOfPressureResolution = 1024
staticconstexprprivate

Definition at line 61 of file KisToolBasicBrushBase.h.

◆ m_changeSizeInitialGestureDocPoint

QPointF KisToolBasicBrushBase::m_changeSizeInitialGestureDocPoint
private

Definition at line 74 of file KisToolBasicBrushBase.h.

◆ m_changeSizeInitialGestureGlobalPoint

QPoint KisToolBasicBrushBase::m_changeSizeInitialGestureGlobalPoint
private

Definition at line 77 of file KisToolBasicBrushBase.h.

◆ m_changeSizeLastDocumentPoint

QPointF KisToolBasicBrushBase::m_changeSizeLastDocumentPoint
private

Definition at line 75 of file KisToolBasicBrushBase.h.

◆ m_changeSizeLastPaintOpSize

qreal KisToolBasicBrushBase::m_changeSizeLastPaintOpSize {0.0}
private

Definition at line 76 of file KisToolBasicBrushBase.h.

76{0.0};

◆ m_displayRenderer

KoColorDisplayRendererInterface* KisToolBasicBrushBase::m_displayRenderer
private

Definition at line 81 of file KisToolBasicBrushBase.h.

◆ m_forceAlwaysFullSizedOutline

bool KisToolBasicBrushBase::m_forceAlwaysFullSizedOutline {true}
private

Definition at line 72 of file KisToolBasicBrushBase.h.

72{true};

◆ m_lastPosition

QPointF KisToolBasicBrushBase::m_lastPosition
private

Definition at line 65 of file KisToolBasicBrushBase.h.

◆ m_lastPressure

qreal KisToolBasicBrushBase::m_lastPressure {1.0}
private

Definition at line 66 of file KisToolBasicBrushBase.h.

66{1.0};

◆ m_outlineStyle

OutlineStyle KisToolBasicBrushBase::m_outlineStyle {OUTLINE_FULL}
private

Definition at line 70 of file KisToolBasicBrushBase.h.

@ OUTLINE_FULL
Definition kis_global.h:56

◆ m_path

QPainterPath KisToolBasicBrushBase::m_path
private

Definition at line 64 of file KisToolBasicBrushBase.h.

◆ m_pressureSamples

QVector<qreal> KisToolBasicBrushBase::m_pressureSamples
private

Definition at line 69 of file KisToolBasicBrushBase.h.

◆ m_previewColor

QColor KisToolBasicBrushBase::m_previewColor
private

Definition at line 79 of file KisToolBasicBrushBase.h.

◆ m_showOutlineWhilePainting

bool KisToolBasicBrushBase::m_showOutlineWhilePainting {true}
private

Definition at line 71 of file KisToolBasicBrushBase.h.

71{true};

◆ m_type

ToolType KisToolBasicBrushBase::m_type {PAINT}
private

Definition at line 67 of file KisToolBasicBrushBase.h.

67{PAINT};

The documentation for this class was generated from the following files: