From 2cd0b55e8854c80b8836d70aa3fc5992a8f06338 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 9 Feb 2010 17:28:17 +0000 Subject: [PATCH] enforce default gamma function - improves upon #428, closes #512 --- CHANGELOG | 3 +++ src/agg_renderer.cpp | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index c0463bc00..d76a3e5d3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,9 @@ For a complete change history, see the SVN log. Mapnik Trunk ------------ +- AGG Renderer - Enforced default gamma function on all symbolizers to ensure proper antialiasing + even when gamma is modified on the PolygonSymbolizer. (#512) + - Added ability to read pre 0.8.0 stylesheets, but prints a warning for deprecated syntax (r1592, #501) - Rasterlite Plugin: Experimental support for Rasterlite, to practically use sqlite database with wavelet compressed rasters (#469) diff --git a/src/agg_renderer.cpp b/src/agg_renderer.cpp index f341ec41e..8fe8e9175 100644 --- a/src/agg_renderer.cpp +++ b/src/agg_renderer.cpp @@ -190,7 +190,6 @@ void agg_renderer::process(polygon_symbolizer const& sym, renderer ren(renb); ras_ptr->reset(); - ras_ptr->gamma(agg::gamma_linear(0.0, sym.get_gamma())); for (unsigned i=0;i::process(building_symbolizer const& sym, agg::scanline_u8 sl; ras_ptr->reset(); + ras_ptr->gamma(agg::gamma_linear()); + double height = 0.7071 * sym.height(); // height in meters for (unsigned i=0;i::process(line_symbolizer const& sym, unsigned a=col.alpha(); renderer ren(renb); ras_ptr->reset(); + ras_ptr->gamma(agg::gamma_linear()); + agg::scanline_p8 sl; for (unsigned i=0;i::process(polygon_pattern_symbolizer const& sym, agg::scanline_u8 sl; ras_ptr->reset(); + ras_ptr->gamma(agg::gamma_linear()); std::string filename = path_processor_type::evaluate( *sym.get_filename(), feature); boost::optional pat = mapnik::image_cache::instance()->find(filename,true); @@ -799,6 +803,8 @@ void agg_renderer::process(markers_symbolizer const& sym, typedef agg::renderer_scanline_aa_solid renderer; arrow arrow_; ras_ptr->reset(); + ras_ptr->gamma(agg::gamma_linear()); + agg::scanline_u8 sl; agg::rendering_buffer buf(pixmap_.raw_data(),width_,height_, width_ * 4);