714 Commits

Author SHA1 Message Date
Nyall Dawson
19a2b0e5d5 [api] Allow data defined properties to be set in QgsTextFormat, so
that these are automatically respected whenever the format is
rendered using QgsTextRenderer

This is done transparently to the caller - so by porting away
from the raw QPainter text apis to use QgsTextRenderer instead,
then they immediately gain the ability to use data defined
properties in their text formats.
2019-07-22 11:34:32 +10:00
Nyall Dawson
859d9a7233 Add test for drawing unplaced for a feature with no candidates 2019-07-21 20:29:34 +10:00
Nyall Dawson
c3b2f77a64 [FEATURE][labeling] Allow display of unplaced labels
This setting (accessed through the project label settings dialog)
allows unplaced labels to be shown on the map. These are rendered
using a red color by default (but the color can be changed from
the label settings dialog too), allowing users to determine whether
any important labels are missing from their maps (e.g. due to
overlaps or other constraints).
2019-07-21 20:29:34 +10:00
nirvn
dded60611b [callouts] Add symbol-related variables to the expression context 2019-07-16 14:59:06 +07:00
Nyall Dawson
b01c5e1e0e Add test for other callout stacking option 2019-07-16 07:46:58 +10:00
Nyall Dawson
171f06447a [callouts] Ensure simple callouts are rendered below all map labels
...instead of being rendered on top of some. For this callout style,
we don't want callouts overlapping labels (rather the opposite). But
leave API in place to allow other callout styles to render below
their associated labels only, as this may be wanted for some styles
(e.g. balloon style callouts)
2019-07-16 07:46:58 +10:00
Alex
248af94ba9 Symbol aware legend expression (#9648) 2019-07-15 07:12:24 +02:00
Nyall Dawson
86facfb620 Unit tests for callouts 2019-07-11 13:03:12 +10:00
Blottiere Paul
ee6642477e
Merge pull request #30071 from lbartoletti/wms_tile_buffer
[server]New parameter for WMS service: tile_buffer
2019-06-28 16:22:05 +02:00
Nyall Dawson
a750507fd1 Replace composition converter reference images -- new legend rendering code has superior results to reference images 2019-06-28 09:45:48 +10:00
Nyall Dawson
142e5f2f01 [FEATURE][layouts] Expose setting to control margin under legend group and subgroup headings
Allows tweaking of the spacing applied under group/subgroup headings... so you can get
your layout legend looking pixel-perfect!
2019-06-28 09:45:48 +10:00
Nyall Dawson
6aeedfe20b [FEATURE][layouts] Expose choice of arrangement of legends (i.e.
symbols to the left OR symbols to the right of legend text), and
alignment for group/subgroup/item text

Allows creation of right-to-left locale friendly legends. Additionally,
we default to this right-to-left style alignment when creating new
legends under a RTL based locale.
2019-06-28 09:45:48 +10:00
Nyall Dawson
da79b6f0e6 [FEATURE][labels] New text "background" setting for marker symbol backgrounds
Allows for rendering a marker symbol in the background of labels
(complementing the existing shapes/SVG choices). This allows use
of QGIS marker symbology as a background symbol behind labels (e.g.
for highway shield labels)
2019-06-28 08:28:55 +10:00
nirvn
0e4f0c8555 [symbology] Fix broken centroid fill's force point inside polygon 2019-06-26 12:05:07 +07:00
Nyall Dawson
04c51db551 Fix priority of parallel placements
Ensure that above line placement is preferred when both above
and below line placements are valid
2019-06-20 12:50:35 +10:00
Nyall Dawson
7f0df70478 Fix inverted polygon is distorted when map is rotated
Fixes #26381
2019-06-05 04:00:58 +10:00
Nyall Dawson
b5d0607bf7 Update test mask images 2019-06-05 04:00:58 +10:00
lbartoletti
35c4209bfd New parameter for WMS service: tile_buffer [needs-docs][FEATURE] 2019-06-04 07:20:29 +02:00
Nyall Dawson
3cb3676329 Don't limit label distances to postive values
Sometimes it's useful to have negative distances, as a 0 distance
can still be quite far from line features for some font families.
2019-05-30 17:27:00 +10:00
Nyall Dawson
10c4bb9f9b [labeling] Fix curved labels sometimes placed below line even when
set to above line only
2019-05-30 17:27:00 +10:00
Nyall Dawson
b04374d46f Tweak curved label cost of placing away from center (increase cost slightly to encourage more central placements) 2019-05-30 17:27:00 +10:00
Nyall Dawson
328b0afa6e [labeling] Fix curved labeling fails when line feature geometry
begins with small segments

Fixes #28699
2019-05-30 17:27:00 +10:00
Nyall Dawson
e0aa09ce18 [labeling] Ensure "merge connected features" setting works correctly
with line networks that contains forks and branches

And simplify memory management

Refs #12173
2019-05-30 17:27:00 +10:00
Nyall Dawson
7213030ad9 [labeling] Fix missing labels when multilinestring features are used in
conjunction with the "merge connected lines" setting

Refs #12173
2019-05-30 17:27:00 +10:00
Nyall Dawson
7f8d43eb9b Fix offset labels from reprojected layers when map is rotated
Fixes #24796
2019-05-28 16:09:19 +10:00
Nyall Dawson
4cb1213efd Fix labeling ignores "label per part" setting when geometry parts
are adjacent

Fixes #26763
2019-05-28 15:49:45 +10:00
nirvn
f9810a4534 [effects] Fix blur radius not taking dpi into account (fixes #14885) 2019-05-23 11:34:15 +07:00
Éric Lemoine
b0ae641b06 Support FILTER values with colons 2019-05-16 11:52:05 +02:00
nirvn
65ec9cd146 [symbology] Fix setSize(size) not working for ellipse markers 2019-05-08 13:18:02 +07:00
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
Mathieu Pellerin
5fa9e2f02e Add simple line custom dash pattern tests 2019-04-28 12:19:27 +07:00
Alessandro Pasotti
956ed06f52 [server] Respect custom layer order for groups in GetMap
Fixes #21917
2019-04-26 12:04:39 +02:00
rldhont
833fa3ded3
Merge pull request #9856 from rldhont/fix-server-wmts-resolutions
[Server] WMTS - use resolution for bbox calculation
2019-04-25 15:14:01 +02:00
nirvn
756964620a [FEATURE][symbology] Add offset settings for point pattern fill symbol layer 2019-04-24 16:53:40 +07:00
rldhont
f8880c6e9c [Tests][Server] WMTS - use resolution for bbox calculation 2019-04-24 10:46:21 +02:00
nirvn
ca305bb5b0 Turn antialising render flag on when appropriate in QgsRenderContext::fromQPainter() 2019-04-24 10:06:33 +07:00
Alessandro Pasotti
c0c19f0cc9 Fix wrong cotrol image for ITEMFONTCOLOR test 2019-04-18 08:32:33 +02:00
Alessandro Pasotti
1f862cadc6 Waste my time with Travis 2019-04-17 14:12:30 +02:00
Alessandro Pasotti
7032db27fa [server] Implement LAYERFONTCOLOR and ITEMFONTCOLOR
Fixes #21871
Fixes #21870

Funded by: Gis3w
2019-04-17 12:01:06 +02:00
David Signer
fab5254595 using correct pictures and additional comments 2019-04-11 19:12:26 +02:00
David Signer
fa8e5fa348 add test files and correct image 2019-04-11 17:01:23 +02:00
David Signer
1d6a7dd53c replace image with the expected one from test 2019-04-11 14:51:01 +02:00
David Signer
96f054e1c1 tests for default mapunits per mm on EPSG:4326 2019-04-11 12:36:35 +02:00
David Signer
679b100f0c tests for default scale on EPSG:2056 2019-04-11 11:42:45 +02:00
Martin Dobias
b2aa97843d Added rendering tests for 3D lines 2019-04-09 09:42:08 +02:00
rldhont
98235eb46b [Bugfix][Server] QGIS Server removes empty string in style parameter even if it describes default style
In OGC WMS standard, the empty string represents the default style.

QGIS Server when it parses the parameters, QGIS Server when it parses parameters it removes empty parts.
When all requested styles are default ones it's equal to an empty parameter STYLE, as defined in the standard.
When only one layer is requested, there is no issue with custom or default style.
When multiple layers are requested and some with custom styles, because QGIS Server does not retain empty strings, it loses the layer / style match.

To fix it, keeps empty parts for not empty styles parameters.
2019-04-05 09:29:21 +02:00
Nyall Dawson
4582cb8d09 Fix crash, missing points in some corner cases 2019-04-05 12:00:47 +10:00
Nyall Dawson
426382c919 [FEATURE] Average line angles for marker and hashed line symbology
Previously, when marker or hash lines were rendered using interval
or center point place placement, the symbol angles were determined
by taking the exact line orientation at the position of the symbol.

This often leads to undesirable rendering effects, where little
jaggies or corners in lines which occur at the position of the
symbol cause the marker or hash line to be oriented at a very
different angle to what the eye expects to see.

With this new option, the angle is instead calculated by averaging
the line over a specified distance either side of the symbol. E.g.
averaging the line angle over 4mm means we take the points along
the line 2mm from either side of the symbol placement, and use these
instead to calculate the line angle for that symbol. This has the
effect of smoothing (or removing) any tiny local deviations from
the overall line direction, resulting in much nicer visual
orientation of marker or hash lines.

Like all symbol settings, the average angle smoothing distance
can be set using mm/pixels/map units/etc, and supports data-defined
values.

Closed rings also correctly consider wrapping around these average
angles from the start/end vertex.

(Sponsored by an anonymous corporate backer)
2019-04-05 12:00:47 +10:00
rldhont
7de6eeb6d8
Merge pull request #9654 from rldhont/fix-regression-server-print-selection-pdf-master
[Unit-test]To avoid regression in Server printing to PDF output format
2019-04-04 12:28:38 +02:00
Nyall Dawson
50dd2d6ec7 Unit tests for hashed line symbols 2019-04-03 02:31:27 +10:00