ok to put it in another way.... How bad is the following?
void
{
m_points.append(scenePos());
if(m_points.count() > 50)
m_points.remove(0);
pPainter->setBrush(Qt::blue);
pPainter->setPen(Qt::NoPen);
pPainter->drawEllipse(m_rect.translated(p-scenePos()));
}
void
TracerGraphicsItem::paint(QPainter* pPainter, const QStyleOptionGraphicsItem* pOption, QWidget* pWidget)
{
m_points.append(scenePos());
if(m_points.count() > 50)
m_points.remove(0);
pPainter->setBrush(Qt::blue);
pPainter->setPen(Qt::NoPen);
foreach(QPointF p, m_points)
pPainter->drawEllipse(m_rect.translated(p-scenePos()));
}
To copy to clipboard, switch view to plain text mode
Bookmarks