This brings to renderer for Mesh Contours option to set renderer Min Max based on extent (specific canvas, changing canvas) in the same way as renderers for Raster Layer.
Rework internals of QgsTextRenderer horizontal text rendering,
so that:
1. It's easier to read, cleaning up years of accumulated cruft
2. Split out bits into smaller functions
3. Reduce the amount of duplicate code for text layout, so that
there's only one function responsible for horizontal text layout
instead of multiple
4. Add shortcut optimisations for rendering text + buffer/shadow
at the same time, instead of always drawing these completely
independantly of each other and incurring the cost of text path
calculation multiple times for the same bit of text. In a simple
benchtest this reduces the time required for rendering many
text fragments with buffers from 40 seconds to 27 seconds.
There's still more we could do here, but it's a start...
This algorithm extracts point features corresponding to the minimum
and maximum pixel values contained within polygon zones.
The output will contain one point feature for the minimum and one
for the maximum raster value for every individual zonal feature
from a polygon layer.
Instead of always calculating the scale along the bottom of the
map, expose a choice of methods to the user (along bottom,
middle, top, or average of the three measurements)
For new scalebars, default to the average method, which better
handles the scenario where the scale at the top or bottom of
the map cannot be calculated (eg when the top/bottom of the map
falls just outside valid areas for the map's crs)
This fixes one of the most common scenarios which cause scale
bar widths to blow out to massive sizes
Refs #55240
Reduces a lot of overhead when rendering non-buffered, non-shadowed
text. Cuts render time by ~50% in my testing.
Also introduces a "PreferText" render option, where we default
to using text painting methods in all scenarios where we know
there's no loss in rendering quality to do so. This mode should
become the new default in a future QGIS release, as it is
designed to be faster with no visible rendering differences.
Expand unit testing by covering all text render modes in all
text renderer rendering tests.
And add to "Advanced Python field calculator" algorithm, as that
algorithm uses the Python exec() function and is a security
risk if run with untrusted/unchecked inputs
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
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.
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