Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the use of referencePoint? #216

Open
muddhitbaid opened this issue Jan 14, 2025 · 8 comments
Open

What is the use of referencePoint? #216

muddhitbaid opened this issue Jan 14, 2025 · 8 comments
Assignees

Comments

@muddhitbaid
Copy link

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

@Agamnentzar Agamnentzar self-assigned this Jan 14, 2025
@Agamnentzar
Copy link
Owner

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

@muddhitbaid
Copy link
Author

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
Copy link
Author

Do you know what can be the reasons?

@Agamnentzar
Copy link
Owner

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

@muddhitbaid
Copy link
Author

The top left values are not matching

@muddhitbaid
Copy link
Author

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

@Agamnentzar
Copy link
Owner

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants