[Qgis-user] Irregular map frame with transparent mask?

Nyall Dawson nyall.dawson at gmail.com
Thu Jun 21 15:32:07 PDT 2018


On Wed, 20 Jun 2018 at 04:20, Alexandre Neto <senhor.neto at gmail.com> wrote:
>
> Hi,
>
> I am looking for a way to create a map with an irregular (non-rectangle) frame.
>
> There is blog post from Anita showing how to do it but it needs a white mask all around the map. While I need it to be transparent.
>
> I don't think this is possible yet without going the SVGs way, but maybe someone have so cool trick to share.
>

As others have commented - this isn't possible properly within QGIS
yet. But I've been slowly chipping away at various underlying
requirements to allow this to happen. Most of these bits are in place
now, but we lack:

1. The ability to set a shape as a mask for another shape within
layouts. This should be implemented using the existing
"polygon"/shapes feature, e.g. by selecting an item and a shape and
right clicking -> "set clipping mask"

2. Some code to push this masking shape down into the renderer -
specifically to set the map boundary polygon for the labeling engine
(so that the labeling engine knows if a label will be cut off/visible
inside the clipping shape)

3. Handling for grids with clipping masks

This might be a good candidate for inclusion in the next round of
print layout crowd funding.... I'll add it to the list!

Nyall



More information about the Qgis-user mailing list