Simplified the no-stroke declaration in SVG output code - in Java, C++, JavaScript, Python language versions.

This commit is contained in:
Project Nayuki
2017-07-26 20:34:29 +00:00
parent 7075db21d1
commit d785ecb598
4 changed files with 12 additions and 12 deletions
+3 -3
View File
@@ -176,8 +176,8 @@ std::string QrCode::toSvgString(int border) const {
sb << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
sb << "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n";
sb << "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 ";
sb << (size + border * 2) << " " << (size + border * 2) << "\">\n";
sb << "\t<rect width=\"100%\" height=\"100%\" fill=\"#FFFFFF\" stroke-width=\"0\"/>\n";
sb << (size + border * 2) << " " << (size + border * 2) << "\" stroke=\"none\">\n";
sb << "\t<rect width=\"100%\" height=\"100%\" fill=\"#FFFFFF\"/>\n";
sb << "\t<path d=\"";
bool head = true;
for (int y = -border; y < size + border; y++) {
@@ -191,7 +191,7 @@ std::string QrCode::toSvgString(int border) const {
}
}
}
sb << "\" fill=\"#000000\" stroke-width=\"0\"/>\n";
sb << "\" fill=\"#000000\"/>\n";
sb << "</svg>\n";
return sb.str();
}