Files
z-bar-qt/Plugins/ZShell/Internal/strokecanvasrenderer.hpp
T
zach 80d5f13663
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 10s
Python / lint-format (pull_request) Successful in 14s
Python / test (pull_request) Successful in 32s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m7s
cursor crosshair + outline of pen width
2026-06-22 11:52:11 +02:00

29 lines
542 B
C++

#pragma once
#include <QCanvasPainterItemRenderer>
#include <qcontainerfwd.h>
#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;
bool m_hoverVisible = false;
QPointF m_hoverPoint;
bool m_isDrawing = false;
QVector<Stroke> m_strokes;
Stroke m_currentStroke;
QVector<int> m_pendingGroupRemovals;
};
};