qgis/QGIS — pull request #1380 by mhugo (2014-05-21 22:58:13+00:00)
Title: Mask renderer

Replacement of the issue #1254

This adds a new 'mask' feature renderer that allows to fill the exterior part of polygons. Basically a mask renderer embeds another feature renderer. All the features to render are collected, a big "inverted" polygon is built and this geometry is rendered using the embedded renderer.
The "inverted" polygon is built without union or difference operations that are too slow and unneeded for an operation of rendering: the final polygon is just an aggregation of rings, where exterior rings become interior rings and so on, without any validity check.
Embedded renderers that have differents symbols or more than one symbol per feature are useable. In this case, one inverted polygon will be built for each category of symbols. It is up to the user to play with transparency to see inverted polygons below some others.

This is a first request to see if everyone agree here. So SIP bindings and unit tests are still missing. The plan is to merge everything before the feature freeze.
@wonder-sk @nyalldawson do you think could you have a look ?

The only "strange" behaviour (but not critical) I've noticed so far is with the highlight: when using the identification tool, you have to click on the feature (interior), but its exterior (and not the interior) will be highlighted. I don't see any obvious way to change this (any idea ?). Vertex markers and selection are renderer correctly (within the interior)