artemp/trac2github — Issue #167: Fix broken antialiasing + alpha with color bleed
Author: artemp
Created: 2011-10-09 20:17:40+00:00
State: open
Labels: Agg_Renderer

When antialiased shapes (esp. text) are rendered to a transparent map, both the shape edge and alpha channel edges are treated identically. This causes thin, light-colored shapes to appear eroded (see attached image). An improvement would be to antialias RGB channels separately from the A channel, so that e.g. light colors would expand and bleed out to low-alpha areas. This does not appear to be a problem with dark colors, suggested that the default RGBA fill for a transparent map is 0x00000000.

The attached file is a composited image made up of a colored background and two separate Mapnik renders: black streets at 50% opacity, and white street names at 100% opacity. The eroded edge appearance can be seen on the white street names.