// These macros flip a selection either vertically or horizontally macro "Flip Selection Vertically" { flip(true); } macro "Flip Selection Horizontally" { flip(false); } function flip(vertically) { angle = parseFloat(getArgument()); if (selectionType==9) { flipCompositeSelection(vertically); return; } getBoundingRect(xmin, ymin, width, height); xmax = xmin + width; ymax = ymin + height; getSelectionCoordinates(x, y); line = selectionType==5 && x.length==2; if (line) { getLine(x1, y1, x2, y2, width); x[0]=x1; y[0]=y1; x[1]=x2; y[1]=y2; } for (i=0; i