Previously, annotation size and position always used pixel units. This
did not work well when exporting layouts, resulting in tiny annotations
(it also caused issues when moving projects between hidpi/non hidpi
displays).
Instead, use millimeters for annotation size and position so that the
appearance is consistent across displays and works correctly in layout
exports.
Add lots of unit tests covering this.
Fixes#18373
This changes the rendering of annotation frames to use QGIS' symbology
engine, which means that all the existing fill styles can now be
used to style annotation frames.
Also paint effects & data defined symbol parameters. Whee!
Not an ideal implementation (too much logic resides in the
gui QgsMapCanvasAnnotationItem class), but any approach
using current api will be dependant on some hacks.
Ideally we need a QgsVectorDataProvider method for finding
the closest feature(s) to a point(/line/polygon) within a
certain tolerance, with provider specific implementations
which offload this to the data store's spatial indices.
Then this handling could be bumped up to reside in
QgsAnnotation.