483 Commits

Author SHA1 Message Date
Nyall Dawson
b81e0d83f6 Fix non-compliant class brief documentation 2025-03-30 20:48:07 +10:00
Nyall Dawson
f480c2a04e Add all missing class brief descriptions 2025-03-28 14:23:56 +10:00
Nyall Dawson
1f8a585c5c Make signal const 2025-03-28 10:02:25 +10:00
Nyall Dawson
aa65f01140 Make more symbol factory methods memory safe 2025-03-28 10:02:25 +10:00
Nyall Dawson
596ddb2f4e More memory safety for loading symbols 2025-03-28 10:02:25 +10:00
Nyall Dawson
13aae162f0 Promote marker symbol alignment enums to enum class, move to Qgis 2025-03-05 19:02:47 +10:00
signedav
222f2c61b1 Introducing new VectorAnchorPoint Baseline to align font markers to their baseline. In GUI only exposed to font marker settings. Beautiful VerticalAnchorMode removed because it's an overhead. 2025-03-03 17:12:32 +10:00
signedav
6b5396bd53 introduce VerticalAnchorMode in FontSymbols to have a proper 'hidden' setting for this mode making a differene between legacy and baseline (and future bounds) on the positioning of the characters 2025-03-03 17:12:32 +10:00
signedav
f80df88534 with the parameter fixverticalanchor, the position of the point is calculated with the same offset like the offset of the font. this differed before what leaded to issues. still the old way is available as legacy 2025-03-03 17:12:32 +10:00
Nyall Dawson
632d196e62 Don't show useless "available in python as" notes in PyQGIS docs
Since the method name used in the docs is ALREADY the python version!
2025-02-28 18:32:09 +10:00
Nyall Dawson
46b0436bbc Also fix render order for arrow line 2025-02-14 14:37:04 +10:00
Nyall Dawson
ed0bd43ee0 Also fix render order for filled line 2025-02-14 14:37:04 +10:00
Nyall Dawson
849063d4e5 Fix render order of symbol layers for filled marker subsymbol
If a filled marker had eg a centroid fill marker in the subsymbol,
this would always be rendered on top, regardless of the actual
defined order
2025-02-14 14:37:04 +10:00
Nyall Dawson
8f4893d8b2 Move some useful utility methods to QgsSymbolLayerUtils 2025-02-13 14:54:20 +10:00
Nyall Dawson
60360f9b97 Add method to directly convert QgsAbstractGeometry to QPolygonF lists
This overload avoids creating a QgsGeometry if we only have a
QgsAbstractGeometry pointer object to convert
2025-02-13 14:54:20 +10:00
Julien Cabieces
ed11cc6951 design(MaskSymbolLayer): add clearMasks only in mask symbol layer 2025-02-05 09:48:12 +10:00
Julien Cabieces
87ffd09aff fix(CategorizedRenderer): reset mask information on source symbol
Both symbol layer ids and masks need to be removed from symbol
layers which can be inherited from a converted renderer
2025-02-05 09:48:12 +10:00
Julien Cabieces
ed64834106 api(deprecated): add message to deprecated SIP annotation 2024-12-17 09:06:42 +01:00
JuhoErvasti
c130eb7c3d Add \since to new functions 2024-12-10 09:56:33 +10:00
JuhoErvasti
b373c8b3aa Address review 2024-12-10 09:56:33 +10:00
Juho Ervasti
6b6a4d5549 Add unit selection for extent buffer 2024-12-10 09:56:33 +10:00
Juho Ervasti
bb737f3cac Disallow negative buffer 2024-12-10 09:56:33 +10:00
Juho Ervasti
13ee0bf5cf Apply suggestions from review 2024-12-10 09:56:33 +10:00
Juho Ervasti
e7a27d05c7 Fix style 2024-12-10 09:56:33 +10:00
JuhoErvasti
5c49205bd2 Add maximumExtentBuffer() function to QgsFeatureRenderer 2024-12-10 09:56:33 +10:00
JuhoErvasti
ccc7df5966 Add extent buffer property to QgsSymbol 2024-12-10 09:56:33 +10:00
Denis Rouzaud
76f702e48a sipify 2024-12-05 13:19:50 +01:00
Nyall Dawson
37478db0c1 Fix more function links 2024-12-03 12:57:44 +10:00
Nyall Dawson
2abc9d92ca [sld] Don't try to write rules/categorizes without symbolizers
Only create rules/categorized categories/graduated ranges if the
associated symbol could be converted to SLD, and is not an "empty"
symbol.

Otherwise we do not generate a rule, as SLD spec requires a
Symbolizer element to be present.
2024-11-19 21:06:26 +10:00
Nyall Dawson
f446bda82a [optimisation] Greatly speed up clone of QgsSvgMarkerSymbolLayer
The old method was very inefficient, as it required a re-load and
re-parse of the associated SVG file content with every clone, only
for many of the parsed properties to be immediately overwritten.

Optimise by just directly copying members, avoiding all unnecessary
work.

This is frequently seen as a hotspot when profiling map renders,
as that involves cloning all symbol layers upfront.

Speeds up a benchtest cloning 100k markers from 4.3 seconds to
150ms.
2024-11-19 12:40:44 +10:00
Nyall Dawson
f2f05abca1 Cleanup docs, use \param instead of @param 2024-10-16 13:01:39 +10:00
Nyall Dawson
bc28bfd333 Fix/suppress more duplInheritedMember warnings 2024-10-15 15:00:05 +10:00
Nyall Dawson
6b344cd1fc Remove broken swap methods, replace with standard assignment op
which correctly sets all members
2024-10-15 15:00:05 +10:00
Nyall Dawson
de73f3c975 Add docs 2024-10-15 15:00:05 +10:00
Nyall Dawson
967388df86 Fix cppcheck 'function can be const' warnings 2024-10-15 15:00:05 +10:00
Nyall Dawson
1fc5ae33aa Add missing sip cast for QgsFilledLineSymbolLayer 2024-09-16 16:52:20 +10:00
Nyall Dawson
c50c923261 Add API to determine if feature renderer affects labeling results 2024-09-14 13:25:59 +10:00
Nyall Dawson
391b61544e
Handle SIP_OUT with void functions 2024-09-10 11:46:47 +10:00
Nyall Dawson
b39f760cbc
Correctly handle multiline SIP_OUT param documentation 2024-09-10 11:11:25 +10:00
Nyall Dawson
05003ba2fa [feature] Add "Linear Referencing" symbol layer type
This new symbol layer type allows placing text labels at regular
intervals along a line (or at positions corresponding to
existing vertices). Positions can be calculated using
Cartesian distances, or interpolated from z/m values.

Functionality includes:

- Labels can be placed using fixed cartesian 2d distances,
at regular linearly interpolated spacing calculated using
the Z or M values in geometries, or at existing vertices
- Labels can show either the running total distance, or
the linearly interpolated Z/M value
- Uses text rendered to draw labels, so the full range
of functionality is available for the labels (including
buffers, shadows, etc)
- Uses the QGIS numeric format classes to format numbers
as strings, so users have full range of customisation
options for eg decimal places
- An optional "skip multiples of" setting. If set, then
labels which are a multiple of this value will be skipped
over. This allows construction of complex referencing labels,
eg where a symbol has two linear referencing symbol layers,
one set to label every 100m in a small font, skipping multiples
of 1000, and a second set to label every 1000m in a big
bold font
- Labels are rendered using an angle calculated by averaging
the linestring, so sharp tiny jaggies don't result in
unslightly label rotation
- Optionally, markers can be placed at referenced points
in the line string, using a full QGIS marker symbol (this allows
eg showing a cross-hatch at the labeled point, for a "ruler"
style line)
- Data defined control over the placement intervals, skip
multiples setting, marker visibility and average angle
calculation length

Notes:

- When using the distance-based placement or labels, the
distances are calculated using 2D only, Cartesian calculations
based on the original layer CRS. This could potentially be
extended in future to expose options for 3D Cartesian distances,
or ellipsoidal distance calculations.

Sponsored by the Swiss QGIS User Group
2024-09-04 19:06:26 +10:00
Nyall Dawson
55f78cfce1 Fix QgsSvgCache parameter formatting 2024-09-04 13:54:39 +10:00
Nyall Dawson
609abe07aa Fix test 2024-09-04 13:54:39 +10:00
Nyall Dawson
9e36048b32 Remove dead code 2024-09-04 13:54:39 +10:00
Nyall Dawson
79f2f8a412 Cleanup some CPT city docs 2024-09-04 13:54:39 +10:00
Nyall Dawson
0f1daa11f3 Fix formatting of some \see links 2024-09-04 06:32:03 +10:00
Nyall Dawson
ef0289f3ec Fix formatting of Python ..deprecated annotations in docstrings
Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/174
2024-09-02 11:42:12 +10:00
Nyall Dawson
a6f5c50b36 Move some style related enums out of global namespace 2024-08-31 06:20:02 +10:00
Nyall Dawson
49d31fa527 Fix some malformed docs 2024-08-30 05:47:07 +10:00
Nyall Dawson
519959154a Fix some overly verbose class "brief" descriptions 2024-08-28 11:58:21 +10:00
Nyall Dawson
cc6b83449d Add some missing class docstrings 2024-08-16 07:28:29 +10:00