Copy link to clipboard
Copied
Hi,
For a design im making i have multiple circles or ellipses that are of varied sizes - id like to change the height to equal the width so that all are perfect circles.
Is there any script out there that you know of that can help do this?
Is this possible? Thanks
function makeOvalsIntoPerfectCircles()
{
var doc = app.activeDocument;
var items = doc.pageItems;
var centerPoint;
var curItem;
for(var x=0;x<items.length;x++)
{
curItem = items[x];
centerPoint = [curItem.left + curItem.width/2,curItem.top - curItem.height/2];
curItem.height = curItem.width;
curItem.position = [centerPoint[0] - curItem.width/2,centerPoint[1] + curItem.height/2];
}
}
makeOvalsIntoPerfectCircles();
Copy link to clipboard
Copied
function makeOvalsIntoPerfectCircles()
{
var doc = app.activeDocument;
var items = doc.pageItems;
var centerPoint;
var curItem;
for(var x=0;x<items.length;x++)
{
curItem = items[x];
centerPoint = [curItem.left + curItem.width/2,curItem.top - curItem.height/2];
curItem.height = curItem.width;
curItem.position = [centerPoint[0] - curItem.width/2,centerPoint[1] + curItem.height/2];
}
}
makeOvalsIntoPerfectCircles();
Copy link to clipboard
Copied
Works and has amazed me and i send you a huge huge thank you DilliamWowling - a gentleman to the extreme
Copy link to clipboard
Copied
And it works for rectangles too!
Copy link to clipboard
Copied
My versatility and genius are unmatched. That's why they pay me the big bucks....
🤔😐😳😢😭
Copy link to clipboard
Copied
That is probably true for most of us 🙂
Copy link to clipboard
Copied
My versatility and genius are unmatched. That's why they pay me the big bucks....
🤣🤣🤣🤣 8)