20 Commits

Author SHA1 Message Date
Nyall Dawson
fee239dbcc Avoid storing and cloning paint effects for layers if they are just
the default stack unchanged

Speeds up cloning of symbol layers
2019-07-25 07:00:37 +10:00
nirvn
65ec9cd146 [symbology] Fix setSize(size) not working for ellipse markers 2019-05-08 13:18:02 +07:00
Matthias Kuhn
ac6ed1a18c Doxygen for QgsSymbolLayer::setRenderingPass 2019-05-02 07:16:14 +10:00
nirvn
756964620a [FEATURE][symbology] Add offset settings for point pattern fill symbol layer 2019-04-24 16:53:40 +07: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
Nyall Dawson
f8f319b6e0 Fix dox 2019-04-03 02:31:27 +10:00
Nyall Dawson
48d2a37057 [FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.

To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.

This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.

The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-04-03 02:31:27 +10:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
Nyall Dawson
867e39947b Allow for exact calculation of symbol sizes with mixed layer units
Fixes #21143
2019-02-05 11:07:02 +11:00
Nyall Dawson
9cf2ff31d8 Fix evaluation of data defined properties for subsymbols of subsymbols
Fixes #18384
2019-01-23 03:36:41 +11:00
Nyall Dawson
eafedeeb8b Sipify 2019-01-21 14:48:19 +11:00
nirvn
c6425338ee [FEATURE] Raster image marker 2018-12-05 15:44:44 +07:00
Nyall Dawson
30214538c2 [FEATURE] Add option to simple line and marker line to only
render exterior ring or interior rings

This option is shown whenever a simple line symbol or
marker line symbol is used as part of a fill symbol for
rendering polygons.

The default behavior is to render both interior and exterior
rings, but this new setting allows users to set the symbol
layer to render only for the exterior ring OR only
for interior rings.

This allows for symbolisation which wasn't directly possible
before, such as a marker line with markers for interior
rings angled toward the interior of the polygon.

Sponsored by the German QGIS User Group

Fixes #12652
2018-11-09 19:06:48 +10:00
Denis Rouzaud
65bb60e96c run sipify 2018-05-28 10:39:34 -08:00
Nyall Dawson
f8bc97030b Remove extra space added before first line of docstring 2018-05-28 08:22:11 +10:00
Nyall Dawson
38850bdb94 [pyqgis] Ensure that multiline param tags are indented for additional lines 2018-05-27 18:54:09 +10:00
Nyall Dawson
c864d22d1f Add "get ..." to doxygen compliance blacklist
Should be "gets ..." for consistent tense, or better yet
"returns ..." for consistency.
2018-05-27 14:05:06 +10:00
Nyall Dawson
1c615c15cc More documentation compliance
Use Qt style "returns .." tense instead of "return ..", and lock
this in with a documentation compliance unit test
2018-05-25 15:09:00 +10:00
Nyall Dawson
2cb8a33884 Fix broken see also links 2018-05-25 11:16:18 +10:00
Denis Rouzaud
7df2593caf move auto generated sip file in dedicated folder 2018-05-14 10:23:37 -04:00