[28 Jan 2011] Interesting Bug with #TEXTOUT Layer

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
PEB
Posts: 569
Joined: Sun Feb 21, 2010 1:28 am

[28 Jan 2011] Interesting Bug with #TEXTOUT Layer

Post 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()
PEB
Posts: 569
Joined: Sun Feb 21, 2010 1:28 am

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

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

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

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