Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

svg2png: only attempt to open automatically on os x, and do not retur…

…n after first rendered
  • Loading branch information...
commit b22d043d807e71086af3823dcefa7925f2dd924d 1 parent 1941a70
@springmeyer springmeyer authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 utils/svg2png/svg2png.cpp
View
6 utils/svg2png/svg2png.cpp
@@ -104,7 +104,6 @@ int main (int argc,char** argv)
{
std::string svg_name (*itr++);
-
boost::optional<mapnik::marker_ptr> marker_ptr = mapnik::marker_cache::instance()->find(svg_name, false);
if (marker_ptr) {
@@ -147,9 +146,12 @@ int main (int argc,char** argv)
boost::algorithm::ireplace_last(svg_name,".svg",".png");
mapnik::save_to_file<mapnik::image_data_32>(im.data(),svg_name,"png");
+#ifdef DARWIN
std::ostringstream s;
s << "open " << svg_name;
- return system(s.str().c_str());
+ system(s.str().c_str());
+#endif
+ std::clog << "rendered to: " << svg_name << "\n";
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.