Answered
Possible to scale a selection?
As part of a larger script I'm working on, I'm looking for a way to scale an existing selection. I have this code right now:
function selectionDimensions(thisSelection) {
var selectionDimensions = [];
var SB = activeDocument.selection.bounds;
selectionDimensions[0] = SB[2].value - SB[0].value;
selectionDimensions[1] = SB[3].value - SB[1].value;
return selectionDimensions;
}
var doc_scale = 2;
app.activeDocument.pathItems.getByName('negative').makeSelection(feather, true); // Make selection from path
var n = selectionDimensions(app.activeDocument.selection);
app.activeDocument.selection.resizeBoundary(n[0] * doc_scale, n[1] * doc_scale);However, absolutely nothing happens to the selection when I execute it. Is the code wrong, or is it not possible to resize selections this way?
/Joakim
