From f6c10bbb7e84a7be329efc9235609248c58acca9 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Mon, 18 Jun 2012 11:10:04 -0400 Subject: [PATCH 1/3] Add color_spin composite operation. --- deps/agg/include/agg_pixfmt_rgba.h | 50 ++++++++++++++++++++++++++++ include/mapnik/image_compositing.hpp | 3 +- src/cairo_renderer.cpp | 1 + src/image_compositing.cpp | 1 + 4 files changed, 54 insertions(+), 1 deletion(-) diff --git a/deps/agg/include/agg_pixfmt_rgba.h b/deps/agg/include/agg_pixfmt_rgba.h index ac196b21f..705bf89e2 100644 --- a/deps/agg/include/agg_pixfmt_rgba.h +++ b/deps/agg/include/agg_pixfmt_rgba.h @@ -1434,6 +1434,54 @@ namespace agg } }; + // color spin + template + struct comp_op_rgba_color_spin + { + typedef ColorT color_type; + typedef Order order_type; + typedef typename color_type::value_type value_type; + typedef typename color_type::calc_type calc_type; + typedef typename color_type::long_type long_type; + enum base_scale_e + { + base_shift = color_type::base_shift, + base_mask = color_type::base_mask + }; + + static AGG_INLINE void blend_pix(value_type* p, + // source rgb + unsigned sr, unsigned sg, unsigned sb, + // source alpha and opacity + unsigned sa, unsigned cover) { + if (cover < 255) { + sa = (sa * cover + 255) >> 8; + } + p[Order::R] = (value_type)(((0 + base_mask) >> base_shift)); + p[Order::G] = (value_type)(((0 + base_mask) >> base_shift)); + p[Order::B] = (value_type)(((0 + base_mask) >> base_shift)); + p[Order::A] = (value_type)(sa + p[Order::A] - ((sa * p[Order::A] + base_mask) >> base_shift)); + + // http://en.wikipedia.org/wiki/File:HSV-RGB-comparison.svg + if (p[Order::A] < 64) { + p[Order::G] = ((p[Order::A] - 64) * 4); + p[Order::B] = 255; + } + if (p[Order::A] >= 64 && p[Order::A] < 128) { + p[Order::G] = 255; + p[Order::B] = 255 - ((p[Order::A] - 64) * 4); + } + if (p[Order::A] >= 128 && p[Order::A] < 192) { + p[Order::R] = ((p[Order::A] - 128) * 4); + p[Order::G] = 255; + } + if (p[Order::A] >= 192) { + p[Order::R] = 255; + p[Order::G] = 255 - ((p[Order::A] - 192) * 4); + } + } + }; + // grain extract (GIMP) // E = I - M + 128 @@ -1723,6 +1771,7 @@ namespace agg comp_op_rgba_saturation::blend_pix, comp_op_rgba_color::blend_pix, comp_op_rgba_luminosity::blend_pix, + comp_op_rgba_color_spin::blend_pix, 0 }; @@ -1764,6 +1813,7 @@ namespace agg comp_op_saturation, //----comp_op_saturation comp_op_color, //----comp_op_color comp_op_luminosity, //----comp_op_luminosity + comp_op_color_spin, //----comp_op_luminosity end_of_comp_op_e }; diff --git a/include/mapnik/image_compositing.hpp b/include/mapnik/image_compositing.hpp index cf56d3ca8..dcccbfca9 100644 --- a/include/mapnik/image_compositing.hpp +++ b/include/mapnik/image_compositing.hpp @@ -74,7 +74,8 @@ enum composite_mode_e hue, saturation, _color, - luminosity + luminosity, + color_spin }; MAPNIK_DECL boost::optional comp_op_from_string(std::string const& name); diff --git a/src/cairo_renderer.cpp b/src/cairo_renderer.cpp index 175f983d2..459379289 100644 --- a/src/cairo_renderer.cpp +++ b/src/cairo_renderer.cpp @@ -389,6 +389,7 @@ public: case saturation: case _color: case luminosity: + case color_spin: break; } } diff --git a/src/image_compositing.cpp b/src/image_compositing.cpp index 3ab87f2b2..210478e3e 100644 --- a/src/image_compositing.cpp +++ b/src/image_compositing.cpp @@ -74,6 +74,7 @@ static const comp_op_lookup_type comp_lookup = boost::assign::list_of comp_op_from_string(std::string const& name) From 93d860aaa391940c802a983d362f0e38f2c00973 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 18 Jun 2012 11:57:42 -0400 Subject: [PATCH 2/3] CHANGELOG: Add release dates and git revisions --- CHANGELOG.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 62 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50e982d7e..33cdc7ada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ For a complete change history, see the SVN log. ## Mapnik 2.1.0 +Not yet released + - PostGIS: Added 'simplify_geometries' option - will trigger ST_Simplify on geometries before returning to Mapnik (#1179) - Improved error feedback for invalid values passed to map.query_point @@ -48,7 +50,9 @@ For a complete change history, see the SVN log. ## Mapnik 2.0.1 -(Packaged from 5cd3cb2efdaf7e9990a57e8e00b652a81aaa39ae) +Released April 10, 2012 + +(Packaged from 57347e9106) - Support for PostGIS 2.0 (#956,#1083) @@ -83,6 +87,10 @@ For a complete change history, see the SVN log. ## Mapnik 2.0.0 +Released September 26, 2012 + +(Packaged from 5b4c20eab3) + - Add minimum-path-length property to text_symbolizer to allow labels to be placed only on lines of a certain length (#865) - Add support for png quantization using fixed palettes (#843) @@ -170,7 +178,11 @@ For a complete change history, see the SVN log. - Implement MarkersSymbolizer in Cairo render and improve the markers placement finder. (#553) -# Mapnik 0.7.2 Release +# Mapnik 0.7.2 + +Released Oct 18, 2011 + +(Packaged from bc5cabeb6a) - Added forward compatibility for Mapnik 2.0 XML syntax (https://trac.mapnik.org/wiki/Mapnik2/Changes) @@ -212,10 +224,52 @@ For a complete change history, see the SVN log. - Fixed reading of label_position_tolerance on text_symbolizer and height for building_symbolizer +# Mapnik 0.7.1 -# Mapnik 0.7.0 Release +Released March 23, 2010 -(Packaged from r1574) +(Packaged from r1745/db89f1ca75) + +- Rasters: Various fixes and improvements to 8bit png output ([#522](https://github.com/mapnik/mapnik/issues/522),[#475](https://github.com/mapnik/mapnik/issues/475)) + +- XML: Save map buffer_size when serializing map. + +- SCons: Added new build options 'PRIORITIZE_LINKING' and 'LINK_PRIORITY'. The first is a boolean (default True) + of whether to use the new sorting implementation that gives explcit preference to custom or local paths + during compile and linking that will affect builds when duplicate libraries and include directories are on the + system. LINK_PRIORITY defaults to prioritizing internal sources of the mapnik source folder, then local/user + installed libraries over system libraries, but the option can be customized. Sorting not only ensures that + compiling and linking will more likely match the desired libraries but also gives more likelyhood to avoid + the scenario where libraries are linked that don't match the includes libmapnik compiled against. + +- XML: Fixed behavior of PolygonPatternSymbolizer and LinePatternSymbolizer whereby width, height, + and type of images is actually allowed to be optionally ommitted ([#508](https://github.com/mapnik/mapnik/issues/508)). This was added in r1543 but + only worked correctly for PointSymbolizer and ShieldSymbolizer. + +- Fixed reading of PostGIS data on Big Endian systems ([#515](https://github.com/mapnik/mapnik/issues/515)) + +- PostGIS: Added better support for alterative schemas ([#500](https://github.com/mapnik/mapnik/issues/500)) + +- AGG Renderer - Enforced default gamma function on all symbolizers to ensure proper antialiasing + even when gamma is modified on the PolygonSymbolizer. ([#512](https://github.com/mapnik/mapnik/issues/512)) + +- PNG: fixed png256 for large images and some improvements to reduce color corruptions ([#522](https://github.com/mapnik/mapnik/issues/522)) + +- PNG: Added new quantization method for indexed png format using hextree with full support for alpha + channel. Also new method has some optimizations for color gradients common when using elevation based + rasters. By default old method using octree is used. (r1680, r1683, [#477](https://github.com/mapnik/mapnik/issues/477)) + +- PNG: Added initial support for passing options to png writter like number of colors, transparency + support, quantization method and possibly other in future using type parameter. For example + "png8:c=128:t=1:m=h" limits palette to 128 colors, uses only binary transparency (0 - none, + 1 - binary, 2 - full), and new method of quantization using hextree (h - hextree, o - octree). + Existing type "png256" can be also written using "png8:c=256:m=o:t=2" (r1680, r1683, [#477](https://github.com/mapnik/mapnik/issues/477)) + +# Mapnik 0.7.0 + +Released January, 19 2010 + +(Packaged from r1574/a0da946be9) - Core: Fixed linking to external libagg (r1297,r1299) @@ -354,9 +408,9 @@ For a complete change history, see the SVN log. -# Mapnik 0.6.1 Release +# Mapnik 0.6.1 -(Packaged from r1247) +(Packaged from r1247/353ff576c7) - Plugins: expose list of registered plugins as a 'plugin_names()' method of DatasourceCache (r1180) @@ -438,9 +492,9 @@ For a complete change history, see the SVN log. -# Mapnik 0.6.0 Release +# Mapnik 0.6.0 -(Packaged from r1066) +(Packaged from r1066/c88e03436f) - Python: Added support for aspect_fix_mode (r1013) From 396de8d08dec4d1b155a7cc52e7790832307e9aa Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 18 Jun 2012 12:08:38 -0400 Subject: [PATCH 3/3] add 0.3.0->0.5.1 to the CHANGELOG, correct the the 2.0.0 release year --- CHANGELOG.md | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33cdc7ada..33a7f8803 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ A simple log of core changes affecting Mapnik usage. Developers: Please commit along with changes. -For a complete change history, see the SVN log. +For a complete change history, see the git log. ## Mapnik 2.1.0 @@ -87,7 +87,7 @@ Released April 10, 2012 ## Mapnik 2.0.0 -Released September 26, 2012 +Released September 26, 2011 (Packaged from 5b4c20eab3) @@ -224,6 +224,7 @@ Released Oct 18, 2011 - Fixed reading of label_position_tolerance on text_symbolizer and height for building_symbolizer + # Mapnik 0.7.1 Released March 23, 2010 @@ -265,6 +266,7 @@ Released March 23, 2010 1 - binary, 2 - full), and new method of quantization using hextree (h - hextree, o - octree). Existing type "png256" can be also written using "png8:c=256:m=o:t=2" (r1680, r1683, [#477](https://github.com/mapnik/mapnik/issues/477)) + # Mapnik 0.7.0 Released January, 19 2010 @@ -407,9 +409,10 @@ Released January, 19 2010 - Fonts: Added unifont to auto-installed fonts, which is used by the OSM styles as a fallback font (r1328) - # Mapnik 0.6.1 +Released July 14, 2009 + (Packaged from r1247/353ff576c7) - Plugins: expose list of registered plugins as a 'plugin_names()' method of DatasourceCache (r1180) @@ -491,9 +494,10 @@ Released January, 19 2010 - Plugins: Fixed segfault in OGR Plugin with empty geometries (r1074) (#292) - # Mapnik 0.6.0 +Released April 1, 2009 + (Packaged from r1066/c88e03436f) - Python: Added support for aspect_fix_mode (r1013) @@ -584,3 +588,27 @@ Released January, 19 2010 - Plugins: Use memory mapped files for reading shape file (r628) - Core: Use streams to write images (i/o refactor) (r628) (#15) + +# Mapnik 0.5.1 + +Released April 15, 2008 + +(Packaged from c29cb7386d) + +# Mapnik 0.5.0 + +Released April 15, 2008 + +(Packaged from 0464a3563c) + +# Mapnik 0.4.0 + +Released February 26, 2007 + +(Packaged from 8d73e3a8dc) + +# Mapnik 0.3.0 + +Released May 22, 2006 + +(Packaged from 3ae046ebe2)