7 Commits

Author SHA1 Message Date
Nyall Dawson
38ef62e1cc Fix incorrect annotation scaling when exporting layouts
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
2019-04-30 15:21:39 +10:00
Denis Rouzaud
f7220c89c6 more test masks 2018-02-27 08:29:20 -09:00
Matthias Kuhn
82e6192eff
More control images 2017-09-28 13:22:39 +02:00
Nyall Dawson
1f7758a9f9 Fix failing tests 2017-01-30 20:01:09 +10:00
Nyall Dawson
fac7887a9c [FEATURE] Annotations can be styled using fill symbol styles (fix #10552)
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!
2017-01-30 12:17:44 +10:00
Nyall Dawson
a94ca701ac [FEATURE] Control over annotation contents margins (refs #10555)
Allows setting left/top/right/bottom margins for the contents
within an annotation.
2017-01-30 11:31:52 +10:00
Nyall Dawson
c22f5de690 Port annotation feature handling to QgsAnnotation
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.
2017-01-30 08:39:47 +10:00