Skip to content

QGIS plugin 0.7.2 — a hatched polygon comes home hatched

Choose a tag to compare

@bravemaster3 bravemaster3 released this 11 Sep 17:34
· 8 commits to main since this release
7589805

Install the zip below — Plugins ▸ Manage and Install Plugins ▸ Install from ZIP — and restart
QGIS. The instance needs nothing; this is a plugin-only release.

A hatched polygon comes home hatched

Opening a portal from GeoDeploy drew every pattern fill — hatch, cross, dense, line, point — as a
solid block of colour, on all three routes at once (fast preview, editable, with a token and
without), because all three end in the same symbol builder.

Two faults, and neither was visible in the style: fill_pattern was present, correct and
byte-identical across the whole round trip. Only the pixels were wrong.

A solid fill was painted under the tile, in the style's own colour, with the hatch then laid on
top of it in that same colour — a solid block by definition. A diagonal hatch QGIS drew 82%
transparent came back 0% transparent.

And the tile's width was stated in millimetres, where QgsRasterFillSymbolLayer counts in
pixels. It is the one size in this plugin whose default unit is not millimetres, so a 16-pixel
hatch tile drew at 4 pixels — finer than the hatch's own period, which turns the diagonals into a
grey stipple that reads as a flat wash rather than as a small hatch.

A fill beneath a pattern now travels in the tile

MapLibre draws fill-pattern instead of fill-color, so a plain fill sitting under a hatch has
nowhere else to live: a red polygon with a black hatch used to publish with the red missing. It is
painted into the tile itself now, which is what lets the browser and QGIS draw the same thing. And
a polygon that is only a pattern says it has no outline, instead of being given the default blue
one.

Checked by rendering, not by reading

Eleven pattern kinds are drawn before and after and their ink compared — the mean alpha of the
rendered swatch — since a style-dict assertion could not see any of this. Run against the code
before this change, the new section fails eleven times with "QGIS drew 15%, it came back 100%".

569 matrix and 349 real-QGIS checks pass on both qgis:ltr and qgis:4.2.