Page 1 of 1

Position of scaled layers

Posted: Tue Jun 27, 2017 9:54 pm
by lazi
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     

Re: Position of scaled layers

Posted: Sat Jul 01, 2017 10:29 pm
by airsoftsoftwair
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.