Open yuripourre opened 3 years ago
Move:
for (DataCurve curve : path.getCurves()) {
move(curve.getStart(), x, y);
move(curve.getEnd(), x, y);
if (CurveType.QUADRATIC_BEZIER == curve.getType()) {
QuadraticCurve c = (QuadraticCurve) curve;
move(c.getControl1(), x, y);
} else if (CurveType.CUBIC_BEZIER == curve.getType()) {
CubicCurve c = (CubicCurve) curve;
move(c.getControl1(), x, y);
move(c.getControl2(), x, y);
}
}
Scale: // Calculate centroid // Move to centroid // Scale // Move back
Add helper methods: