Double-clicking a handle will auto-size the label to exactly fit
the contained text (growing or shrinking as needed). The opposite
side of the label will remaining fixed in place, so eg double-click
the bottom-right handle causes the bottom-right corner of the label
to move.
This is similar to what is achieved in
`QgsRasterLayer::refreshRenderer()` to refresh the renderer according
to an extent. Contrary to the first one, this method does not perform
any GUI update or emit any signal.
It is not used at the moment. This will replace the logic to refresh a
renderer in the following commits.
This is similar to what is achieved in
`QgsRasterLayer::refreshRendererIfNeeded()` to check if the renderer
needs to be refresh according to an extent. It does not perform any
refresh.
It is not used at the moment. This will replace the logic to refresh a
renderer in the following commits.
This commit adds support for the CSS ``background-color`` and
``background-image`` properties when used with HTML labels.
- Backgrounds are supported for block items (eg ``<div>``) or inline
items (eg ``<span>``)
- For images, the CSS should be formatted as ``background-image: url(xx)``.
It supports local file paths, http links, or base64 embedded content
- Backgrounds are not supported for curved text
- HTML backgrounds are always rendered above any background shape for
the label, and below drop shadows/buffers
Sponsored by City of Freiburg im Breisgau
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.
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.
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.
Adds support for CSS margin properties for block elements in
the text renderer. Specifically:
- This is available for block type elements only, eg DIV, P, H1-H6.
- Margins are NOT available for spans or other non-block content (due to Qt
limitations)
- Margins can be specified in pt units only
- Margins can be specified either via "margin-left: 5pt; margin-right:
10pt" etc, or "margin: 5pt 0pt 10pt 0pt"
- Negative margins are supported for the bottom margin ONLY (due to Qt
limitations)
We add a new setOutputZUp(true) option to QgsTessellator so that
the coordinates on output do not get flipped from [x,y,z] to [x,-z,y].
The default is still the old behavior with flipped axes (to make sure
we do not break the API), but all uses in the QGIS code were upgraded
to use the new option.
This means we do not need to add rotation to polygon / buffered line
symbol's 3D entities in 3D map views (and there's only translation left, yay!)