| 3026 | } |
| 3027 | |
| 3028 | static void nsvg__parseLine(NSVGparser* p, const char** attr) |
| 3029 | { |
| 3030 | float x1 = 0.0; |
| 3031 | float y1 = 0.0; |
| 3032 | float x2 = 0.0; |
| 3033 | float y2 = 0.0; |
| 3034 | int i; |
| 3035 | |
| 3036 | for (i = 0; attr[i]; i += 2) { |
| 3037 | if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) { |
| 3038 | if (strcmp(attr[i], "x1") == 0) x1 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigX(p), nsvg__actualWidth(p)); |
| 3039 | else if (strcmp(attr[i], "y1") == 0) y1 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigY(p), nsvg__actualHeight(p)); |
| 3040 | else if (strcmp(attr[i], "x2") == 0) x2 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigX(p), nsvg__actualWidth(p)); |
| 3041 | else if (strcmp(attr[i], "y2") == 0) y2 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigY(p), nsvg__actualHeight(p)); |
| 3042 | } |
| 3043 | } |
| 3044 | nsvg__resetPath(p); |
| 3045 | nsvg__moveTo(p, x1, y1); |
| 3046 | nsvg__lineTo(p, x2, y2); |
| 3047 | nsvg__addPath(p, 0); |
| 3048 | nsvg__addShape(p); |
| 3049 | } |
| 3050 | |
| 3051 | static void nsvg__parsePoly(NSVGparser* p, const char** attr, int closeFlag) |
| 3052 | { |
no test coverage detected