Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

need to demultiply to write proper alpha into png

  • Loading branch information...
commit f5227d7f18a1c2045c064cc897497d6ebe0e5530 2 parents 1732a2a + 38d9163
@springmeyer springmeyer authored
View
2  Makefile
@@ -14,7 +14,7 @@ distclean:
if test -e ".sconf_temp/"; then rm -r ".sconf_temp/"; fi
if test -e ".sconsign.dblite"; then rm ".sconsign.dblite"; fi
if test -e "config.cache"; then rm "config.cache"; fi
- if test -e "config.py"; then rm "config.py"; fi
+ if test -e "config.py"; then mv "config.py" "config.py.backup"; fi
reset: distclean
View
3  include/mapnik/rule.hpp
@@ -38,6 +38,7 @@
#include <mapnik/feature.hpp>
#include <mapnik/expression.hpp>
#include <mapnik/expression_string.hpp>
+#include <mapnik/config.hpp> // MAPNIK_DECL
// boost
#include <boost/concept_check.hpp>
@@ -127,7 +128,7 @@ typedef boost::variant<point_symbolizer,
markers_symbolizer,
debug_symbolizer> symbolizer;
-class rule
+class MAPNIK_DECL rule
{
public:
typedef std::vector<symbolizer> symbolizers;
View
5 src/agg/agg_renderer.cpp
@@ -271,7 +271,10 @@ void agg_renderer<T>::end_style_processing(feature_type_style const& st)
}
}
MAPNIK_LOG_DEBUG(agg_renderer) << "agg_renderer: End processing style";
- mapnik::save_to_file(pixmap_, (boost::format("%02d_style.png") % renderer_pass_).str(),"png");
+ // copy pixmap so demultiply will not impact main buffer
+ mapnik::image_32 pix_tmp = pixmap_;
+ pix_tmp.demultiply();
+ mapnik::save_to_file(pix_tmp, (boost::format("%02d_style.png") % renderer_pass_).str(),"png");
renderer_pass_++;
}
View
3  src/build.py
@@ -392,4 +392,5 @@ def symlink(env, target, source):
env['create_uninstall_target'](env, target1)
env['create_uninstall_target'](env, target)
-Depends(mapnik, env.subst('../deps/agg/libagg.a'))
+if not env['RUNTIME_LINK'] == 'static':
+ Depends(mapnik, env.subst('../deps/agg/libagg.a'))
View
7 src/load_map.cpp
@@ -670,7 +670,14 @@ void map_parser::parse_layer(Map & map, xml_node const& node)
{
std::map<std::string,parameters>::const_iterator base_itr = datasource_templates_.find(*base);
if (base_itr!=datasource_templates_.end())
+ {
params = base_itr->second;
+ }
+ else
+ {
+ MAPNIK_LOG_ERROR(datasource) << "Datasource template '" << *base
+ << "' not found for layer '" << name << "'";
+ }
}
xml_node::const_iterator paramIter = child->begin();
View
3  tests/cpp_tests/build.py
@@ -20,7 +20,8 @@
agg_env = Environment(ENV=os.environ)
agg_env['CXX'] = env['CXX']
agg_env['CXXFLAGS'] = env['CXXFLAGS']
- agg_env.AppendUnique(LIBS='agg')
+ if 'agg' in test_env['LIBS']:
+ agg_env.AppendUnique(LIBS='agg')
agg_env.Append(CPPPATH = '#deps/agg/include')
agg_env.Append(LIBPATH = '#deps/agg')
agg_env['CPPPATH'] = ['#deps/agg/include',env['BOOST_INCLUDES']]
View
18 tests/data/good_maps/line_symbolizer_offset.xml
@@ -0,0 +1,18 @@
+<Map minimum-version="2.1.0" background-color="white">
+ <Style name="style">
+ <Rule>
+ <LineSymbolizer offset="2"/>
+ <LineSymbolizer offset="-2"/>
+ </Rule>
+ </Style>
+ <Layer name="lay">
+ <StyleName>style</StyleName>
+ <Datasource>
+ <Parameter name="type">csv</Parameter>
+ <Parameter name="inline">
+ wkt,name
+ "MULTILINESTRING ((10 10, 20 20, 10 40),(40 40, 30 30, 40 20, 30 10))",line
+ </Parameter>
+ </Datasource>
+ </Layer>
+</Map>
Please sign in to comment.
Something went wrong with that request. Please try again.