Page 1 of 1

[21 Aug 2009] Bug in SetLayerStyle()

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, 21 Aug 2009 18:14:21 -0000

There seems to be a bug in SetLayerStyle(). The following code works correctly:

Code: Select all

EnableLayers()
LoadBrush(1, "Test.png")
DisplayBrush(1, #CENTER, #CENTER)
WaitLeftMouse()
SetLayerStyle(1, {Transparency=128})
However, if SetLayerStyle() includes new coordinates, the layer will always be hidden. Try replacing the last line from the code above with this:

Code: Select all

SetLayerStyle(1, {x=5, y=5, Transparency=128})
It also doesn't help if the "Hidden" style element is used in the same call:

Code: Select all

SetLayerStyle(1, {x=5, y=5, Transparency=128, Hidden=FALSE})
But if an additional SetLayerStyle() is used with "Hidden" set to "False", then the layer is shown. So the following code works:

Code: Select all

EnableLayers()
LoadBrush(1, "Test.png")
DisplayBrush(1, #CENTER, #CENTER)
WaitLeftMouse()
SetLayerStyle(1, {x=5, y=5, Transparency=128})
SetLayerStyle(1, {Hidden=FALSE})
(These results were taken from the OS4 version of Hollywood 4.0)

[24 Aug 2009] Re: Bug in SetLayerStyle()

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, 24 Aug 2009 12:59:48 +0200
There seems to be a bug in SetLayerStyle(). The following code works correctly:

Code: Select all

EnableLayers()
LoadBrush(1, "Test.png")
DisplayBrush(1, #CENTER, #CENTER)
WaitLeftMouse()
SetLayerStyle(1, {Transparency=128})
However, if SetLayerStyle() includes new coordinates, the layer will always be hidden. Try replacing the last line from the code above with this:
Thanks for the report but I already discovered this earlier myself :) In the current builds it's already fixed!

[05 Sep 2009] Re: Bug in SetLayerStyle()

Posted: Sat Jun 13, 2020 5:32 pm
by nexus
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 05 Sep 2009 09:22:27 +0200
Thanks for the report but I already discovered this earlier myself :) In the current builds it's already fixed!
Moving already visible Layers (especially, filled objects, like circles, squares, etc) with SetLayerStyle() has a strange effect, too.

Parts of a Layer are not shown during the move but at it's final point, *sometimes* everthing looks fine again. But only sometimes, so you have to call SetLayerStyle(id, {hidden=false}) at the end of the movment to each moved layer.

If you move these layers from A to B in D steps, you have to call this SetLayerStyle(id, {hidden=false}) for each layer every D steps in order to have a nice/complete visible movement.

The disadvantage is, that these additional calls to SetLayerStyler() causes the movement to be flickering (mainly/especially for movements in the y-direction).

Is this issue the same bug as described above? Or is it a different one?

Thanks, Tom

[05 Sep 2009] Re: Re: Bug in SetLayerStyle()

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 Sat, 05 Sep 2009 10:37:10 +0200
Moving already visible Layers (especially, filled objects, like circles, squares, etc) with SetLayerStyle() has a strange effect, too.

Parts of a Layer are not shown during the move but at it's final point, *sometimes* everthing looks fine again. But only sometimes, so you have to call SetLayerStyle(id, {hidden=false}) at the end of the movment to each moved layer.

If you move these layers from A to B in D steps, you have to call this SetLayerStyle(id, {hidden=false}) for each layer every D steps in order to have a nice/complete visible movement.

The disadvantage is, that these additional calls to SetLayerStyler() causes the movement to be flickering (mainly/especially for movements in the y-direction).

Is this issue the same bug as described above? Or is it a different one?
No, that's the same bug :)