// Rotates the selection by a specified angle. angle = parseFloat(getArgument()); if (isNaN(angle)) exit("Angle is invalid: "+getArgument()); Dialog.create("Rotate Selection"); decimalPlaces = 0; if (floor(angle)!=angle) decimalPlaces = 2; Dialog.addNumber(" Angle:", angle, decimalPlaces, 3, "degrees"); Dialog.addMessage("Enter negative angle to \nrotate counter-clockwise"); Dialog.show(); angle = Dialog.getNumber(); if (selectionType==9) { rotateCompositeSelection(angle); return toString(angle); } theta = -angle*PI/180; getBoundingRect(xbase, ybase, width, height); xcenter=xbase+width/2; ycenter=ybase+height/2; 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