In compositions, a flag must be explicitly set to indicate
whether the render occuring is for "previews" (i.e.
rendering in a graphics view) or outputs (i.e. rendering
to a image/pdf/other destination device)
This isn't nice api.
So we avoid this by checking the paint device type when
an item is being rendered.
Initially only flag available is whether to sort drivers by
recommended order. The recommended order puts GPKG first and
SHP second, then leaves the rest alphabetical.
This fixes a few instances in the QGIS gui where these recommended formats
are not listed first.
This commit fixes a possible crash when the vector layer renderer
attempts to render a multipolygon containing a polygon without
an exterior ring.
The underlying cause of the creation of this invalid geometry is deeper,
but this commit hardens the renderer and makes it more robust for
handling bad geometries.
Fixes#17365
The tolerance option was not correctly calculated, resulting in
semi-random behavior for networks which relied on a non-zero
tolerance.
Also possible speed boost for complex networks by using
proper spatial index instead of custom sorting/filtering code.
Refs #17325
If file has been modified since the cache, regenerate a new cache
image.
We don't want to check the file modified time too often though,
(e.g., we don't want to check for every point render in a 100k
point file), so use a hardcoded 30 second minimum time between
consecutive file modified checks.
This means that file modifications occuring more often than
every 30 seconds won't be picked up till 30 seconds has elapsed
since the last modification. But at the same time it means that
if the render takes < 30 seconds we'll only check each svg
at most once (and if a render takes > 30 seconds, adding a few
more milliseconds won't hurt!).
Fixes#13565
QgsSvgCache::svgAsPicture was rendering an implicitly shared copy when
the picture had already been cached. It turns out that rendering an
implicitly shared QPicture copy isn't thread safe, and rendering shared
copies simulataneously across different threads leads quickly to a crash.
Accordingly we always detach the QPicture objects returned by
svgAsPicture, so that the returned QPicture is safe to use across threads.
Also add unit tests for this, and a similar unit test to verify that
rendering of QImage based cached copies does *not* suffer the same
issue.
Fixes#17089, #17077
- QgsGeometry::fromPoint() was renamed to fromPointXY()
- QgsGeometry::fromMultiPoint() was renamed to fromMultiPointXY()
- QgsGeometry::fromMultiPolyline() was renamed to fromMultiPolylineXY()
- QgsGeometry::fromPolygon() was renamed to fromPolygonXY()
- QgsGeometry::fromMultiPolygon() was renamed to fromMultiPolygonXY()