Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_tool_line_helper.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef __KIS_TOOL_LINE_HELPER_H
8#define __KIS_TOOL_LINE_HELPER_H
9
11
12
14{
15public:
18 const KUndo2MagicString &transactionText);
19
20 ~KisToolLineHelper() override;
21
22 void setEnabled(bool value);
23 void setUseSensors(bool value);
24
25 void repaintLine(KisImageWSP image,
26 KisNodeSP node,
27 KisStrokesFacade *strokesFacade);
28
30 void addPoint(KoPointerEvent *event, const QPointF &overridePos = QPointF());
31 void addPoint(KisPaintInformation pi, const QPointF &overridePos = QPointF());
32 void translatePoints(const QPointF &offset);
33 // overwrites the first and last points, and adjusts the rest of the points to fit the line
34 void movePointsTo(const QPointF& startPoint, const QPointF& endPoint);
35 void end();
36 void cancel();
37 void clearPoints();
38 void clearPaint();
39
41
42private:
44
45private:
46 struct Private;
47 Private * const m_d;
48};
49
50#endif /* __KIS_TOOL_LINE_HELPER_H */
float value(const T *src, size_t ch)
KoCanvasResourceProvider * resourceManager() const
KisToolLineHelper(KisPaintingInformationBuilder *infoBuilder, KoCanvasResourceProvider *resourceManager, const KUndo2MagicString &transactionText)
void adjustPointsToDDA(QVector< KisPaintInformation > &points)
void translatePoints(const QPointF &offset)
void setUseSensors(bool value)
void movePointsTo(const QPointF &startPoint, const QPointF &endPoint)
void setEnabled(bool value)
void repaintLine(KisImageWSP image, KisNodeSP node, KisStrokesFacade *strokesFacade)
void start(KoPointerEvent *event, KoCanvasResourceProvider *resourceManager)
void addPoint(KoPointerEvent *event, const QPointF &overridePos=QPointF())