Krita Source Code Documentation
Loading...
Searching...
No Matches
KisToolFreehand Class Reference

#include <kis_tool_freehand.h>

+ Inheritance diagram for KisToolFreehand:

Public Slots

void activate (const QSet< KoShape * > &shapes) override
 
void deactivate () override
 
- 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

int flags () const override
 
 KisToolFreehand (KoCanvasBase *canvas, const QCursor &cursor, const KUndo2MagicString &transactionText, bool useSavedSmoothing=true)
 
void mouseMoveEvent (KoPointerEvent *event) override
 
 ~KisToolFreehand () override
 
- Public Member Functions inherited from KisToolPaint
int flags () const override
 
 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 ()
 
 ~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 Enter key or any equivalent. 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
 
 ~KoToolBase () override
 

Protected Slots

void explicitUpdateOutline ()
 
void resetCursorStyle () override
 
void setAssistant (bool assistant)
 
void setOnlyOneAssistantSnap (bool assistant)
 
void setSnapEraser (bool assistant)
 
void slotDoResizeBrush (qreal newSize)
 
- Protected Slots inherited from KisTool
virtual void resetCursorStyle ()
 

Protected 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
 
virtual void doStroke (KoPointerEvent *event)
 
void endAlternateAction (KoPointerEvent *event, AlternateAction action) override
 
void endPrimaryAction (KoPointerEvent *event) override
 
virtual void endStroke ()
 
KisOptimizedBrushOutline getOutlinePath (const QPointF &documentPos, const KoPointerEvent *event, KisPaintOpSettings::OutlineMode outlineMode) override
 
virtual void initStroke (KoPointerEvent *event)
 
KisPaintingInformationBuilderpaintingInformationBuilder () const
 
bool primaryActionSupportsHiResEvents () const override
 
void resetHelper (KisToolFreehandHelper *helper)
 
KisSmoothingOptionsSP smoothingOptions () const
 
bool supportsPaintingAssistants () const override
 
bool trySampleByPaintOp (KoPointerEvent *event, AlternateAction action)
 
bool wantsAutoScroll () const override
 
- 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
 
QWidget * createOptionWidget () 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)
 

Protected Attributes

bool m_assistant {false}
 
bool m_eraser_snapping {false}
 
double m_magnetism {1.0}
 
bool m_only_one_assistant {true}
 
- 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
 

Private Slots

void updateMaskSyntheticEventsFromTouch ()
 

Private Member Functions

QPointF adjustPosition (const QPointF &point, const QPointF &strokeBegin)
 
qreal calculatePerspective (const QPointF &documentPoint)
 

Private Attributes

std::optional< KoPointerEventWrapperm_beginAlternateActionEvent
 
KisSignalCompressorWithParam< qreal > m_brushResizeCompressor
 
KisToolFreehandHelperm_helper {nullptr}
 
KisPaintingInformationBuilderm_infoBuilder {nullptr}
 
QPointF m_initialGestureDocPoint
 
QPoint m_initialGestureGlobalPoint
 
QPointF m_lastDocumentPoint
 
qreal m_lastPaintOpSize {0.0}
 
bool m_paintopBasedSamplingInAction {false}
 

Friends

class KisToolFreehandPaintingInformationBuilder
 
class KisView
 
class KisViewManager
 

Additional Inherited Members

- 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
}
 
- 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 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
}
 
- Properties inherited from KisTool
bool isActive
 

Detailed Description

Definition at line 29 of file kis_tool_freehand.h.

Constructor & Destructor Documentation

◆ KisToolFreehand()

KisToolFreehand::KisToolFreehand ( KoCanvasBase * canvas,
const QCursor & cursor,
const KUndo2MagicString & transactionText,
bool useSavedSmoothing = true )

Definition at line 56 of file kis_tool_freehand.cc.

60{
61
64 connect(KisConfigNotifier::instance(), SIGNAL(touchPaintingChanged()),
66
69 new KisSmoothingOptions(useSavedSmoothing));
70
71 connect(m_helper, SIGNAL(requestExplicitUpdateOutline()), SLOT(explicitUpdateOutline()));
72
73 connect(qobject_cast<KisCanvas2*>(canvas)->viewManager(), SIGNAL(brushOutlineToggled()), SLOT(explicitUpdateOutline()));
74
75 KisCanvasResourceProvider *provider = qobject_cast<KisCanvas2*>(canvas)->viewManager()->canvasResourceProvider();
76
77 connect(provider, SIGNAL(sigEffectiveCompositeOpChanged()), SLOT(explicitUpdateOutline()));
78 connect(provider, SIGNAL(sigEffectiveCompositeOpChanged()), SLOT(resetCursorStyle()));
79 connect(provider, SIGNAL(sigPaintOpPresetChanged(KisPaintOpPresetSP)), SLOT(explicitUpdateOutline()));
80 connect(provider, SIGNAL(sigPaintOpPresetChanged(KisPaintOpPresetSP)), SLOT(resetCursorStyle()));
81}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
static KisConfigNotifier * instance()
KisPaintingInformationBuilder * m_infoBuilder
KisToolFreehandHelper * m_helper
friend class KisToolFreehandPaintingInformationBuilder
void slotDoResizeBrush(qreal newSize)
void updateMaskSyntheticEventsFromTouch()
void resetCursorStyle() override
KisSignalCompressorWithParam< qreal > m_brushResizeCompressor
void setSupportOutline(bool supportOutline)
KisToolPaint(KoCanvasBase *canvas, const QCursor &cursor)
QPointer< KoCanvasResourceProvider > resourceManager
QCursor cursor
Definition kis_tool.cc:64
KisCanvas2 * canvas

References Private::canvas, connect(), explicitUpdateOutline(), KisConfigNotifier::instance(), KisToolFreehandPaintingInformationBuilder, m_helper, m_infoBuilder, resetCursorStyle(), KoCanvasBase::resourceManager, KisToolPaint::setSupportOutline(), and updateMaskSyntheticEventsFromTouch().

◆ ~KisToolFreehand()

KisToolFreehand::~KisToolFreehand ( )
override

Definition at line 83 of file kis_tool_freehand.cc.

84{
85 delete m_helper;
86 delete m_infoBuilder;
87}

References m_helper, and m_infoBuilder.

Member Function Documentation

◆ activate

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

Definition at line 163 of file kis_tool_freehand.cc.

164{
166}
void activate(const QSet< KoShape * > &shapes) override

References KisToolPaint::activate().

◆ activateAlternateAction()

void KisToolFreehand::activateAlternateAction ( AlternateAction action)
overrideprotectedvirtual

Reimplemented from KisTool.

Reimplemented in KisToolLazyBrush.

Definition at line 301 of file kis_tool_freehand.cc.

302{
303 if (action != ChangeSize && action != ChangeSizeSnap) {
305 return;
306 }
307
309 setOutlineVisible(true);
310}
static QCursor blankCursor()
Definition kis_cursor.cc:89
void setOutlineVisible(bool visible)
void activateAlternateAction(AlternateAction action) override
void useCursor(const QCursor &cursor)
QAction * action(const QString &name) const
@ ChangeSizeSnap
Definition kis_tool.h:136
@ ChangeSize
Definition kis_tool.h:135

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

◆ adjustPosition()

QPointF KisToolFreehand::adjustPosition ( const QPointF & point,
const QPointF & strokeBegin )
private

Adjusts a coordinates according to a KisPaintingAssistant, if available.

Definition at line 447 of file kis_tool_freehand.cc.

448{
449 if (m_assistant && static_cast<KisCanvas2*>(canvas())->paintingAssistantsDecoration()) {
450 KisCanvas2* c = static_cast<KisCanvas2*>(canvas());
453 QPointF ap = c->paintingAssistantsDecoration()->adjustPosition(point, strokeBegin);
454 QPointF fp = (1.0 - m_magnetism) * point + m_magnetism * ap;
455 // Report the final position back to the assistant so the guides
456 // can follow the brush
458 return fp;
459 }
460 return point;
461}
KisPaintingAssistantsDecorationSP paintingAssistantsDecoration() const
void setOnlyOneAssistantSnap(bool assistant)
sets whether we snap to only one assistant
void setEraserSnap(bool assistant)
sets whether eraser brushes snap
QPointF adjustPosition(const QPointF &point, const QPointF &strokeBegin)

References KisPaintingAssistantsDecoration::adjustPosition(), Private::canvas, m_assistant, m_eraser_snapping, m_magnetism, m_only_one_assistant, KisCanvas2::paintingAssistantsDecoration(), KisPaintingAssistantsDecoration::setAdjustedBrushPosition(), KisPaintingAssistantsDecoration::setEraserSnap(), and KisPaintingAssistantsDecoration::setOnlyOneAssistantSnap().

◆ beginAlternateAction()

void KisToolFreehand::beginAlternateAction ( KoPointerEvent * event,
AlternateAction action )
overrideprotectedvirtual

Reimplemented from KisTool.

Reimplemented in KisToolMultihand, and KisToolLazyBrush.

Definition at line 323 of file kis_tool_freehand.cc.

324{
325 if (trySampleByPaintOp(event, action)) {
327 return;
328 }
329
330 if (action != ChangeSize && action != ChangeSizeSnap) {
332 return;
333 }
334
336 m_initialGestureDocPoint = event->point;
337 m_initialGestureGlobalPoint = QCursor::pos();
338
339 m_lastDocumentPoint = event->point;
340 m_lastPaintOpSize = currentPaintOpPreset()->settings()->paintOpSize();
341
342 m_beginAlternateActionEvent = event->deepCopyEvent();
344}
QPoint m_initialGestureGlobalPoint
QPointF m_initialGestureDocPoint
std::optional< KoPointerEventWrapper > m_beginAlternateActionEvent
bool trySampleByPaintOp(KoPointerEvent *event, AlternateAction action)
virtual void requestUpdateOutline(const QPointF &outlineDocPoint, const KoPointerEvent *event)
void setMode(ToolMode mode) override
void beginAlternateAction(KoPointerEvent *event, AlternateAction action) override
KisPaintOpPresetSP currentPaintOpPreset()
Definition kis_tool.cc:359
@ GESTURE_MODE
Definition kis_tool.h:303

References KoToolBase::action(), KisToolPaint::beginAlternateAction(), KisTool::ChangeSize, KisTool::ChangeSizeSnap, KisTool::currentPaintOpPreset(), KisTool::GESTURE_MODE, m_beginAlternateActionEvent, m_initialGestureDocPoint, m_initialGestureGlobalPoint, m_lastDocumentPoint, m_lastPaintOpSize, m_paintopBasedSamplingInAction, KisToolPaint::requestUpdateOutline(), KisToolPaint::setMode(), and trySampleByPaintOp().

◆ beginPrimaryAction()

void KisToolFreehand::beginPrimaryAction ( KoPointerEvent * event)
overrideprotectedvirtual

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.

Reimplemented in KisToolMultihand, and KisToolLazyBrush.

Definition at line 203 of file kis_tool_freehand.cc.

204{
205 // FIXME: workaround for the Duplicate Op
207
208 requestUpdateOutline(event->point, event);
209
210 NodePaintAbility paintability = nodePaintAbility();
211 // XXX: move this to KisTool and make it work properly for clone layers: for clone layers, the shape paint tools don't work either
212 if (!nodeEditable() || paintability != PAINT) {
213 if (paintability == KisToolPaint::VECTOR || paintability == KisToolPaint::CLONE){
214 KisCanvas2 * kiscanvas = static_cast<KisCanvas2*>(canvas());
215 QString message = i18n("The brush tool cannot paint on this layer. Please select a paint layer or mask.");
216 kiscanvas->viewManager()->showFloatingMessage(message, koIcon("object-locked"));
217 }
218 else if (paintability == MYPAINTBRUSH_UNPAINTABLE) {
219 KisCanvas2 * kiscanvas = static_cast<KisCanvas2*>(canvas());
220 QString message = i18n("The MyPaint Brush Engine is not available for this colorspace");
221 kiscanvas->viewManager()->showFloatingMessage(message, koIcon("object-locked"));
222 }
223 event->ignore();
224
225 return;
226 }
227
229
231
232 KisCanvas2 *canvas2 = dynamic_cast<KisCanvas2 *>(canvas());
233 if (canvas2) {
234 canvas2->viewManager()->disableControls();
235 }
236
237 initStroke(event);
238}
KisViewManager * viewManager() const
virtual void initStroke(KoPointerEvent *event)
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
QPointF point
The point in document coordinates.
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128
#define koIcon(name)
Use these macros for icons without any issues.
Definition kis_icon.h:25
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
@ SampleFgImage
Definition kis_tool.h:139
NodePaintAbility
Definition kis_tool.h:148
@ MYPAINTBRUSH_UNPAINTABLE
Definition kis_tool.h:153

References Private::canvas, KisTool::CLONE, KisViewManager::disableControls(), initStroke(), KisToolFreehandHelper::isRunning(), KIS_SAFE_ASSERT_RECOVER_RETURN, koIcon, m_helper, KisTool::MYPAINTBRUSH_UNPAINTABLE, KisTool::nodeEditable(), KisTool::nodePaintAbility(), KisTool::PAINT, KisTool::PAINT_MODE, KoPointerEvent::point, KisToolPaint::requestUpdateOutline(), KisTool::SampleFgImage, KisToolPaint::setMode(), KisViewManager::showFloatingMessage(), trySampleByPaintOp(), KisTool::VECTOR, and KisCanvas2::viewManager().

◆ calculatePerspective()

qreal KisToolFreehand::calculatePerspective ( const QPointF & documentPoint)
private

Calculates a coefficient for KisPaintInformation according to perspective grid values

Definition at line 463 of file kis_tool_freehand.cc.

464{
465 qreal perspective = 1.0;
466 Q_FOREACH (const KisPaintingAssistantSP assistant, static_cast<KisCanvas2*>(canvas())->paintingAssistantsDecoration()->assistants()) {
467 QPointer<KisAbstractPerspectiveGrid> grid = dynamic_cast<KisAbstractPerspectiveGrid*>(assistant.data());
468 if (grid && grid->isActive() && grid->contains(documentPoint)) {
469 perspective = grid->distance(documentPoint);
470 break;
471 }
472 }
473 return perspective;
474}

References Private::canvas.

◆ continueAlternateAction()

void KisToolFreehand::continueAlternateAction ( KoPointerEvent * event,
AlternateAction action )
overrideprotectedvirtual

Reimplemented from KisTool.

Reimplemented in KisToolMultihand, and KisToolLazyBrush.

Definition at line 346 of file kis_tool_freehand.cc.

347{
349
350 if (action != ChangeSize && action != ChangeSizeSnap) {
352 return;
353 }
354
355 QPointF lastWidgetPosition = convertDocumentToWidget(m_lastDocumentPoint);
356 QPointF actualWidgetPosition = convertDocumentToWidget(event->point);
357
358 QPointF offset = actualWidgetPosition - lastWidgetPosition;
359
360 KisCanvas2 *canvas2 = dynamic_cast<KisCanvas2 *>(canvas());
362 QRect screenRect = QGuiApplication::primaryScreen()->availableVirtualGeometry();
363
364 qreal scaleX = 0;
365 qreal scaleY = 0;
366 canvas2->coordinatesConverter()->imageScale(&scaleX, &scaleY);
367
368 const qreal maxBrushSize = KisImageConfig(true).maxBrushSize();
369 const qreal effectiveMaxDragSize = 0.5 * screenRect.width();
370 const qreal effectiveMaxBrushSize = qMin(maxBrushSize, effectiveMaxDragSize / scaleX);
371
372 const qreal scaleCoeff = effectiveMaxBrushSize / effectiveMaxDragSize;
373 const qreal sizeDiff = scaleCoeff * offset.x() ;
374
375 if (qAbs(sizeDiff) > 0.01) {
376 KisPaintOpSettingsSP settings = currentPaintOpPreset()->settings();
377
378 qreal newSize = m_lastPaintOpSize + sizeDiff;
379
380 if (action == ChangeSizeSnap) {
381 newSize = qMax(qRound(newSize), 1);
382 }
383
384 newSize = qBound(0.01, newSize, maxBrushSize);
385
386 settings->setPaintOpSize(newSize);
387
390 m_beginAlternateActionEvent.has_value() ? &m_beginAlternateActionEvent->event : nullptr);
391 //m_brushResizeCompressor.start(newSize);
392
393 m_lastDocumentPoint = event->point;
394 m_lastPaintOpSize = newSize;
395 }
396}
KisCoordinatesConverter * coordinatesConverter
void imageScale(qreal *scaleX, qreal *scaleY) const
int maxBrushSize(bool defaultValue=false) const
void continueAlternateAction(KoPointerEvent *event, AlternateAction action) override
QPointF convertDocumentToWidget(const QPointF &pt)
Definition kis_tool.cc:181

References KoToolBase::action(), Private::canvas, KisTool::ChangeSize, KisTool::ChangeSizeSnap, KisToolPaint::continueAlternateAction(), KisTool::convertDocumentToWidget(), KisCanvas2::coordinatesConverter, KisTool::currentPaintOpPreset(), KisCoordinatesConverter::imageScale(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_beginAlternateActionEvent, m_initialGestureDocPoint, m_lastDocumentPoint, m_lastPaintOpSize, m_paintopBasedSamplingInAction, KisImageConfig::maxBrushSize(), KoPointerEvent::point, KisToolPaint::requestUpdateOutline(), and trySampleByPaintOp().

◆ continuePrimaryAction()

void KisToolFreehand::continuePrimaryAction ( KoPointerEvent * event)
overrideprotectedvirtual

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.

Actual painting

Reimplemented from KisTool.

Reimplemented in KisToolMultihand, and KisToolLazyBrush.

Definition at line 240 of file kis_tool_freehand.cc.

241{
243
244 requestUpdateOutline(event->point, event);
245
249 doStroke(event);
250}
virtual void doStroke(KoPointerEvent *event)
#define CHECK_MODE_SANITY_OR_RETURN(_mode)
Definition kis_tool.h:27

References CHECK_MODE_SANITY_OR_RETURN, doStroke(), KisTool::PAINT_MODE, KoPointerEvent::point, and KisToolPaint::requestUpdateOutline().

◆ deactivate

void KisToolFreehand::deactivate ( )
overrideslot

Definition at line 168 of file kis_tool_freehand.cc.

169{
170 if (mode() == PAINT_MODE) {
171 endStroke();
173 }
175}
virtual void endStroke()
void deactivate() override
virtual ToolMode mode() const
Definition kis_tool.cc:407
@ HOVER_MODE
Definition kis_tool.h:299

References KisToolPaint::deactivate(), endStroke(), KisTool::HOVER_MODE, KisTool::mode(), KisTool::PAINT_MODE, and KisToolPaint::setMode().

◆ deactivateAlternateAction()

void KisToolFreehand::deactivateAlternateAction ( AlternateAction action)
overrideprotectedvirtual

Reimplemented from KisTool.

Reimplemented in KisToolLazyBrush.

Definition at line 312 of file kis_tool_freehand.cc.

313{
314 if (action != ChangeSize && action != ChangeSizeSnap) {
316 return;
317 }
318
320 setOutlineVisible(false);
321}
void deactivateAlternateAction(AlternateAction action) override

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

◆ doStroke()

void KisToolFreehand::doStroke ( KoPointerEvent * event)
protectedvirtual

Definition at line 186 of file kis_tool_freehand.cc.

187{
188 m_helper->paintEvent(event);
189}
void paintEvent(KoPointerEvent *event)

References m_helper, and KisToolFreehandHelper::paintEvent().

◆ endAlternateAction()

◆ endPrimaryAction()

void KisToolFreehand::endPrimaryAction ( KoPointerEvent * event)
overrideprotectedvirtual

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.

Reimplemented in KisToolMultihand, and KisToolLazyBrush.

Definition at line 252 of file kis_tool_freehand.cc.

253{
254 Q_UNUSED(event);
256
257 endStroke();
258
259 if (m_assistant && static_cast<KisCanvas2*>(canvas())->paintingAssistantsDecoration()) {
260 static_cast<KisCanvas2*>(canvas())->paintingAssistantsDecoration()->endStroke();
261 }
262
263 KisCanvas2 *canvas2 = dynamic_cast<KisCanvas2 *>(canvas());
264 if (canvas2) {
265 canvas2->viewManager()->enableControls();
266 }
267
269}
void enableControls()
disable and enable toolbar controls. used for disabling them during painting.

References Private::canvas, CHECK_MODE_SANITY_OR_RETURN, KisViewManager::enableControls(), endStroke(), KisTool::HOVER_MODE, m_assistant, KisTool::PAINT_MODE, KisToolPaint::setMode(), and KisCanvas2::viewManager().

◆ endStroke()

void KisToolFreehand::endStroke ( )
protectedvirtual

Definition at line 191 of file kis_tool_freehand.cc.

192{
194 bool paintOpIgnoredEvent = currentPaintOpPreset()->settings()->mouseReleaseEvent();
195 Q_UNUSED(paintOpIgnoredEvent);
196}

References KisTool::currentPaintOpPreset(), KisToolFreehandHelper::endPaint(), and m_helper.

◆ explicitUpdateOutline

void KisToolFreehand::explicitUpdateOutline ( )
protectedslot

◆ flags()

int KisToolFreehand::flags ( ) const
overridevirtual

◆ getOutlinePath()

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

Reimplemented from KisToolPaint.

Definition at line 486 of file kis_tool_freehand.cc.

489{
491 return m_helper->paintOpOutline(convertToPixelCoord(documentPos),
492 event,
493 currentPaintOpPreset()->settings(),
494 outlineMode);
495 else
497}
KisOptimizedBrushOutline paintOpOutline(const QPointF &savedCursorPos, const KoPointerEvent *event, const KisPaintOpSettingsSP globalSettings, KisPaintOpSettings::OutlineMode mode) const
QPointF convertToPixelCoord(KoPointerEvent *e)
Definition kis_tool.cc:189

References KisTool::convertToPixelCoord(), KisTool::currentPaintOpPreset(), m_helper, and KisToolFreehandHelper::paintOpOutline().

◆ initStroke()

void KisToolFreehand::initStroke ( KoPointerEvent * event)
protectedvirtual

Reimplemented in KisToolDyna.

Definition at line 177 of file kis_tool_freehand.cc.

178{
179 m_helper->initPaint(event,
180 convertToPixelCoord(event),
181 image(),
182 currentNode(),
183 image().data());
184}
void initPaint(KoPointerEvent *event, const QPointF &pixelCoords, KisImageWSP image, KisNodeSP currentNode, KisStrokesFacade *strokesFacade, KisNodeSP overrideNode=0, KisDefaultBoundsBaseSP bounds=0)
KisNodeSP currentNode() const
Definition kis_tool.cc:370
KisImageWSP image() const
Definition kis_tool.cc:332

References KisTool::convertToPixelCoord(), KisTool::currentNode(), KisTool::image(), KisToolFreehandHelper::initPaint(), and m_helper.

◆ mouseMoveEvent()

void KisToolFreehand::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.

Reimplemented in KisToolMultihand.

Definition at line 89 of file kis_tool_freehand.cc.

90{
93}
void cursorMoved(const QPointF &cursorPos)
void mouseMoveEvent(KoPointerEvent *event) override

References KisTool::convertToPixelCoord(), KisToolFreehandHelper::cursorMoved(), m_helper, and KisToolPaint::mouseMoveEvent().

◆ paintingInformationBuilder()

KisPaintingInformationBuilder * KisToolFreehand::paintingInformationBuilder ( ) const
protected

Definition at line 141 of file kis_tool_freehand.cc.

142{
143 return m_infoBuilder;
144}

References m_infoBuilder.

◆ primaryActionSupportsHiResEvents()

bool KisToolFreehand::primaryActionSupportsHiResEvents ( ) const
overrideprotectedvirtual

Returns true if the tool can handle (and wants to handle) a very tight flow of input events from the tablet

Reimplemented from KisTool.

Definition at line 198 of file kis_tool_freehand.cc.

199{
200 return true;
201}

◆ resetCursorStyle

void KisToolFreehand::resetCursorStyle ( )
overrideprotectedslot

Definition at line 100 of file kis_tool_freehand.cc.

101{
102 KisConfig cfg(true);
103
104 bool useSeparateEraserCursor = cfg.separateEraserCursor() && isEraser();
105
106 switch (useSeparateEraserCursor ? cfg.eraserCursorStyle() : cfg.newCursorStyle()) {
109 break;
112 break;
115 break;
118 break;
121 break;
124 break;
127 break;
130 break;
133 break;
135 default:
137 break;
138 }
139}
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
static QCursor eraserCursor()
bool isEraser() const
@ 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
@ CURSOR_STYLE_ERASER
Definition kis_global.h:72
virtual void resetCursorStyle()
Definition kis_tool.cc:613

References KisCursor::arrowCursor(), KisCursor::blankCursor(), KisCursor::crossCursor(), CURSOR_STYLE_BLACK_PIXEL, CURSOR_STYLE_CROSSHAIR, CURSOR_STYLE_ERASER, 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, KisCursor::eraserCursor(), KisConfig::eraserCursorStyle(), KisToolPaint::isEraser(), KisConfig::newCursorStyle(), KisCursor::pixelBlackCursor(), KisCursor::pixelWhiteCursor(), KisTool::resetCursorStyle(), KisCursor::roundCursor(), KisConfig::separateEraserCursor(), KisCursor::triangleLeftHandedCursor(), KisCursor::triangleRightHandedCursor(), and KoToolBase::useCursor().

◆ resetHelper()

void KisToolFreehand::resetHelper ( KisToolFreehandHelper * helper)
protected

Definition at line 146 of file kis_tool_freehand.cc.

147{
148 delete m_helper;
149 m_helper = helper;
150}

References m_helper.

◆ setAssistant

void KisToolFreehand::setAssistant ( bool assistant)
protectedslot

Definition at line 423 of file kis_tool_freehand.cc.

424{
425 m_assistant = assistant;
426}

References m_assistant.

◆ setOnlyOneAssistantSnap

void KisToolFreehand::setOnlyOneAssistantSnap ( bool assistant)
protectedslot

Definition at line 428 of file kis_tool_freehand.cc.

429{
430 m_only_one_assistant = assistant;
431}

References m_only_one_assistant.

◆ setSnapEraser

void KisToolFreehand::setSnapEraser ( bool assistant)
protectedslot

Definition at line 433 of file kis_tool_freehand.cc.

434{
435 m_eraser_snapping = assistant;
436}

References m_eraser_snapping.

◆ slotDoResizeBrush

void KisToolFreehand::slotDoResizeBrush ( qreal newSize)
protectedslot

Definition at line 438 of file kis_tool_freehand.cc.

439{
440 KisPaintOpSettingsSP settings = currentPaintOpPreset()->settings();
441
442 settings->setPaintOpSize(newSize);
444
445}

References KisTool::currentPaintOpPreset(), m_initialGestureDocPoint, and KisToolPaint::requestUpdateOutline().

◆ smoothingOptions()

KisSmoothingOptionsSP KisToolFreehand::smoothingOptions ( ) const
protected

Definition at line 95 of file kis_tool_freehand.cc.

96{
97 return m_helper->smoothingOptions();
98}
KisSmoothingOptionsSP smoothingOptions() const

References m_helper, and KisToolFreehandHelper::smoothingOptions().

◆ supportsPaintingAssistants()

bool KisToolFreehand::supportsPaintingAssistants ( ) const
overrideprotectedvirtual

Reimplemented from KisTool.

Definition at line 152 of file kis_tool_freehand.cc.

153{
154 return true;
155}

◆ trySampleByPaintOp()

bool KisToolFreehand::trySampleByPaintOp ( KoPointerEvent * event,
AlternateAction action )
protected

FIXME: we need some better way to implement modifiers for a paintop level. This method is used in DuplicateOp only!

Definition at line 271 of file kis_tool_freehand.cc.

272{
273 if (action != SampleFgNode && action != SampleFgImage) return false;
274
279 QPointF pos = adjustPosition(event->point, event->point);
280 qreal perspective = calculatePerspective(pos);
281 if (!currentPaintOpPreset()) {
282 return false;
283 }
286 event->xTilt(), event->yTilt(),
287 event->rotation(),
288 event->tangentialPressure(),
289 perspective, 0, 0);
290 info.setRandomSource(new KisRandomSource());
291 info.setPerStrokeRandomSource(new KisPerStrokeRandomSource());
292
293 bool paintOpIgnoredEvent = currentPaintOpPreset()->settings()->mousePressEvent(info,
294 event->modifiers(),
295 currentNode());
296 // DuplicateOP during the sampling of new source point (origin)
297 // is the only paintop that returns "false" here
298 return !paintOpIgnoredEvent;
299}
qreal calculatePerspective(const QPointF &documentPoint)
QPointF adjustPosition(const QPointF &point, const QPointF &strokeBegin)
qreal pressure() const
qreal rotation() const
return the rotation (or a default value)
qreal yTilt() const
qreal tangentialPressure() const
Qt::KeyboardModifiers modifiers() const
qreal xTilt() const
@ SampleFgNode
Definition kis_tool.h:137

References KoToolBase::action(), adjustPosition(), calculatePerspective(), KisTool::convertToPixelCoord(), KisTool::currentNode(), KisTool::currentPaintOpPreset(), m_infoBuilder, KoPointerEvent::modifiers(), KoPointerEvent::point, KoPointerEvent::pressure(), KisPaintingInformationBuilder::pressureToCurve(), KoPointerEvent::rotation(), KisTool::SampleFgImage, KisTool::SampleFgNode, KisPaintInformation::setPerStrokeRandomSource(), KisPaintInformation::setRandomSource(), KoPointerEvent::tangentialPressure(), KoPointerEvent::xTilt(), and KoPointerEvent::yTilt().

◆ updateMaskSyntheticEventsFromTouch

void KisToolFreehand::updateMaskSyntheticEventsFromTouch ( )
privateslot

Definition at line 476 of file kis_tool_freehand.cc.

477{
478 setMaskSyntheticEvents(KisConfig(true).disableTouchOnCanvas());
479}
void setMaskSyntheticEvents(bool value)

References KoToolBase::setMaskSyntheticEvents().

◆ wantsAutoScroll()

bool KisToolFreehand::wantsAutoScroll ( ) const
overrideprotectedvirtual

Return if dragging (moving with the mouse down) to the edge of a canvas should scroll the canvas (default is true).

Returns
if this tool wants mouse events to cause scrolling of canvas.

Reimplemented from KoToolBase.

Definition at line 418 of file kis_tool_freehand.cc.

419{
420 return false;
421}

Friends And Related Symbol Documentation

◆ KisToolFreehandPaintingInformationBuilder

Definition at line 90 of file kis_tool_freehand.h.

◆ KisView

friend class KisView
friend

Definition at line 109 of file kis_tool_freehand.h.

◆ KisViewManager

friend class KisViewManager
friend

Definition at line 108 of file kis_tool_freehand.h.

Member Data Documentation

◆ m_assistant

bool KisToolFreehand::m_assistant {false}
protected

Definition at line 111 of file kis_tool_freehand.h.

111{false};

◆ m_beginAlternateActionEvent

std::optional<KoPointerEventWrapper> KisToolFreehand::m_beginAlternateActionEvent
private

Definition at line 128 of file kis_tool_freehand.h.

◆ m_brushResizeCompressor

KisSignalCompressorWithParam<qreal> KisToolFreehand::m_brushResizeCompressor
private

Definition at line 126 of file kis_tool_freehand.h.

◆ m_eraser_snapping

bool KisToolFreehand::m_eraser_snapping {false}
protected

Definition at line 114 of file kis_tool_freehand.h.

114{false};

◆ m_helper

KisToolFreehandHelper* KisToolFreehand::m_helper {nullptr}
private

Definition at line 118 of file kis_tool_freehand.h.

118{nullptr};

◆ m_infoBuilder

KisPaintingInformationBuilder* KisToolFreehand::m_infoBuilder {nullptr}
private

Definition at line 117 of file kis_tool_freehand.h.

117{nullptr};

◆ m_initialGestureDocPoint

QPointF KisToolFreehand::m_initialGestureDocPoint
private

Definition at line 120 of file kis_tool_freehand.h.

◆ m_initialGestureGlobalPoint

QPoint KisToolFreehand::m_initialGestureGlobalPoint
private

Definition at line 123 of file kis_tool_freehand.h.

◆ m_lastDocumentPoint

QPointF KisToolFreehand::m_lastDocumentPoint
private

Definition at line 121 of file kis_tool_freehand.h.

◆ m_lastPaintOpSize

qreal KisToolFreehand::m_lastPaintOpSize {0.0}
private

Definition at line 122 of file kis_tool_freehand.h.

122{0.0};

◆ m_magnetism

double KisToolFreehand::m_magnetism {1.0}
protected

Definition at line 112 of file kis_tool_freehand.h.

112{1.0};

◆ m_only_one_assistant

bool KisToolFreehand::m_only_one_assistant {true}
protected

Definition at line 113 of file kis_tool_freehand.h.

113{true};

◆ m_paintopBasedSamplingInAction

bool KisToolFreehand::m_paintopBasedSamplingInAction {false}
private

Definition at line 125 of file kis_tool_freehand.h.

125{false};

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