Page 1 of 1

[28 Jan 2011] Interesting Bug with #TEXTOUT Layer

Posted: Sat Jun 13, 2020 5:32 pm
by PEB
Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 28 Jan 2011 02:56:56 -0000

Try the following code:

Code: Select all

EnableLayers()
TextOut(#CENTER, #CENTER, "Test", {Name="Text"})
WaitLeftMouse()
SetLayerStyle("Text", {Color=#WHITE, Rotate=30})
WaitLeftMouse()
SetLayerStyle("Text", {Color=#WHITE, Rotate=0})
WaitLeftMouse()
The text disappears after the second mouse click. However, if the "Color" entry is removed, then the bug does not show up. So the following code works:

Code: Select all

EnableLayers()
TextOut(#CENTER, #CENTER, "Test", {Name="Text"})
WaitLeftMouse()
SetLayerStyle("Text", {Rotate=30})
WaitLeftMouse()
SetLayerStyle("Text", {Rotate=0})
WaitLeftMouse()

[28 Jan 2011] Re: Interesting Bug with #TEXTOUT Layer

Posted: Sat Jun 13, 2020 5:32 pm
by PEB
Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 28 Jan 2011 03:05:51 -0000

Just noticed that the bug shows up using other table elements as well. So the following code also shows the bug:

Code: Select all

EnableLayers()
TextOut(#CENTER, #CENTER, "Test", {Name="Text"})
WaitLeftMouse()
SetLayerStyle("Text", {Rotate=30, Text="Step 1"})
WaitLeftMouse()
SetLayerStyle("Text", {Rotate=0, Text="Step 2"})
WaitLeftMouse()

[07 Feb 2011] Re: Re: Interesting Bug with #TEXTOUT Layer

Posted: Sat Jun 13, 2020 5:32 pm
by airsoftsoftwair
Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 07 Feb 2011 22:33:22 +0100
Just noticed that the bug shows up using other table elements as well. So the following code also shows the bug:
Yes, this is indeed a bug. I've made a note of it and will try to fix it. That's not easy, however, because SetLayerStyle() is a very complicated function and fixing this bug could easily introduce another bug, so I've to be very careful with making changes. Until then, you can easily circumvent this bug by just calling SetLayerStyle() two consecutive times.