Strange behaviour using "border" tag

Report any Hollywood bugs here
Post Reply
User avatar
Allanon
Posts: 464
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Strange behaviour using "border" tag

Post by Allanon » Tue Mar 06, 2012 4:51 pm

Hi Andreas,
when I use the border tag with layers and I modify the alpha channel of the layer I have a "tint" effect applied to the entire layer, please have a look at the following snippet:

Code: Select all

EnableLayers()
CreateLayer(10,10,400,400,
            { Alphachannel = True,
              Clear        = True,
              Border       = True,
              BorderColor  = $66FF0000,
              BorderSize   = 8 })

SelectAlphaChannel(1, #LAYER)
   SetAlphaIntensity(20)
   SetFillStyle(#FILLCOLOR)
   Box(0,0,400,400, $00FF00)
EndSelect()

SelectLayer(1)
   Box(0,0,400,400, $00FF00)
EndSelect()

WaitLeftMouse()
- The border should be red, and infact it is
- The layer body should be green, dark green to be precise because of the alpha channel and the black background, but it's redish, and it's connected with the border color (changing the border color changes the layer body color).

I could be a bug?
----------------------------
[Allanon] Fabio Falcucci
AMC - Creative Development // Docs Site // Support Forum
Support me on Patreon for Hollywood libraries!

User avatar
airsoftsoftwair
Posts: 3441
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Strange behaviour using "border" tag

Post by airsoftsoftwair » Fri Mar 09, 2012 2:27 pm

No, that's not a bug. Just try to increase the alpha intensity using SetAlphaIntensity(200) or so. Then you will see the green color clearly. You are only using a very weak alpha transparency. 20 will make it hardly visible.

The reddish color comes from the border. Remember that if the main layer is transparent, the border will shine through. The term "border" is a little bit confusing here because in reality the border is actually a second layer beneath the main layer. You will see this as soon as the main layer becomes partly transparent.

User avatar
Allanon
Posts: 464
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: Strange behaviour using "border" tag

Post by Allanon » Fri Mar 09, 2012 9:03 pm

Oki, thank you for the explanation :)
----------------------------
[Allanon] Fabio Falcucci
AMC - Creative Development // Docs Site // Support Forum
Support me on Patreon for Hollywood libraries!

Post Reply