transformPoints function
List<Map<String, dynamic>>
transformPoints(
- dynamic points,
- dynamic transform
)
Implementation
List<Map<String, dynamic>> transformPoints(points, transform) {
List<Map<String, dynamic>> newPoints = [];
for (var i = 0; i < points.length; i += 1) {
var pt = points[i];
var newPt = {
"x": transform.xScale * pt.x + transform.scale01 * pt.y + transform.dx,
"y": transform.scale10 * pt.x + transform.yScale * pt.y + transform.dy,
"onCurve": pt.onCurve,
"lastPointOfContour": pt.lastPointOfContour
};
newPoints.add(newPt);
}
return newPoints;
}