Position of scaled layers

Report any Hollywood bugs here
Post Reply
User avatar
lazi
Posts: 295
Joined: Fri Feb 25, 2011 12:08 am

Position of scaled layers

Post by lazi » Tue Jun 27, 2017 9:54 pm

Using position constants like #center, #top, etc. the scaled layers positioned accounting the original layer size.

Code: Select all

EnableLayers
Box(0,0,100,100,#RED)
WaitLeftMouse

ShowLayer(1,#RIGHT,0)
WaitLeftMouse

SetLayerStyle(1,{scalex=0.5})

ShowLayer(1,#RIGHT,#CENTER)
WaitLeftMouse     

User avatar
airsoftsoftwair
Posts: 2536
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: Position of scaled layers

Post by airsoftsoftwair » Sat Jul 01, 2017 10:29 pm

I'm afraid that is a feature. Layer positions and other attributes are always in untransformed coordinate space. I don't recall why I implemented it like this but there surely must have been a good reason :) You can use the #ATTRRAWXXX attributes to work around this issue.

Post Reply