XnTriq wrote:MP makes use of QT's native support for
SVG as well as the built-in
WebKit engine (for capturing HTML).
The
QPainter class seems to offer all the
basic drawing tools Pierre needs for annotations (including
path stroking).
Nice.

Also, thanks a lot for helping with the links in all the posts around here.
However, istm that QPainter (which mimics rather closely the Windows' GDI approach) while is - for sure - a good candidate doesn't have:
1.
A hitting engine. IOW, a way to 'select' the desired painted object (IOW to put the 'selection box' around it) in order to edit it.
This can be faked if we use the paradigm from batch convert in the way in which is described in the
Non-Distructive Editing thread. Then by the very nature of things, selecting an action in the actions list, the program will select with ease the desired object.
Also, be aware that a hitting engine isn't very easy to write. (Think that one have a star overlapping a triangle - the engine must correctly select the desired object)
2.
An editing engine. The classical 8 dots-dotted-rectangle-box used for selection isn't enough. Ok, for the beginning and/or plain vanilla things, yes. However, if one requests bezier curves (see some posts above) and/or callouts, the things change. We need an engine to deal with specific point-editing.
3.
Predefined shapes. Callouts (problems with the 'nose' of the callout - orientation, size etc.), arrows (problems with the arrowhead orientation, size etc.) and other predefined shapes which some of them need special treatment.
The devil hides in details.
My proposal:
Implement the
Non-Distructive Editing as shared code with the Batch Convert's actions and add to the Actions list an Insert Custom Shape action.
Put some shapes in there to choose from, pen & brush colors, strokes etc. and controls for move (position), scale & rotate. In this case, imho as a visual paradigm for mouse editing for the beginning the simple 8-dots-box will suffice.
m. Th.
- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -