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

#include <kis_tool_select_outline.h>

+ Inheritance diagram for KisToolSelectOutline:

Public Member Functions

bool alternateActionSupportsHiResEvents (KisTool::AlternateAction action) const override
 
 KisToolSelectOutline (KoCanvasBase *canvas)
 
bool primaryActionSupportsHiResEvents () const override
 
void resetCursorStyle () override
 
- Public Member Functions inherited from KisToolSelectBase< __KisToolSelectOutlineLocal >
void activate (const QSet< KoShape * > &shapes) override
 
void activateAlternateAction (KisTool::AlternateAction action) override
 
SelectionAction alternateSelectionAction () const
 
bool antiAliasSelection () const
 
void beginAlternateAction (KoPointerEvent *event, KisTool::AlternateAction action) override
 
bool beginMoveSelectionInteraction ()
 
void beginPrimaryAction (KoPointerEvent *event) override
 
bool beginSelectInteraction ()
 
QList< int > colorLabelsSelected () const
 
void continueAlternateAction (KoPointerEvent *event, KisTool::AlternateAction action) override
 
void continuePrimaryAction (KoPointerEvent *event) override
 
QWidget * createOptionWidget () override
 
void deactivate () override
 
void deactivateAlternateAction (KisTool::AlternateAction action) override
 
void endAlternateAction (KoPointerEvent *event, KisTool::AlternateAction action) override
 
bool endMoveSelectionInteraction ()
 
void endPrimaryAction (KoPointerEvent *event) override
 
bool endSelectInteraction ()
 
int featherSelection () const
 
int growSelection () const
 
bool isMovingSelection () const
 
bool isSelecting () const
 
void keyPressEvent (QKeyEvent *event) override
 
void keyReleaseEvent (QKeyEvent *event) override
 
 KisToolSelectBase (KoCanvasBase *canvas, const QCursor cursor, const QString toolName)
 
 KisToolSelectBase (KoCanvasBase *canvas, const QString toolName)
 
 KisToolSelectBase (KoCanvasBase *canvas, QCursor cursor, QString toolName, KoToolBase *delegateTool)
 
KisNodeSP locateSelectionMaskUnderCursor (const QPointF &pos, Qt::KeyboardModifiers modifiers)
 
void mouseMoveEvent (KoPointerEvent *event) override
 
QMenu * popupActionsMenu () override
 
KisPopupWidgetInterfacepopupWidget () override
 
SampleLayersMode sampleLayersMode () const
 
SelectionAction selectionAction () const
 
bool selectionDidMove () const
 
SelectionMode selectionMode () const
 
KisSelectionOptionsselectionOptionWidget ()
 
virtual void setAlternateSelectionAction (SelectionAction action)
 
bool stopGrowingAtDarkestPixel () const
 
void updateActionShortcutToolTips ()
 
void updateCursorDelayed ()
 
- Public Member Functions inherited from __KisToolSelectOutlineLocal
 __KisToolSelectOutlineLocal (KoCanvasBase *canvas)
 
- Public Member Functions inherited from KisToolOutlineBase
bool eventFilter (QObject *obj, QEvent *event) override
 
bool hasUserInteractionRunning () const
 
 KisToolOutlineBase (KoCanvasBase *canvas, ToolType type, const QCursor &cursor=KisCursor::load("tool_outline_selection_cursor.png", 6, 6))
 
void paint (QPainter &gc, const KoViewConverter &converter) override
 
 ~KisToolOutlineBase () 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 mousePressEvent (KoPointerEvent *event) override
 
void mouseReleaseEvent (KoPointerEvent *event) override
 
 ~KisToolPaint () override
 
- Public Member Functions inherited from KisTool
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 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 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
 
 KoToolBase (KoCanvasBase *canvas)
 
bool maskSyntheticEvents () const
 
QList< QPointer< QWidget > > optionWidgets ()
 
virtual bool paste ()
 
virtual bool selectAll ()
 selectAll select all data the tool can select.
 
virtual KoToolSelectionselection ()
 
Q_INVOKABLE QString toolId () const
 
virtual bool wantsAutoScroll () const
 
 ~KoToolBase () override
 

Private Member Functions

void beginShape () override
 
void endShape () override
 
void finishOutline (const QVector< QPointF > &points) override
 

Additional Inherited Members

- Public Types inherited from KisToolSelectBase< __KisToolSelectOutlineLocal >
enum  SampleLayersMode
 
- Public Types inherited from KisToolOutlineBase
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 inherited from KisToolOutlineBase
void activate (const QSet< KoShape * > &shapes) override
 
void deactivate () override
 
void requestStrokeCancellation () override
 
void requestStrokeEnd () override
 
void undoLastPoint ()
 
- 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 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 ()
 
- 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 Slots inherited from KisTool
- Protected Member Functions inherited from KisToolSelectBase< __KisToolSelectOutlineLocal >
virtual bool isPixelOnly () const
 
virtual bool usesColorLabels () const
 
- Protected Member Functions inherited from KisToolShape
void addPathShape (KoPathShape *pathShape, const KUndo2MagicString &name)
 
void addShape (KoShape *shape)
 
QWidget * createOptionWidget () override
 
qreal currentStrokeWidth () const
 
KisToolShapeUtils::FillStyle fillStyle ()
 
QTransform fillTransform ()
 
ShapeAddInfo shouldAddShape (KisNodeSP currentNode) const
 
KisToolShapeUtils::StrokeStyle strokeStyle ()
 
- Protected Member Functions inherited from KisToolPaint
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 canvasResourceChanged (int key, const QVariant &v) override
 
void deactivatePrimaryAction () override
 
void enableControl (QWidget *control, bool value)
 
virtual KisOptimizedBrushOutline getOutlinePath (const QPointF &documentPos, const KoPointerEvent *event, KisPaintOpSettings::OutlineMode outlineMode)
 
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 inherited from KisToolSelectBase< __KisToolSelectOutlineLocal >
SelectionAction m_selectionActionAlternate
 
KisSelectionToolConfigWidgetHelper m_widgetHelper
 
- 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 29 of file kis_tool_select_outline.h.

Constructor & Destructor Documentation

◆ KisToolSelectOutline()

KisToolSelectOutline::KisToolSelectOutline ( KoCanvasBase * canvas)

Definition at line 50 of file kis_tool_select_outline.cc.

Member Function Documentation

◆ alternateActionSupportsHiResEvents()

bool KisToolSelectOutline::alternateActionSupportsHiResEvents ( KisTool::AlternateAction action) const
overridevirtual

In selection tools we abuse alternate actions to switch different selection modes. So we should notify input manager that we need a good precision for them

Reimplemented from KisTool.

Definition at line 177 of file kis_tool_select_outline.cc.

178{
185 Q_UNUSED(action);
186 return !isMovingSelection();
187}
QAction * action(const QString &name) const

References KoToolBase::action(), and KisToolSelectBase< __KisToolSelectOutlineLocal >::isMovingSelection().

◆ beginShape()

void KisToolSelectOutline::beginShape ( )
overrideprivatevirtual

Use these methods in subclassed to notify when the user starts and finishes making a shape, and override to be notified

Reimplemented from KisToolShape.

Definition at line 162 of file kis_tool_select_outline.cc.

References KisToolSelectBase< __KisToolSelectOutlineLocal >::beginSelectInteraction().

◆ endShape()

void KisToolSelectOutline::endShape ( )
overrideprivatevirtual

◆ finishOutline()

void KisToolSelectOutline::finishOutline ( const QVector< QPointF > & points)
overrideprivatevirtual

Implements KisToolOutlineBase.

Definition at line 54 of file kis_tool_select_outline.cc.

55{
56 KisCanvas2 * kisCanvas = dynamic_cast<KisCanvas2*>(canvas());
58 kisCanvas->updateCanvas();
59
60 const QRectF boundingRect = KisAlgebra2D::accumulateBounds(points);
61 const QRectF boundingViewRect = pixelToView(boundingRect);
62
63 KisSelectionToolHelper helper(kisCanvas, kundo2_i18n("Freehand Selection"));
64
65 if (helper.tryDeselectCurrentSelection(boundingViewRect, selectionAction())) {
67 return;
68 }
69
70 if (points.count() < 3) {
71 return;
72 }
73
74 KisCursorOverrideLock cursorLock(Qt::WaitCursor);
75
76 const SelectionMode mode =
77 helper.tryOverrideSelectionMode(kisCanvas->viewManager()->selection(),
80
81 if (mode == PIXEL_SELECTION) {
86 kundo2_i18n("Freehand Selection"));
87
88 KisPixelSelectionSP tmpSel =
90
91 const bool antiAlias = antiAliasSelection();
92 const int grow = growSelection();
93 const int feather = featherSelection();
94
95 QPainterPath path;
96 path.addPolygon(points);
97 path.closeSubpath();
98
100 [tmpSel, antiAlias, grow, feather, path]() mutable
101 -> KUndo2Command * {
102 KisPainter painter(tmpSel);
103 painter.setPaintColor(KoColor(Qt::black, tmpSel->colorSpace()));
104 // Since the feathering already smooths the selection, the
105 // antiAlias is not applied if we must feather
106 painter.setAntiAliasPolygonFill(antiAlias && feather == 0);
107 painter.setFillStyle(KisPainter::FillStyleForegroundColor);
108 painter.setStrokeStyle(KisPainter::StrokeStyleNone);
109
110 painter.paintPainterPath(path);
111
112 if (grow > 0) {
113 KisGrowSelectionFilter biggy(grow, grow);
114 biggy.process(tmpSel,
115 tmpSel->selectedRect().adjusted(-grow,
116 -grow,
117 grow,
118 grow));
119 } else if (grow < 0) {
120 KisShrinkSelectionFilter tiny(-grow, -grow, false);
121 tiny.process(tmpSel, tmpSel->selectedRect());
122 }
123 if (feather > 0) {
124 KisFeatherSelectionFilter feathery(feather);
125 feathery.process(tmpSel,
126 tmpSel->selectedRect().adjusted(-feather,
127 -feather,
128 feather,
129 feather));
130 }
131
132 if (grow == 0 && feather == 0) {
133 tmpSel->setOutlineCache(path);
134 } else {
135 tmpSel->invalidateOutlineCache();
136 }
137
138 return 0;
139 });
140
141 applicator.applyCommand(cmd, KisStrokeJobData::SEQUENTIAL);
142 helper.selectPixelSelection(applicator, tmpSel, selectionAction());
143 applicator.end();
144
145 } else {
146 KoPathShape *path = new KoPathShape();
147 path->setShapeId(KoPathShapeId);
148
149 QTransform resolutionMatrix;
150 resolutionMatrix.scale(1 / currentImage()->xRes(),
151 1 / currentImage()->yRes());
152 path->moveTo(resolutionMatrix.map(points[0]));
153 for (int i = 1; i < points.count(); i++)
154 path->lineTo(resolutionMatrix.map(points[i]));
155 path->close();
156 path->normalize();
157
158 helper.addSelectionShape(path, selectionAction());
159 }
160}
QVector< KisImageSignalType > KisImageSignalVector
SelectionMode
@ PIXEL_SELECTION
#define KoPathShapeId
Definition KoPathShape.h:20
void updateCanvas(const QRectF &rc) override
KisViewManager * viewManager() const
const KoColorSpace * colorSpace() const
@ FillStyleForegroundColor
KisSelectionSP selection()
The position of a path point within a path shape.
Definition KoPathShape.h:63
#define KIS_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:75
KUndo2MagicString kundo2_i18n(const char *text)
void accumulateBounds(const Point &pt, Rect *bounds)
The LambdaCommand struct is a shorthand for creation of AggregateCommand commands using C++ lambda fe...
void setOutlineCache(const QPainterPath &cache)
virtual ToolMode mode() const
Definition kis_tool.cc:407
KisImageWSP currentImage()
Definition kis_tool.cc:393
QPointF pixelToView(const QPoint &pixelCoord) const
Definition kis_tool.cc:269
KisNodeSP currentNode() const
Definition kis_tool.cc:370

References KisAlgebra2D::accumulateBounds(), KisSelectionToolHelper::addSelectionShape(), KisToolSelectBase< __KisToolSelectOutlineLocal >::antiAliasSelection(), KisProcessingApplicator::applyCommand(), Private::canvas, KisPaintDevice::colorSpace(), KisTool::currentImage(), KisTool::currentNode(), KisProcessingApplicator::end(), KisToolSelectBase< __KisToolSelectOutlineLocal >::endSelectInteraction(), KisToolSelectBase< __KisToolSelectOutlineLocal >::featherSelection(), KisPainter::FillStyleForegroundColor, KisToolSelectBase< __KisToolSelectOutlineLocal >::growSelection(), KisPixelSelection::invalidateOutlineCache(), KIS_ASSERT_RECOVER_RETURN, KoPathShapeId, kundo2_i18n(), KisTool::mode(), KisProcessingApplicator::NONE, KisPainter::paintPainterPath(), PIXEL_SELECTION, KisTool::pixelToView(), KisFeatherSelectionFilter::process(), KisGrowSelectionFilter::process(), KisShrinkSelectionFilter::process(), KisPixelSelection::selectedRect(), KisViewManager::selection(), KisToolSelectBase< __KisToolSelectOutlineLocal >::selectionAction(), KisToolSelectBase< __KisToolSelectOutlineLocal >::selectionMode(), KisSelectionToolHelper::selectPixelSelection(), KisStrokeJobData::SEQUENTIAL, KisPainter::setAntiAliasPolygonFill(), KisPainter::setFillStyle(), KisPixelSelection::setOutlineCache(), KisPainter::setPaintColor(), KisPainter::setStrokeStyle(), KisPainter::StrokeStyleNone, KisSelectionToolHelper::tryDeselectCurrentSelection(), KisSelectionToolHelper::tryOverrideSelectionMode(), KisCanvas2::updateCanvas(), and KisCanvas2::viewManager().

◆ primaryActionSupportsHiResEvents()

bool KisToolSelectOutline::primaryActionSupportsHiResEvents ( ) const
overridevirtual

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 172 of file kis_tool_select_outline.cc.

173{
174 return !isMovingSelection();
175}

References KisToolSelectBase< __KisToolSelectOutlineLocal >::isMovingSelection().

◆ resetCursorStyle()

void KisToolSelectOutline::resetCursorStyle ( )
overridevirtual

Called whenever the configuration settings change.

Reimplemented from KisTool.

Definition at line 189 of file kis_tool_select_outline.cc.

190{
192 useCursor(KisCursor::load("tool_outline_selection_cursor_add.png", 5, 5));
193 } else if (selectionAction() == SELECTION_SUBTRACT) {
194 useCursor(KisCursor::load("tool_outline_selection_cursor_sub.png", 5, 5));
195 } else if (selectionAction() == SELECTION_INTERSECT) {
196 useCursor(KisCursor::load("tool_outline_selection_cursor_inter.png", 5, 5));
198 useCursor(KisCursor::load("tool_outline_selection_cursor_symdiff.png", 5, 5));
199 } else {
201 }
202}
@ SELECTION_INTERSECT
@ SELECTION_SYMMETRICDIFFERENCE
@ SELECTION_SUBTRACT
@ SELECTION_ADD
static QCursor load(const QString &cursorName, int hotspotX=-1, int hotspotY=-1)
void useCursor(const QCursor &cursor)

References KisCursor::load(), SELECTION_ADD, SELECTION_INTERSECT, SELECTION_SUBTRACT, SELECTION_SYMMETRICDIFFERENCE, KisToolSelectBase< __KisToolSelectOutlineLocal >::selectionAction(), and KoToolBase::useCursor().


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