diff --git a/SConstruct b/SConstruct index 2b0f716e7..a46916c9e 100644 --- a/SConstruct +++ b/SConstruct @@ -32,6 +32,10 @@ try: except: HAS_DISTUTILS = False +if platform.uname()[4] == 'ppc64': + LIBDIR_SCHEMA='lib64' +else: + LIBDIR_SCHEMA='lib' py3 = None @@ -237,14 +241,6 @@ def sort_paths(items,priority): new.extend(v) return new -if platform.dist()[0] in ('Ubuntu','debian'): - LIBDIR_SCHEMA='lib' -elif platform.uname()[4] == 'ppc64': - LIBDIR_SCHEMA='lib64' -else: - LIBDIR_SCHEMA='lib' - - def pretty_dep(dep): pretty = pretty_dep_names.get(dep) if pretty: diff --git a/include/mapnik/marker_helpers.hpp b/include/mapnik/marker_helpers.hpp index fd26b8ca6..efc565fc2 100644 --- a/include/mapnik/marker_helpers.hpp +++ b/include/mapnik/marker_helpers.hpp @@ -44,18 +44,15 @@ bool push_explicit_style(Attr const& src, Attr & dst, markers_symbolizer const& { mapnik::svg::path_attributes attr = src[i]; - if (strk) + if (strk && attr.stroke_flag) { - attr.stroke_flag = true; attr.stroke_width = strk->get_width(); color const& s_color = strk->get_color(); attr.stroke_color = agg::rgba(s_color.red()/255.0,s_color.green()/255.0, s_color.blue()/255.0,(s_color.alpha()*strk->get_opacity())/255.0); } - if (fill) + if (fill && attr.fill_flag) { - - attr.fill_flag = true; color const& f_color = *fill; attr.fill_color = agg::rgba(f_color.red()/255.0,f_color.green()/255.0, f_color.blue()/255.0,(f_color.alpha()*sym.get_opacity())/255.0); diff --git a/src/load_map.cpp b/src/load_map.cpp index da47c6640..7349d0f8e 100644 --- a/src/load_map.cpp +++ b/src/load_map.cpp @@ -111,7 +111,7 @@ private: void parse_markers_symbolizer(rule & rule, xml_node const& sym); void parse_raster_colorizer(raster_colorizer_ptr const& rc, xml_node const& node); - void parse_stroke(stroke & strk, xml_node const & sym); + bool parse_stroke(stroke & strk, xml_node const & sym); void ensure_font_face(std::string const& face_name); void find_unused_nodes(xml_node const& root); @@ -1055,8 +1055,10 @@ void map_parser::parse_markers_symbolizer(rule & rule, xml_node const& node) if (height) sym.set_height(*height); stroke strk; - parse_stroke(strk,node); - sym.set_stroke(strk); + if (parse_stroke(strk,node)) + { + sym.set_stroke(strk); + } marker_placement_e placement = node.get_attr("placement", MARKER_POINT_PLACEMENT); sym.set_marker_placement(placement); @@ -1300,12 +1302,15 @@ void map_parser::parse_shield_symbolizer(rule & rule, xml_node const& sym) } } -void map_parser::parse_stroke(stroke & strk, xml_node const & sym) +bool map_parser::parse_stroke(stroke & strk, xml_node const & sym) { + bool result = false; + // stroke color optional c = sym.get_opt_attr("stroke"); if (c) { + result = true; strk.set_color(*c); } @@ -1313,12 +1318,17 @@ void map_parser::parse_stroke(stroke & strk, xml_node const & sym) optional width = sym.get_opt_attr("stroke-width"); if (width) { + result = true; strk.set_width(*width); } // stroke-opacity optional opacity = sym.get_opt_attr("stroke-opacity"); - if (opacity) strk.set_opacity(*opacity); + if (opacity) + { + result = true; + strk.set_opacity(*opacity); + } // stroke-linejoin optional line_join = sym.get_opt_attr("stroke-linejoin"); @@ -1373,6 +1383,7 @@ void map_parser::parse_stroke(stroke & strk, xml_node const & sym) // stroke-miterlimit optional miterlimit = sym.get_opt_attr("stroke-miterlimit"); if (miterlimit) strk.set_miterlimit(*miterlimit); + return result; } void map_parser::parse_line_symbolizer(rule & rule, xml_node const & sym) diff --git a/src/marker_cache.cpp b/src/marker_cache.cpp index c50a59026..96c0e0a45 100644 --- a/src/marker_cache.cpp +++ b/src/marker_cache.cpp @@ -59,7 +59,7 @@ marker_cache::marker_cache() insert_svg("arrow", "" "" - "" + "" ""); } diff --git a/tests/visual_tests/compare.py b/tests/visual_tests/compare.py index 98edde22a..8fa26360e 100644 --- a/tests/visual_tests/compare.py +++ b/tests/visual_tests/compare.py @@ -12,7 +12,6 @@ passed = 0 def compare_pixels(pixel1, pixel2): if pixel1 == pixel2: return False - # will only work on little endian r_diff = abs((pixel1 & 0xff) - (pixel2 & 0xff)) g_diff = abs(((pixel1 >> 8) & 0xff) - ((pixel2 >> 8) & 0xff)) b_diff = abs(((pixel1 >> 16) & 0xff)- ((pixel2 >> 16) & 0xff)) @@ -32,7 +31,7 @@ def compare(actual, expected): im1 = mapnik.Image.open(actual) try: im2 = mapnik.Image.open(expected) - except IOError: + except RuntimeError: errors.append((None, actual, expected)) return -1 diff = 0 diff --git a/tests/visual_tests/test.py b/tests/visual_tests/test.py index 353f4a758..6d2a4f3aa 100755 --- a/tests/visual_tests/test.py +++ b/tests/visual_tests/test.py @@ -81,7 +81,7 @@ if __name__ == "__main__": files = [{"name": sys.argv[1], "sizes": sizes_few_square}] elif len(sys.argv) > 2: files = [] - for name in argv[1:]: + for name in sys.argv[1:]: files.append({"name": name}) for f in files: