Determining onscreen layer rotation including autorotate
  • geoffmatters
    activ8 member
    Posts: 79
    Joined: Fri Sep 29, 2017 3:29 am

    Determining onscreen layer rotation including autorotate

    by geoffmatters » Mon Oct 22, 2018 2:30 am

    My module needs to know the z rotation of each layer. However I can't manage to get the final z rotation including the effects of autorotate. I thought that direct_layer_rotation_z would be the final, actual rotation:

    layer's actual visible z rotation == direct_layer_rotation_z = ctrl_layer_rotation_z + autorotate

    But, direct_layer_rotation_z doesn't seem to include the effects of autorotate. Autorotate seems to work outside the module system as an extra inaccessible fudge factor. The model seems to be more like

    layer's actual visible z rotation = ctrl_layer_rotation_z + direct_layer_rotation_z + autorotate

    Is there a way to determine the actual onscreen z rotation of a layer?

    [context: I have a CoreImage filter that adds a drop shadow within the pixel data. Autorotate of the surfaces causes the shadow to move also. In order to hold the "light source" to a constant angle, I need awareness of the final onscreen visible rotation of the layer.]

Who is online

Users browsing this forum: No registered users and 18 guests