16#include <klocalizedstring.h>
44 KisCursor::load(
"tool_outline_selection_cursor.png", 5, 5))
46 setObjectName(
"tool_select_outline");
61 const QRectF boundingViewRect =
pixelToView(boundingRect);
70 if (points.count() < 3) {
74 KisCursorOverrideLock cursorLock(Qt::WaitCursor);
96 path.addPolygon(points);
100 [tmpSel, antiAlias, grow, feather, path]()
mutable
119 }
else if (grow < 0) {
132 if (grow == 0 && feather == 0) {
149 QTransform resolutionMatrix;
152 path->moveTo(resolutionMatrix.map(points[0]));
153 for (
int i = 1; i < points.count(); i++)
154 path->lineTo(resolutionMatrix.map(points[i]));
QVector< KisImageSignalType > KisImageSignalVector
void updateCanvas(const QRectF &rc) override
KisViewManager * viewManager() const
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 paintPainterPath(const QPainterPath &path)
void setStrokeStyle(StrokeStyle strokeStyle)
Set the current brush stroke style.
void setFillStyle(FillStyle fillStyle)
Set the current style with which to fill.
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.
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.
#define KIS_ASSERT_RECOVER_RETURN(cond)
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 invalidateOutlineCache()
void setOutlineCache(const QPainterPath &cache)
QRect selectedRect() const