fix doubled percent signs

.. left over from an interation which used printf-style formatting
This commit is contained in:
Jeff Epler 2015-08-21 13:54:12 -05:00
parent 4d6b0c34f2
commit 8dbbcc6b7c
2 changed files with 9 additions and 4 deletions

View file

@ -1,4 +1,4 @@
<svg width="100%%" height="100%%" viewBox="-787.468 -747.988 1541.5 1537.12" preserveAspectRatio="xMidyMid" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M-100000 0L100000 0M0 -100000L0 100000" stroke="green" stroke-dasharray="20 20"/><path fill="none" stroke="black" stroke-linecap="round" d="M100 -0L100.17 -1.75
<svg width="100%" height="100%" viewBox="-787.468 -747.988 1541.5 1537.12" preserveAspectRatio="xMidyMid" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M-100000 0L100000 0M0 -100000L0 100000" stroke="green" stroke-dasharray="20 20"/><path fill="none" stroke="black" stroke-linecap="round" d="M100 -0L100.17 -1.75
M100.17 -1.75L100.69 -3.52
M100.69 -3.52L101.56 -5.32
M101.56 -5.32L102.79 -7.19

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

11
main.c
View file

@ -116,21 +116,26 @@ int main(int argc, char **argv) {
"preserveAspectRatio=\"xMidyMid\" "
"xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" "
"xmlns:xlink=\"http://www.w3.org/1999/xlink\">"
"<path d=\"M-100000 0L100000 0M0 -100000L0 100000\" stroke=\"green\" "
"stroke-dasharray=\"20 20\"/>";
"<path stroke=\"green\" stroke-dasharray=\"20 20\" d=\"";
auto print_seg = [](const Segment &s) {
std::cout << "M" << s.p.x << " " << -s.p.y
<< "L" << s.q.x << " " << -s.q.y << "\n";
};
Segment xaxis {{-2 * d_x, 0}, {2 * d_x, 0}};
Segment yaxis {{0, -2 * d_y}, {0, 2 * d_y}};
print_seg(xaxis);
print_seg(yaxis);
std::cout << "\"/>";
std::cout << "<path fill=\"none\" stroke=\"black\" "
"stroke-linecap=\"round\" d=\"";
for(const auto i : s) print_seg(i);
std::cout << "\"/>";
std::vector<Segment> segs;
std::cout << "<path fill=\"none\" stroke=\"blue\" "
std::cout << "<path fill=\"none\" stroke=\"blue\" stroke-opacity=\".8\" "
"stroke-linecap=\"round\" d=\"";
xyhatch(h, s, print_seg);
std::cout << "\"/>";