[Qgis-user] can't apply mask on labels

Andreas Neumann andreas at qgis.org
Thu Mar 7 00:39:19 PST 2024


 Hi all,

The mask is more flexible and cartographically more pleasing if you don't
have a homogenous single-color background on your map. The mask is the only
way to get rid of darker colors while keeping light background colors.

See f.e. this example here:

https://s.geo.admin.ch/bb5itd6k85y7

Have a look at the large labels "Pfaffhausen", "Benglen", "Schwerzenbach"
and "Fällanden". Darker colors from roads (black) and rivers (blue) are
masked, but lighter colors from forests, lakes and hillshading are
preserved. The mask is the only way to achieve this "selective" effect of
masking.

All other options like background rectangles or buffers have a fixed color
and only work on a homogeneous background. They wouldn't be able to achieve
the effect of the example above.

I hope this clarifies the difference in the approaches?

The only major problems with the masks are the following limitations
(hopefully they can be removed in the future):
- they cannot be used within the same layer (you need to duplicate layers
if you want to mask features with labels from the same layer)
- they don't yet work on vector tiles, because vector tiles aren't real
QGIS vector layers with all the symbology options. They only have a limited
set of symbology so far

Greetings,
Andreas
--
Andreas Neumann
QGIS.ORG board member (treasurer)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20240307/8bc4374b/attachment.htm>


More information about the QGIS-User mailing list