<div dir="ltr">
<div>Hi all,</div><div><br></div><div>The mask is more flexible and 
cartographically more pleasing if you don't have a white background on 
your map. Also, if your background varies (multiple colors (e.g. lake, 
forest, agriculture), the mask is the only way to get rid of darker 
colors while keeping light background colors.</div><div><br></div><div>See f.e. this example here:</div><div><br></div><div>
<a href="https://s.geo.admin.ch/bb5itd6k85y7">https://s.geo.admin.ch/bb5itd6k85y7</a>

</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>I hope this clarifies the difference in the approaches?</div><div><br></div><div>The only major problems with the masks are the following limitations (hopefully they can be removed in the future):</div><div>-
 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)</div><div>-
 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</div><div><br></div><div>Greetings,</div><div>Andreas</div>

</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 7 Mar 2024 at 09:19, Huesmann, Michaela via QGIS-User <<a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-1906897308365340851">







<div lang="DE">
<div class="m_-1906897308365340851WordSection1">
<p class="MsoNormal"><span>Hello all,<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>I always use the funktion „Tampon“ (German „Puffer“) instead of „Masque“ (German „Maske“)  because I still do not understand how to configurate a mask.
<u></u><u></u></span></p>
<p class="MsoNormal"><span>Also I wonder what the difference in symbology and use is. Maybe someon can explain that to me and the group?<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>With the Tampon/Buffer/Puffer I do not need to duplicate the Layer.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Puffer<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><img width="638" height="514" style="width: 6.6458in; height: 5.3541in;" id="m_-1906897308365340851Grafik_x0020_5" src="cid:ii_18e180d83465b006a3"><span><u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Maske<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Duplication of the layer and mask for the duplicate with label does not work in my test. I tried different choices in the options.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><img width="607" height="219" style="width: 6.3229in; height: 2.2812in;" id="m_-1906897308365340851Grafik_x0020_1" src="cid:ii_18e180d83464cff311"><span><u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><img width="721" height="411" style="width: 7.5104in; height: 4.2812in;" id="m_-1906897308365340851Grafik_x0020_2" src="cid:ii_18e180d8346772f6c4"><span><u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><img width="723" height="439" style="width: 7.5312in; height: 4.5729in;" id="m_-1906897308365340851Grafik_x0020_3" src="cid:ii_18e180d8346935e6e5"><span><u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><b></b></p>
</div>
<br>
<table class="m_-1906897308365340851ImprintUniqueIDTable" style="height:185px;width:556px;border-collapse:collapse" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="width:260px" width="175"><a href="http://www.steinfurt.de" target="_blank"><img width="228" height="98" style="border: 0px solid;" src="cid:ii_18e180d8347ce9165c69" alt="Kreisstadt Steinfurt"></a><br>
<br>
 - <font style="font-family:Arial;font-size:10pt;color:rgb(125,125,125)">48565</font> <font style="font-family:Arial;font-size:10pt;color:rgb(125,125,125)">Steinfurt</font><br>
<font size="2" face="Arial"><span style="color:rgb(125,125,125);text-decoration:none"><a href="http://www.steinfurt.de" title="" style="color:rgb(125,125,125);text-decoration:none" target="_blank"><span style="color:rgb(125,125,125);text-decoration:none">www.steinfurt.de</span></a></span></font></td>
<td style="width:295px" valign="top"><font face="Arial"><font size="2"><br>
<br>
Mit freundlichen Grüßen</font><br>
</font><font size="2" face="Arial">im Auftrag<br>
</font><font style="font-family:Arial;font-size:13.5pt;color:rgb(0,0,0);font-weight:bold">Michaela<font style="font-family:Arial;font-size:13.5pt;color:rgb(0,0,0);font-weight:bold">
</font>Huesmann</font><span style="font-size:5pt"><font face="Arial"> </font></span><span style="font-size:10.5pt;font-family:Arial;color:rgb(0,0,0)"><br>
<font style="font-family:Arial;font-size:10pt;font-style:italic">Geodaten</font><br>
<font style="font-family:Arial;font-size:10pt">Fachdienst Tiefbau</font><br>
</span><font face="Arial"><span style="font-size:5pt"> </span><br>
</font><font style="font-family:Arial;font-size:10pt;color:rgb(0,0,0)"><font style="font-family:Arial;font-size:10pt;color:rgb(0,0,0)">Tel.:
</font>+49 2552 925 219</font><br>
<span style="font-size:9pt;font-family:Arial;color:rgb(0,0,0)"><font size="1"><font size="2">Fax:</font>
</font><br>
</span><span style="font-size:9pt;font-family:Arial;color:rgb(0,0,0)"><font style="font-family:Arial;font-size:10pt;color:rgb(0,0,0);text-decoration:none">E-Mail:
</font><span style="font-family:Arial;font-size:10pt;color:rgb(0,0,0);text-decoration:none"><a href="mailto:michaela.huesmann@Stadt-Steinfurt.de" title="Click to send email to Huesmann, Michaela" style="font-family:Arial;font-size:10pt;color:rgb(0,0,0);text-decoration:none" target="_blank"><span style="font-family:Arial;font-size:10pt;color:rgb(0,0,0);text-decoration:none">michaela.huesmann@Stadt-Steinfurt.de</span></a></span></span></td>
</tr>
</tbody>
</table>
<font color="#a5a5a5" size="1" face="Arial"><font color="#7d7d7d"><font color="#7d7d7d"><br>
Bitte denken Sie an die Umwelt, bevor Sie diese E-Mail ausdrucken.</font><br>
</font></font><br>
<div class="m_-1906897308365340851WordSection1">
<p class="MsoNormal"><b>Von:</b> QGIS-User <<a href="mailto:qgis-user-bounces@lists.osgeo.org" target="_blank">qgis-user-bounces@lists.osgeo.org</a>> <b>
Im Auftrag von </b>Andreas Neumann via QGIS-User<br>
<b>Gesendet:</b> Mittwoch, 6. März 2024 21:29<br>
<b>An:</b> Émilie Berthiaume <<a href="mailto:eberthiaume@csfoy.ca" target="_blank">eberthiaume@csfoy.ca</a>><br>
<b>Cc:</b> <a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a><br>
<b>Betreff:</b> Re: [Qgis-user] can't apply mask on labels<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Hi Emilie,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I believe that currently a limitation that a layer cannot mask itself.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">For this to work, you'd have to duplicate the layer - once for the lines and once for the labels - then the mask should work. On the label layer you can disable the drawing of the lines and of course on the line layer you only apply the
 mask from the other layer, but don't enable any labels.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Not sure if - or how soon this limitation can be fixed.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Hope this helps,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Andreas<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Wed, 6 Mar 2024 at 21:00, Émilie Berthiaume via QGIS-User <<a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-width:medium medium medium 1pt;border-style:none none none solid;border-color:currentcolor currentcolor currentcolor rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<div>
<p class="MsoNormal"><span lang="FR-CA">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA">I’m trying to apply a mask on the labels of my contour lines layer in a topographic map project.  I have activated the mask in the labels tab :<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA"><img border="0" width="502" height="367" style="width: 5.2291in; height: 3.8229in;" id="m_-1906897308365340851m_5678223470379831817Image_x0020_2" src="cid:ii_18e180d8346248370d6"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA">And then I activated the symbol I wanted to hide in the mask tab :<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA"><img border="0" width="531" height="344" style="width: 5.5312in; height: 3.5833in;" id="m_-1906897308365340851m_5678223470379831817Image_x0020_3" src="cid:ii_18e180d83472564e8e7"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA">But it doesn’t seem to work.  There is still a line underneath my labels :<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA"><img border="0" width="206" height="158" style="width: 2.1458in; height: 1.6458in;" id="m_-1906897308365340851m_5678223470379831817Image_x0020_4" src="cid:ii_18e180d8347264660f8"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA">Can anyone tell me what I am doing wrong?  Thank you,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA"> <u></u><u></u></span></p>
<p class="MsoNormal"><b><i><span lang="FR-CA" style="color:rgb(31,56,100)">Émilie Berthiaume</span></i></b><span lang="FR-CA"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA" style="color:rgb(47,84,150)">Enseignante
</span><span lang="FR-CA"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA" style="color:rgb(47,84,150)">Département de biologie et Techniques de bioécologie</span><span lang="FR-CA"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA"><img border="0" width="367" height="39" style="width: 3.8229in; height: 0.4062in;" id="m_-1906897308365340851m_5678223470379831817Image_x0020_1" src="cid:ii_18e180d834623a1f8c2"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-CA"> <u></u><u></u></span></p>
</div>
<table border="0" cellspacing="0" cellpadding="0" align="left">
<tbody>
<tr>
<td style="border:1pt solid windowtext;padding:8pt">
<p class="MsoNormal" style="line-height:16pt">
<i><span style="font-size:10.5pt;color:black">Ce message est confidentiel et est à l'usage exclusif du destinataire nommé ci-dessus. Si vous recevez ce message par erreur, sachez qu'il est interdit de le diffuser, de le distribuer, d'en dévoiler le contenu
 ou de le reproduire. Veuillez informer immédiatement l'expéditeur par courrier électronique et détruire l'original de ce message ainsi que toute copie.
<u></u><u></u></span></i></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal">_______________________________________________<br>
QGIS-User mailing list<br>
<a href="mailto:QGIS-User@lists.osgeo.org" target="_blank">QGIS-User@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><u></u><u></u></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<br>
<span class="m_-1906897308365340851gmailsignatureprefix">-- </span><u></u><u></u></p>
<div>
<div>
<div>
<p class="MsoNormal"><br>
--<br>
Andreas Neumann<u></u><u></u></p>
</div>
<p class="MsoNormal"><a href="http://QGIS.ORG" target="_blank">QGIS.ORG</a> board member (treasurer)<u></u><u></u></p>
</div>
</div>
</div>
</div>

_______________________________________________<br>
QGIS-User mailing list<br>
<a href="mailto:QGIS-User@lists.osgeo.org" target="_blank">QGIS-User@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</div></blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><br>--<br>Andreas Neumann<br></div><a href="http://QGIS.ORG" target="_blank">QGIS.ORG</a> board member (treasurer)<br></div></div>