drawing reworked into c++ plugin, moved input handler to Interactions.qml as a PointHandler
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include <QCanvasPainterItemRenderer>
|
||||
#include "stroke.hpp"
|
||||
|
||||
namespace ZShell::internal {
|
||||
|
||||
class StrokeCanvasRenderer final : public QCanvasPainterItemRenderer {
|
||||
|
||||
public:
|
||||
void synchronizeData(QCanvasPainterItem *item) override;
|
||||
void paint(QCanvasPainter *painter) override;
|
||||
|
||||
private:
|
||||
QColor m_penColor;
|
||||
float m_penWidth = 4.f;
|
||||
|
||||
QVector<Stroke> m_strokes;
|
||||
Stroke m_currentStroke;
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user