Page 1 of 1

Bug in SetLayerStyle() with #LINE Objects

Posted: Tue Jan 15, 2013 11:01 pm
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

Re: Bug in SetLayerStyle() with #LINE Objects

Posted: Thu Jan 17, 2013 9:09 pm
by airsoftsoftwair
Confirmed, will be fixed.

Re: Bug in SetLayerStyle() with #LINE Objects

Posted: Fri Jan 18, 2013 8:40 pm
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...

Re: Bug in SetLayerStyle() with #LINE Objects

Posted: Fri Jan 18, 2013 10:43 pm
by PEB
That's fine; the AnchorX/Y can always be reset after the thickness is changed.