93 Commits

Author SHA1 Message Date
nirvn
0e4f0c8555 [symbology] Fix broken centroid fill's force point inside polygon 2019-06-26 12:05:07 +07:00
Nyall Dawson
850ea71c4d More wip 2019-06-21 15:52:56 +10:00
Nyall Dawson
d4d77808f9 Style model work 2019-06-21 15:52:56 +10:00
Nyall Dawson
0fd4984b3b [FEATURE] Allow storage of label settings in style manager
Just like the earlier change which allows for text formats to
be managed in style manager, this change allows for layer-wide
label settings to be stored and managed in styles.

So while a text format includes just the font settings and other
appearance related settings, Label Settings also includes layer-type
specific settings such as label placement, priority, rendering
settings.
2019-06-21 15:52:56 +10:00
Nyall Dawson
6f172da7e0 Fix dox 2019-06-21 15:52:56 +10:00
Nyall Dawson
554d23b324 Improve handling of favorites in QgsStyleModel and proxy model
Fixes favorite entities sometimes incorrectly filtered out
2019-06-21 15:52:56 +10:00
Nyall Dawson
40e4789ba1 [API] Add support for text renderer formats to QgsStyle 2019-06-21 15:52:56 +10:00
Nyall Dawson
e23ceaa806 Mark render features methods as throwing QgsCsException, to allow it to be nicely caught in Python 2019-05-22 07:12:06 +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
3747cf7870 [FEATURE][symbology] Unlock string as character for font markers 2019-04-30 18:32:03 +07:00
Nyall Dawson
ebab2e128b Add missing /Transfer/ annotation 2019-04-26 12:59:26 +10:00
nirvn
cb9b3b458d Add forgotten since tags on new point pattern fill functions 2019-04-25 09:53:40 +07: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
henrik
cf63e00500 Added tests for PointDisplacementRenderer labels. 2019-03-26 18:17:12 +10:00
henrik
6fb06738ec [FEATURE] [needs-docs] Point Displacement label distance factor
Adds label distance factor spinbox to Point Displacement symbology
window. Calculates label distance based on the current symbology
diagonal instead of a general maximum diagonal.

Replaces the hard coded distance "symbolDiagonal/2.0" with
"symbolDiagonal*mLabelDistanceFactor", where mLabelDistanceFactor is set
to the spinbox value.

 It's an old feature request (Point displacement labels adjustable
offsets "https://issues.qgis.org/issues/5945").
2019-03-26 18:17:12 +10:00
Nyall Dawson
427ea515a5 Deprecate some more methods 2019-03-22 12:16:22 +10:00
Nyall Dawson
16a64ed84d Deprecate some methods, dox++ 2019-03-22 12:16:22 +10:00
Nyall Dawson
fa202795b0 Dox++ 2019-03-22 12:16:22 +10:00
Nyall Dawson
1dc447e1f2 Dox++ 2019-03-21 12:44:16 +10:00
Nyall Dawson
107b48a430 Add NULLPTR macro for use in doxygen comments
For the c++ api dox this expands to "\c nullptr" (the
\c directive indicates a code literal value), and for sipify/Python
it expands to ``None`` (`` is sphinx annotation for literal values)

Makes for nicer dox for both c++ and Python!
2019-02-27 09:41:11 +10:00
Nyall Dawson
a7ca08784c Nullptr consistency in dox 2019-02-27 09:41:11 +10:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
Nyall Dawson
519a30f10c Standardise dox for signals 2019-02-26 03:24:31 +10:00
Nyall Dawson
7eab74f803 Fix use of trailing */ in dox, which messes with sipify Python documentation output 2019-02-25 19:02:12 +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
Mathieu Pellerin
8ac762e5e1
[ui] Fix tiny vertex marker on hidpi 2019-02-04 16:43:04 +07:00
Nyall Dawson
4022c5fc38 Make QgsSymbolLayerUtils::symbolPreview* methods const, and utilise
internal symbol clones

Rendering symbols is a NON-CONST operation, which can permanently
alter the symbol instance (e.g. via changes made by the symbol
or symbol layer's startRender methods.).

This makes debugging super complex - because methods which look
like they are just generating previews of symbols can actually
change the original symbol instances, resulting in permanent changes
to a layer's style.

Refs #19910 (specifically, me pulling my hair out trying to deduce
seemingly random changes to layer's symbols)
2019-01-25 23:27:52 +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
Nyall Dawson
2aab28380c [browser] Don't show gdal/ogr layer items for QGIS style xml files
These aren't layers, so the extra entries are just distracting noise.
2019-01-16 12:10:25 +11:00
Nyall Dawson
63204cfdb5 Fix travis 2019-01-08 11:10:40 +10:00
Nyall Dawson
224df0a273 Add missing documentation for QgsCategorizedRenderer 2019-01-08 11:10:40 +10:00
Nyall Dawson
d32714c899 [API] Allow categorized renderer category values to be lists of values
When a category is a list of values, that category will apply to
any of the values from the list
2019-01-08 11:10:40 +10:00
Nyall Dawson
74b96ce955 Dox++ 2019-01-08 11:10:40 +10:00
Matthias Kuhn
8b6eaeab52
Bindings for QgsCategorizedSymbolRenderer::createCategories
also contains some code modernization
2018-12-10 10:16:00 +01:00
nirvn
c6425338ee [FEATURE] Raster image marker 2018-12-05 15:44:44 +07:00
Nyall Dawson
cdba8f5621 Use QgsAbstractContentCache base class for QgsSvgCache 2018-12-05 11:14:13 +07:00
Juergen E. Fischer
60ea432cbc fix windows build (partly reverts 1a199d095) 2018-11-27 23:16:03 +01:00
Nyall Dawson
6cc41a9474 Remove an incorrect /Transfer/ annotation, add a missing /Transfer/ annotation 2018-11-27 19:07:06 +10: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
Nyall Dawson
a947bb3b9b Dox++ 2018-11-09 19:06:48 +10:00
Nyall Dawson
73d0ced5df [FEATURE] Add option to force right-hand-rule during polygon symbol rendering
This new option, available under the "Advanced" button for fill symbols,
allows forcing rendered polygons to follow the standard "right hand
rule" for ring orientation (where exterior ring is clockwise, and
interior rings are all counter-clockwise).

The orientation fix is applied while rendering only, and the original
feature geometry is unchanged.

This allows for creation of fill symbols with consistent appearance,
regardless of the dataset being rendered and the ring orientation
of individual features.

Refs #12652
2018-11-09 19:06:48 +10:00
Nyall Dawson
a1a35e91cc Dox++ 2018-10-15 11:47:01 +10:00
Nyall Dawson
f07462b69a Spelling 2018-10-15 11:47:01 +10:00
Nyall Dawson
8f6ee1c40d Dox 2018-10-15 11:47:01 +10:00
Denis Rouzaud
ef1efebda4 forward declaration of QgsPoint 2018-10-09 11:48:33 -08:00