Skip to main content
xpertpse
Participant
September 14, 2012
Question

How can I determine the rotate angle of an artLayer?

  • September 14, 2012
  • 2 replies
  • 3488 views

I have a document with multiple layers. I can rotate a layer via the script. However, if the layer is already rotated via some angle, how can i determine that via the script?

This topic has been closed for replies.

2 replies

Legend
September 16, 2012

You can create a linked and disabled vector mask with only two ancor points and determine the rotation of the layer via calculations points coordinates.

c.pfaffenbichler
Community Expert
Community Expert
September 14, 2012

What are you talking about?

Smart Objects or regular Layers (of the various kinds)?

xpertpse
xpertpseAuthor
Participant
September 14, 2012

I am talking about the regular layers.

xpertpse
xpertpseAuthor
Participant
September 16, 2012

If you know that a Layer is a rotated rectangule one could, as mentioned earlier, try to use its transparency to determine the rotation to the closest 90˚ – if it had been rotated 180˚ for example that would not register.


If you know that a Layer is a rotated rectangule

Yes. The layer is a rotated rectangle. Please elaborate on how can i fetch the transparency values and how can i calculate the rotation to the closest 90.

Thanks again.