artemp/trac2github — Issue #714: Support for cutting holes
Author: artemp
Created: 2011-10-09 20:47:59+00:00
State: open
Labels: Symbolizers

(see also [https://lists.berlios.de/pipermail/mapnik-devel/2011-February/001323.html thread on mapnik-dev])

When rendering overlays (with a transparent background) it's sometimes useful to be able to "cut out" areas, halos around text etc. An example of this is contour line overlays with height labels, such as:

[http://openstreetmap.us/~lahlzen/misc/contours.png]

With the attached patch, halos and poly fills defined as "transparent" cut holes in the image (instead of rendering nothing). For example, the labels in the example above use:

{{{

}}}

The patch is against mapnik 0.7.1 and the Cairo renderer. I'm sure it could be implemented for AGG and extended to other symbolizers with relative ease.