437 Commits

Author SHA1 Message Date
qgis-bot
1d361eda2a auto sipify 🍺 2024-08-16 07:03:08 +00:00
Denis Rouzaud
9d87ecf6ec
Merge pull request #58233 from 3nids/mvt-sprites
[mvt] implement step expressions + improve conversion of sprites
2024-08-16 08:59:56 +02:00
Nyall Dawson
cc6b83449d Add some missing class docstrings 2024-08-16 07:28:29 +10:00
Nyall Dawson
8465cce48d Minor tweaks to annotation edit operations 2024-08-15 14:27:35 +10:00
Nyall Dawson
c37f3d1960 Make naming more flexible 2024-08-15 14:27:35 +10:00
Nyall Dawson
e06b9f243e Rework how callouts work with picture item with fixed sizes
When a picture annotation item is set to the fixed size mode,
and has a callout anchor set, always place the annotation itself
at a fixed offset from the callout anchor. This mimics the
behavior of the old SVG annotation decoration.
2024-08-15 14:27:35 +10:00
Nyall Dawson
deb506b5db Make translation in pixels available for annotation edit operations 2024-08-15 14:27:35 +10:00
Nyall Dawson
958d534965 Add convertFromPainterUnits method 2024-08-15 14:27:35 +10:00
Nyall Dawson
ef2528bfd8 Add render context to QgsAnnotationItemEditContext 2024-08-15 14:27:35 +10:00
Nyall Dawson
76adc371ac Ensure marker halos are drawn in legends, symbol preview icons 2024-08-15 06:25:41 +10:00
Nyall Dawson
d5511a50d8 [feature] Allow end point marker symbols for balloon callout style
Allows rendering a marker symbol below the endpoint of the balloon
callout. Designed to allow balloon callouts to reproduce the same
visual appearance as the older annotation framework items.
2024-08-15 06:25:24 +10:00
Nyall Dawson
8b04562ba7 Avoid fragile reg for argument removal 2024-08-14 13:05:46 +10:00
Nyall Dawson
182e30ab61 Simplify regex to avoid catastrophic backtracking 2024-08-13 20:28:55 +10:00
Nyall Dawson
3a578d6712 Header update 2024-08-13 20:28:55 +10:00
Nyall Dawson
e7b26478e2 Valid fixes 2024-08-13 20:28:55 +10:00
Nyall Dawson
63e81d8caf Valid improvement 2024-08-13 20:28:55 +10:00
Nyall Dawson
be8dce7d0d Valid improvements from new sipify 2024-08-13 20:28:55 +10:00
Nyall Dawson
886074c913 Rename 'None' enum members in public API
These clash with the Python bindings, where the enum value
becomes unusable
2024-08-06 19:49:10 +10:00
Nyall Dawson
5b084d39f4 Add documentation 2024-08-06 13:30:16 +10:00
Nyall Dawson
547387037f [annotations] Add support for callouts to point text item
Allows creating of callout lines (or bubble callouts) which
link the text to a map location. To create a callout, users
select the text item and then drag out the central x node
to the desired callout end point.

Callout styles can be modified through the layer styling panel.
2024-08-06 13:30:16 +10:00
Nyall Dawson
00412a41d3 [annotations] Add linked layer option for annotation layers
Adds a new "Linked layer" setting to the render page for annotation
layers, which allows users to optionally set a linked visibility
layer for the annotation layer. If set, then the annotations will
only be drawn when the linked layer is visible in the map.

This is designed to mimic the similar linked layer option for
the older annotation framework, in order to close the feature
gap between old vs new annotations

Refs https://github.com/qgis/QGIS-Enhancement-Proposals/issues/269
2024-08-03 06:40:03 +10:00
Nyall Dawson
627263ec0f Implement widget for symbol buffer settings 2024-08-02 05:09:03 +10:00
Nyall Dawson
efd700b9e1 Move geometry to QPolygonF list function to common static method 2024-08-02 05:09:03 +10:00
Nyall Dawson
b5437eef50 Add fill symbol for symbol buffers 2024-08-02 05:09:03 +10:00
Nyall Dawson
13c1a1b997 Force vector rendering of symbols when symbol has buffer enabled 2024-08-02 05:09:03 +10:00
Nyall Dawson
c6c3c77303 Populate buffer settings 2024-08-02 05:09:03 +10:00
Nyall Dawson
bf30f04d0a Make common function for copying QgsSymbol properties
Avoid fragile duplicate code in subclasses
2024-08-02 05:09:03 +10:00
Nyall Dawson
bae23c28a3 [FEATURE] Text inside rectangle annotation item
This adds a new annotation item type for rendering paragraphs
of text inside a rectangle

Options are present for:

- Text format
- Horizontal and vertical alignment
- Margins
- Background and frame symbol
2024-07-31 07:58:53 +10:00
David Koňařík
654b8bb985 Fix doc comments to align with code
The only previously implemented provider of these classes (for Cesium 3D
tiles) used values directly from the tiles, which are in meters per
spec.
2024-07-29 12:05:12 +02:00
Nyall Dawson
4a247373f0 [api] Split tolerance into separate values for red, green, blue channels
Makes the API more flexible for future use. We only expose a single
tolerance value in the UI, but in future we could expose the
separate tolerances if desired (but be wary of UI bloat!!)
2024-07-29 13:20:21 +10:00
Nyall Dawson
15128498e1 [feature] Support tolerances for QgsRasterTransparency pixel values
Allows pixels with color components just outside of the specified
RGB values to also be treated as transparent pixels

Useful for photographs or compressed rasters where a range of color
values must be made transparent
2024-07-29 13:20:21 +10:00
Even Rouault
d2272306f5 QgsBlockingNetworkRequest::get(): add an optional flag parameter 2024-07-29 12:14:29 +10:00
Nyall Dawson
6ab373284c Fix merge 2024-07-26 20:38:47 +10:00
Nyall Dawson
0c230a83e7 Add fixed size mode for picture annotations
When selected, the picture annotation will always be rendered
at the same size, regardless of the map scale
2024-07-26 20:38:47 +10:00
Nyall Dawson
75cca8a20c [FEATURE] Add picture annotation item type
Can render SVG or raster images as items in an annotation layer.
Options are present for:

- Locking the picture's aspect ratio
- Drawing with a background symbol
- Drawing with a border symbol
- Linked or embedded pictures
2024-07-26 20:38:47 +10:00
Nyall Dawson
390d59d6e3 Make current item bounds available for annotation edit operations 2024-07-26 08:51:25 +10:00
Nyall Dawson
80e77a68c5 Add context argument to annotation item edit methods
And deprecate existing ones
2024-07-26 08:51:25 +10:00
Denis Rouzaud
9ddd2de832
implement step expressions
fixes #57989
2024-07-25 10:31:12 +02:00
Denis Rouzaud
0d33487aff
[mvt] improve conversion of sprites
fixes some cases where the sprite was not defined (mainly when data defined) + support step definition
2024-07-25 10:31:12 +02:00
Nyall Dawson
c2c75f3b19
More no-value dox removal 2024-07-25 09:04:22 +10:00
Nyall Dawson
6d829ff7b4 Drop some more no value documentation 2024-07-25 04:02:55 +10:00
Nyall Dawson
6f652d251b Drop no-value copy constructor dox 2024-07-25 04:02:55 +10:00
Nyall Dawson
ad29a505e1 Fix text wrapping stability for small text
Adjust the QgsTextRenderer::calculateScaleFactorForFormat logic
so that small text is scaled up to at least 50 pixels when
calculating text metrics

This avoids tiny differences in calculated text metrics for small
text from affecting how text wrapping is calculated, which can
otherwise result in words at the end of lines "bouncing" from line
to line as layouts and maps are zoomed out
2024-07-25 04:02:33 +10:00
Nyall Dawson
2fb85192aa Fix crash when extracting symbols from project with layout legend
Legend must be initialized before calling style visitor function

Fixes #57609
2024-07-23 16:40:47 +10:00
Nyall Dawson
28943f9c1b Remove a bunch of useless default constructor doxygen 2024-07-23 02:08:28 +10:00
Nyall Dawson
bef93c5529 Fix incorrect docs 2024-07-22 07:14:34 +10:00
Nyall Dawson
51b747efce Make API more flexible, allow any layer type for callout widget functions 2024-07-22 07:14:23 +10:00
Nyall Dawson
8c067b2782 Rename QgsRenderContext custom "flags" to custom properties
And deprecate the old methods
2024-07-19 06:13:00 +10:00
Nyall Dawson
73b25dca3e
Move QgsVectorDataProvider::Capability to Qgis::VectorProviderCapability
And promote to enum class
2024-07-18 10:42:22 +10:00
Nyall Dawson
145de5fb5e
Move QgsDataProvider::ReadFlag to Qgis::DataProviderReadFlag
and promote to enum class
2024-07-18 10:01:59 +10:00