ag-psd icon indicating copy to clipboard operation
ag-psd copied to clipboard

What is the use of referencePoint?

Open muddhitbaid opened this issue 1 year ago • 8 comments

Does it affect my layer coordinates while reading the psd? For me in some cases the coordinates shown in psd and after reading were different

cc: @Agamnentzar

muddhitbaid avatar Jan 14 '25 09:01 muddhitbaid

I don't really know what referencePoint is used for.

Agamnentzar avatar Jan 14 '25 15:01 Agamnentzar

My coordinates shown in PSD are not same as the values while reading the same PSD from ag-psd. I felt it might be adjusted as per reference point

muddhitbaid avatar Jan 14 '25 17:01 muddhitbaid

Do you know what can be the reasons?

muddhitbaid avatar Jan 14 '25 17:01 muddhitbaid

Can you show me the numbers you see in Photoshop and ones you see decoded from library? Which fields are different?

Agamnentzar avatar Jan 14 '25 19:01 Agamnentzar

The top left values are not matching

muddhitbaid avatar Jan 15 '25 09:01 muddhitbaid

While calculating layer positions do i need to adjust it as per artboard left top also?

muddhitbaid avatar Jan 15 '25 12:01 muddhitbaid

layer.top/left is definitely not related to referencePoint. But it does interact with artboards. I think the way layer position interacts with artboards is that it positions the layers on a single surface and then defines which regions of that surface belong to which artboard. So layer position will not be relative to artboard corner, but this combined surface corner.

Agamnentzar avatar Jan 15 '25 13:01 Agamnentzar

Actually now that I look at the data I don't fully understand how these relate to each other. But it's probably some between layer.top/left and layer.artboard.rect of the parent artboard.

Agamnentzar avatar Jan 15 '25 13:01 Agamnentzar