Bug in SetLayerStyle() with #LINE Objects

Report any Hollywood bugs here
Post Reply
PEB
Posts: 576
Joined: Sun Feb 21, 2010 1:28 am

Bug in SetLayerStyle() with #LINE Objects

Post by PEB »

Test this code:

Code: Select all

EnableLayers()
Line(50, 50, 150, 150, #WHITE, {Name="LineLayer", Thickness=10})
WaitLeftMouse()
SetLayerStyle("LineLayer", {AnchorX=0.5, AnchorY=0.5})
WaitLeftMouse()
SetLayerStyle("LineLayer", {Thickness=4}); Changing the thickness resets the AnchorX and AnchorY to 0.0
User avatar
airsoftsoftwair
Posts: 5834
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Bug in SetLayerStyle() with #LINE Objects

Post by airsoftsoftwair »

Confirmed, will be fixed.
User avatar
airsoftsoftwair
Posts: 5834
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Bug in SetLayerStyle() with #LINE Objects

Post by airsoftsoftwair »

Well, this is actually also a feature that I've just forgotten to document ;) The behaviour when using AnchorX/Y with #LINE layers or with the Line() command itself is currently undefined. I don't remember why I chose to disable this but I guess there must have been some good reason. It's been some years since I last touched this code, so I better leave it as it is for now because adding the AnchorX/Y functionality might easily break other things without me noticing it and that's just not worth it...
PEB
Posts: 576
Joined: Sun Feb 21, 2010 1:28 am

Re: Bug in SetLayerStyle() with #LINE Objects

Post by PEB »

That's fine; the AnchorX/Y can always be reset after the thickness is changed.
Post Reply