| 49 | } |
| 50 | |
| 51 | bool saveSvgShape(const Shape &shape, const char *filename) { |
| 52 | if (FILE *f = fopen(filename, "w")) { |
| 53 | fputs("<svg xmlns=\"http://www.w3.org/2000/svg\"><path", f); |
| 54 | if (shape.getYAxisOrientation() == Y_UPWARD) |
| 55 | fputs(" transform=\"scale(1 -1)\"", f); |
| 56 | fputs(" d=\"", f); |
| 57 | writeSvgPathDef(f, shape); |
| 58 | fputs("\"/></svg>\n", f); |
| 59 | fclose(f); |
| 60 | return true; |
| 61 | } |
| 62 | return false; |
| 63 | } |
| 64 | |
| 65 | bool saveSvgShape(const Shape &shape, const Shape::Bounds &bounds, const char *filename) { |
| 66 | if (FILE *f = fopen(filename, "w")) { |
no test coverage detected