421 Commits

Author SHA1 Message Date
uclaros
15ebae07df add userData property to 2024-06-22 10:23:34 +10:00
Nyall Dawson
5e752537dc Use SymbolRenderHint for flagging subsymbols
Instead of the extra argument to startRender
2024-06-21 23:10:32 +10:00
Nyall Dawson
fced4e16d0 Add CanCalculateMaskGeometryPerFeature flag to "simple" symbol layers
These are the symbol layer classes where there's no special logic
required relating to feature rendering and features are rendered
one-by-one, with no sub symbols.
2024-06-21 23:10:32 +10:00
Nyall Dawson
0ca28af9a0 Greatly optimise selective masking vector exports
Optimise the logic used when the new geometry backend for
selective masking is in effect:

Whenever its SAFE, instead of calculating an "entire map" clipping
path and then applying this for every feature being rendered,
we now defer the calculation of the clipping path until we
are rendering individual features. Then, we create a clipping path
which contains ONLY the mask paths which are within the area
being drawn over.

This avoids having the entire map clipping path being used for
EVERY feature being rendered, which results in huge PDF/SVG
exports when masks are in effect, and instead results in
clipping paths which are confined just to a sensible area
around each rendered feature.

In some complex test projects this reduces the PDF export
size by a factor of 0.01!! (and results in PDFs/SVGs which
open much quicker in viewers and editors, and don't grind
their operation to a halt).
2024-06-21 23:10:32 +10:00
Nyall Dawson
7d49b89265 Make installMasks return TRUE if any masks were found and installed 2024-06-21 23:10:32 +10:00
Nyall Dawson
3c2ff6894a Add argument to QgsSymbol::startRender for whether symbol is subsymbol
Allows us to know in startRender whether the symbol is actually
a subsymbol for a QgsSymbolLayer. Currently unused.
2024-06-21 23:10:32 +10:00
Nyall Dawson
9181953df7 Add method to collect symbol layer clip geometries intersecting given bounds 2024-06-21 23:10:32 +10:00
Nyall Dawson
e7bff1f50e Avoid API break 2024-06-11 07:45:09 +10:00
Nyall Dawson
0b41123cb9 Add SIP_OUT 2024-06-11 07:45:09 +10:00
uclaros
c6eb40f64f update docstrings 2024-06-11 07:45:09 +10:00
uclaros
6c0789da94 introduce error reporting parameter, limit classes to 999 2024-06-11 07:45:09 +10:00
Nyall Dawson
aa39eabde1 Add framework for feature renderer level data defined properties 2024-05-10 12:06:18 +10:00
Nyall Dawson
61b72b7d96 Fix see also 2024-05-10 06:09:56 +10:00
Nyall Dawson
59bc838172 Show a color ramp legend for vector heatmap layers
Instead of showing no legend for these layers, show the color
ramp as a gradient bar

Fixes #54772
2024-05-10 06:09:56 +10:00
Nyall Dawson
04f96fcf4b Move responsibility for creating vector legend nodes to renderer
This will allow renderer subclasses to create legend nodes which
aren't QgsSymbolLegendNodes.
2024-05-10 06:09:56 +10:00
Nyall Dawson
43fb3b57e3 Remove deprecation marking breaking qt 6.7 build 2024-05-01 13:45:55 +10:00
Even Rouault
a68422b982 Various typo fixes
Including 3 public methods, which are deprecated by this commit and replaced by a typo-fixed version
2024-02-29 06:03:03 +10:00
Even Rouault
844e2a953f
Add missing parameter documentation 2024-02-18 20:57:23 +01:00
Even Rouault
15ea5c46bc
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-18 20:57:23 +01:00
Even Rouault
02caeb9db7
Header files: remove all mentions of '\since QGIS 2.' 2024-02-18 20:46:01 +01:00
Nyall Dawson
ac2f1179c8 More item data role enum to enum class conversions 2024-02-06 21:04:43 +10:00
Nyall Dawson
f1e3ba9e2d Use correct sip method
And use INDENT-OFF annotations to avoid astyle messing up
formatting of enum with inline macros
2024-01-31 13:48:49 +10:00
Nyall Dawson
23f3af4290 Use enum classes for QgsProperty property keys
Should fix usage on Qt 6 builds
2024-01-31 13:48:49 +10:00
Nyall Dawson
976c86d03d Implement lazy initialization of default style library
Populating the style library from the database can be a time
consuming process, especially if a user has many symbols
present in their library.

But for many standalone scripts, and for qgis_process, the
style database may not be required.

Let's defer initialization of it until it's actually required,
saving the startup cost in qgis_process and 3rd party scripts.

On my system with a style database containing ~700 items this
cuts down qgis_process startup times by around 25%
2024-01-10 12:24:59 +10:00
Nyall Dawson
c273779b72 Remove separate size unit for width and height, and just use
one unit for both to match raster marker behavior
2023-11-08 14:19:40 +10:00
Nyall Dawson
c3309a3cbc Clear some warnings 2023-11-08 14:19:40 +10:00
Nyall Dawson
7a19ecfd33 [feature] Add height setting for raster fill symbol layer type
This allows users to control the width and height of the fill
pattern indepently, allowing for stretched raster fills in the
horizontal or vertical directions

Sponsored by North Road, thanks to SLYR
2023-11-08 14:19:40 +10:00
Mathieu Pellerin
cacbb06d94
[symbology] Fix font marker inserting illegal characters in a saved project's XML document (#55041) 2023-11-08 10:25:03 +07:00
Nyall Dawson
16c8c88247 New "Filled line" symbol layer type
This adds a new line symbol type which renders lines using a
fill symbol. The interior of the line is drawn using any standard
QGIS fill symbol, allowing for lines filled with gradients, line
hatches, etc.

Sponsored by North Road, thanks to SLYR
2023-11-06 11:42:28 +10:00
Mathieu Pellerin
34e247cbbd Address review 2023-09-01 07:51:39 +10:00
Mathieu Pellerin
53b0763346 Add documentation, adjust tests 2023-09-01 07:51:39 +10:00
Mathieu Pellerin
51ca525256 [renderer] Use a UUID string to identify graduated renderer legend symbols 2023-09-01 07:51:39 +10:00
Mathieu Pellerin
ae8b980800 [renderer] Use a UUID string to identify categorized renderer legend symbols 2023-09-01 07:51:39 +10:00
Nyall Dawson
37ec173868 Add Qgis::SymbolLayerUserFlags for user-controlled flags which
alter the handling of symbol layers

These differ from Qgis::SymbolLayerFlag in that
Qgis::SymbolLayerFlag flags are used to reflect the inbuilt properties
of a symbol layer type, whereas Qgis::SymbolLayerUserFlag are optional,
user controlled flags which can be toggled for a symbol layer.

Add a flag `DisableSelectionRecoloring` which can be set for
symbol layers which prevents the layer from being recolored to
the render context selection color even when the feature
being rendered is selected

This provides a mechanism for an individual symbol layer to
avoid the forced recolor of selected features.
2023-08-02 12:49:01 +10:00
Nyall Dawson
7d4c4e3ce2 Address review 2023-06-22 18:49:22 +10:00
Nyall Dawson
ff7a5c934c Fix pixelated icons in style lists on hi dpi displays
Use QgsScreenProperties in style model to ensure we
correctly generate preview icons matching the device
pixel ratio and DPI of all attached displays
2023-06-22 18:49:22 +10:00
Nyall Dawson
b5e3af7a3a Use QgsScreenProperties instead of direct QScreen pointers 2023-06-22 18:49:22 +10:00
Nyall Dawson
0641766902 Fix incorrect sizing & pixelation of symbol previews on hidpi
displays
2023-06-22 18:49:22 +10:00
Nyall Dawson
1298018bc4 Fix incorrect sizing of symbol layer previews on hidpi display,
pixelated icons
2023-06-22 18:49:22 +10:00
Nyall Dawson
86f06d065b Add framework for style model to handle generation of icons
with different device pixel ratios
2023-06-21 13:46:50 +10:00
Mathieu Pellerin
31d5d6360e [dxf] Use a single reference bock when exporting markers with only data defined size and/or angle 2023-05-27 15:07:17 +07:00
Nyall Dawson
06ed5bd86e Remove unnecessary setAngle/angle overrides in QgsPointPatternFillSymbolLayer 2023-04-14 03:53:52 +10:00
Nyall Dawson
50c76929e1
Followup 30700f1, ensure links to Qgis members are set in docstrings 2023-03-31 10:46:24 +10:00
Alexey Karandashev
30700f1ef1 Fix GeometryType in documentation:
QgsWkbTypes::GeometryType to Qgis::GeometryType
and QgsWkbTypes::<geometry>Geometry to Qgis::GeometryType::<geometry>
2023-03-31 10:28:36 +10:00
Nyall Dawson
efbfaf8046 Add QgsFeatureRenderer::legendKeys method to retrieve all legend
keys for the renderer
2023-03-08 14:27:51 +10:00
Nyall Dawson
b170c0f97e Nicer documentation 2023-03-08 14:27:51 +10:00
Nyall Dawson
723ad914d3
Fix some warnings 2023-02-28 09:01:54 +10:00
Julien Cabieces
8f32f07433 Treat review comments
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2023-02-27 09:24:40 +01:00
Julien Cabieces
7a2a252d0d fix doc and typos 2023-02-27 09:24:40 +01:00
Julien Cabieces
f8c1c16ec7 fix duplicate layer 2023-02-27 09:24:40 +01:00