MCPcopy
hub / github.com/greensock/GSAP / transformRawPath

Function transformRawPath

esm/utils/paths.js:714–736  ·  view source on GitHub ↗
(rawPath, a, b, c, d, tx, ty)

Source from the content-addressed store, hash-verified

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
714export 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
738function arcToSegment(lastX, lastY, rx, ry, angle, largeArcFlag, sweepFlag, x, y) {
739 if (lastX === x && lastY === y) {

Callers 3

_alignFunction · 0.90
CustomEase.jsFile · 0.90
PathEditor.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…