This is my first post in this forum. So thanks everybody for all your efforts.
I am sorry but I am working on a side project (outside the roadmap). For now I am just discovering the source code and I am trying to develop basic stuff to get familiar with the source code.
I am trying to create my own custom tool and add it to pencil. For now I have created a tool inheriting from :StrokeTool, I am working essentially in the vector layer (for now), so up to now I can select my tool and select a stroke with it (as for the move tool), what I want to do is: Once a stroke is selected hit a key say “M” and automatically draw a new stroke on the vector layer.
I am able to generate the right path however I cannot manage to draw it. I am using (inside a keypressedevent):
mScribbleArea->drawPath(path, pen, Qt::NoBrush, QPainter::CompositionMode_Source);
mScribbleArea->refreshVector(path.boundingRect().toRect(), qRound((width/2 + 2) * mEditor->view()->scaling()));
and my pen is:
QPen pen( QColor(200, 0, 0), width, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin );
I guess there is something I don’t get, if anyone can give me a hand it would be much appreciated !