@Override
public void execute() {
if(context.getSelection().size() != 1) return;
SNode node = context.getSelection().firstItem();
if(!(node instanceof SPath)) return;
SPath path = (SPath) node;
Bounds bounds = path.getTransformedBounds();
for(SPath.SubPath sub : path.getSubPaths()) {
for(SPath.PathPoint pt : sub.getPoints()) {
pt.x = pt.x -bounds.getX()+path.getTranslateX();
pt.y = pt.y -bounds.getY()+path.getTranslateY();
pt.cx1 = pt.cx1 -bounds.getX()+path.getTranslateX();
pt.cy1 = pt.cy1 -bounds.getY()+path.getTranslateY();
pt.cx2 = pt.cx2 -bounds.getX()+path.getTranslateX();
pt.cy2 = pt.cy2 -bounds.getY()+path.getTranslateY();
modifyPoint(bounds,path,pt);
pt.x = pt.x + bounds.getX()-path.getTranslateX();
pt.y = pt.y + bounds.getY()-path.getTranslateY();
pt.cx1 = pt.cx1 + bounds.getX()-path.getTranslateX();
pt.cy1 = pt.cy1 + bounds.getY()-path.getTranslateY();
pt.cx2 = pt.cx2 + bounds.getX()-path.getTranslateX();
pt.cy2 = pt.cy2 + bounds.getY()-path.getTranslateY();
}
}
path.recalcPath();
context.redraw();
}