MCPcopy Create free account
hub / github.com/MyGUI/mygui / saveSvgShape

Function saveSvgShape

MyGUIEngine/src/msdfgen/core/export-svg.cpp:51–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51bool 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
65bool saveSvgShape(const Shape &shape, const Shape::Bounds &bounds, const char *filename) {
66 if (FILE *f = fopen(filename, "w")) {

Callers 1

mainFunction · 0.85

Calls 2

writeSvgPathDefFunction · 0.85
getYAxisOrientationMethod · 0.80

Tested by

no test coverage detected