Re: Adobe Photoshop Bounds of a layer?
Re: Adobe Photoshop Bounds of a layer?
- Subject: Re: Adobe Photoshop Bounds of a layer?
- From: Alex Zavatone <email@hidden>
- Date: Thu, 04 Sep 2014 08:01:46 -0400
This might help.
set artboardRect to the bounds of layer 1 of myDoc
set myLeft to item 1 of artboardRect
set myTop to item 2 of artboardRect
set myRight to item 3 of artboardRect
set myBottom to item 4 of artboardRect
I've been using it since 2008.
On Sep 4, 2014, at 6:05 AM, Dave wrote:
>
> On 3 Sep 2014, at 00:02, Martin Orpen <email@hidden> wrote:
>
>> On 2 Sep 2014, at 08:05, Dave <email@hidden> wrote:
>>
>>> It seems that bounds is specified to be Top, Left, Bottom,Right (old pre MacOS X style Rects), my question is, to correctly calculate the Width and Height, should the code be:
>>
>>
>> Photoshop’s layer bounds are Left, Top, Right, Bottom
>>
>> So
>>
>> width = bounds[3] - bounds[1]
>> height = bounds[4] - bounds[2]
>
> Hi Martin,
>
> Thanks for taking the time to answer.
>
>
> I don’t understand this, surely it’s:
>
> bounds[0] = Left (or top?)
> bounds[1] = Top (or left?)
> bounds[2] = Right (or bottom?)
> bounds[3] = Bottom (or Right?)
>
> Does the array start at 0 or 1?
>
> I can’t seen to find it written in stone anywhere - if you know where Bounds is defined I’d be grateful if you could point me to it.
>
> I just want to be 100% certain I’ve got the right coordinates because I’m seeing some strange behaviour.
>
> Thanks a lot for your help,
>
> Dave
>
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden