fix doubled percent signs
.. left over from an interation which used printf-style formatting
This commit is contained in:
parent
4d6b0c34f2
commit
8dbbcc6b7c
2 changed files with 9 additions and 4 deletions
|
|
@ -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.17 -1.75L100.69 -3.52
|
||||||
M100.69 -3.52L101.56 -5.32
|
M100.69 -3.52L101.56 -5.32
|
||||||
M101.56 -5.32L102.79 -7.19
|
M101.56 -5.32L102.79 -7.19
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
11
main.c
11
main.c
|
|
@ -116,21 +116,26 @@ int main(int argc, char **argv) {
|
||||||
"preserveAspectRatio=\"xMidyMid\" "
|
"preserveAspectRatio=\"xMidyMid\" "
|
||||||
"xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" "
|
"xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" "
|
||||||
"xmlns:xlink=\"http://www.w3.org/1999/xlink\">"
|
"xmlns:xlink=\"http://www.w3.org/1999/xlink\">"
|
||||||
"<path d=\"M-100000 0L100000 0M0 -100000L0 100000\" stroke=\"green\" "
|
"<path stroke=\"green\" stroke-dasharray=\"20 20\" d=\"";
|
||||||
"stroke-dasharray=\"20 20\"/>";
|
|
||||||
|
|
||||||
auto print_seg = [](const Segment &s) {
|
auto print_seg = [](const Segment &s) {
|
||||||
std::cout << "M" << s.p.x << " " << -s.p.y
|
std::cout << "M" << s.p.x << " " << -s.p.y
|
||||||
<< "L" << s.q.x << " " << -s.q.y << "\n";
|
<< "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\" "
|
std::cout << "<path fill=\"none\" stroke=\"black\" "
|
||||||
"stroke-linecap=\"round\" d=\"";
|
"stroke-linecap=\"round\" d=\"";
|
||||||
for(const auto i : s) print_seg(i);
|
for(const auto i : s) print_seg(i);
|
||||||
std::cout << "\"/>";
|
std::cout << "\"/>";
|
||||||
|
|
||||||
std::vector<Segment> segs;
|
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=\"";
|
"stroke-linecap=\"round\" d=\"";
|
||||||
xyhatch(h, s, print_seg);
|
xyhatch(h, s, print_seg);
|
||||||
std::cout << "\"/>";
|
std::cout << "\"/>";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue