27 KisCursor::load(
"tool_polygonal_selection_cursor.png", 6, 6),
50 if (event->type() == QEvent::MouseButtonPress ||
51 event->type() == QEvent::MouseButtonDblClick) {
52 QMouseEvent *mouseEvent =
static_cast<QMouseEvent*
>(event);
53 if (mouseEvent->button() == Qt::RightButton &&
isSelecting()) {
57 }
else if (event->type() == QEvent::TabletPress) {
58 QTabletEvent *tabletEvent =
static_cast<QTabletEvent*
>(event);
59 if (tabletEvent->button() == Qt::RightButton &&
isSelecting()) {
72 Q_FOREACH (QWidget* widget, widgetsList) {
73 if (widget->objectName() !=
"Stroke widget") {
74 filteredWidgets.push_back(widget);
77 return filteredWidgets;
108 KisCanvas2 *kiscanvas = qobject_cast<KisCanvas2*>(canvas());
180 matrix.scale(image->
xRes(), image->
yRes());
183 QPainterPath path = matrix.map(pathShape->
outline());
186 [tmpSel, antiAlias, grow, feather, path]()
mutable
205 }
else if (grow < 0) {
218 if (grow == 0 && feather == 0) {
257 useCursor(
KisCursor::load(
"tool_polygonal_selection_cursor_add.png", 6, 6));
259 useCursor(
KisCursor::load(
"tool_polygonal_selection_cursor_sub.png", 6, 6));
261 useCursor(
KisCursor::load(
"tool_polygonal_selection_cursor_inter.png", 6, 6));
263 useCursor(
KisCursor::load(
"tool_polygonal_selection_cursor_symdiff.png", 6, 6));
KisImageWSP image() const
KisViewManager * viewManager() const
KisPaintingAssistantsDecorationSP paintingAssistantsDecoration() const
void updateCanvasDecorations()
static QCursor load(const QString &cursorName, int hotspotX=-1, int hotspotY=-1)
void process(KisPixelSelectionSP pixelSelection, const QRect &rect) override
void process(KisPixelSelectionSP pixelSelection, const QRect &rect) override
const KoColorSpace * colorSpace() const
@ FillStyleForegroundColor
void setStrokeStyle(StrokeStyle strokeStyle)
Set the current brush stroke style.
void setFillStyle(FillStyle fillStyle)
Set the current style with which to fill.
void fillPainterPath(const QPainterPath &path)
void setPaintColor(const KoColor &color)
void setAntiAliasPolygonFill(bool antiAliasPolygonFill)
Set whether a polygon's filled area should be anti-aliased or not. The default is true.
bool hasPaintableAssistants() const
void applyCommand(KUndo2Command *command, KisStrokeJobData::Sequentiality sequentiality=KisStrokeJobData::SEQUENTIAL, KisStrokeJobData::Exclusivity exclusivity=KisStrokeJobData::NORMAL)
void process(KisPixelSelectionSP pixelSelection, const QRect &rect) override
KisSelectionSP selection()
The position of a path point within a path shape.
virtual QPointF normalize()
Normalizes the path data.
void close()
Closes the current subpath.
QPainterPath outline() const override
reimplemented
QPointF position() const
Get the position of the shape in pt.
KUndo2MagicString kundo2_i18n(const char *text)
The LambdaCommand struct is a shorthand for creation of AggregateCommand commands using C++ lambda fe...
void mousePressEvent(KoPointerEvent *event) override
void beginPrimaryAction(KoPointerEvent *event) override
void endPrimaryAction(KoPointerEvent *event) override
void continuePrimaryAction(KoPointerEvent *event) override
void mouseReleaseEvent(KoPointerEvent *event) override
void mouseDoubleClickEvent(KoPointerEvent *event) override
void beginPrimaryDoubleClickAction(KoPointerEvent *event) override
void mouseMoveEvent(KoPointerEvent *event) override
void invalidateOutlineCache()
void setOutlineCache(const QPainterPath &cache)
QRect selectedRect() const