Position of scaled layers

Report any Hollywood bugs here
Post Reply
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

Position of scaled layers

Post 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     
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Position of scaled layers

Post 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.
Post Reply