(rawPath, a, b, c, d, tx, ty)
| 712 | } //applies a matrix transform to RawPath (or a segment in a RawPath) and returns whatever was passed in (it transforms the values in the array(s), not a copy). |
| 713 | |
| 714 | export function transformRawPath(rawPath, a, b, c, d, tx, ty) { |
| 715 | var j = rawPath.length, |
| 716 | segment, |
| 717 | l, |
| 718 | i, |
| 719 | x, |
| 720 | y; |
| 721 | |
| 722 | while (--j > -1) { |
| 723 | segment = rawPath[j]; |
| 724 | l = segment.length; |
| 725 | |
| 726 | for (i = 0; i < l; i += 2) { |
| 727 | x = segment[i]; |
| 728 | y = segment[i + 1]; |
| 729 | segment[i] = x * a + y * c + tx; |
| 730 | segment[i + 1] = x * b + y * d + ty; |
| 731 | } |
| 732 | } |
| 733 | |
| 734 | rawPath._dirty = 1; |
| 735 | return rawPath; |
| 736 | } // translates SVG arc data into a segment (cubic beziers). Angle is in degrees. |
| 737 | |
| 738 | function arcToSegment(lastX, lastY, rx, ry, angle, largeArcFlag, sweepFlag, x, y) { |
| 739 | if (lastX === x && lastY === y) { |
no outgoing calls
no test coverage detected
searching dependent graphs…