Hello,
I've noticed that creating a brush with alphachannel (using flag Alphachannel = True) and then using the Box command in the brush with an ARGB fill color, the command erases the alphachannel.
Using lines with the same ARGB color works fine, maybe Box command can't do this operation?
Box command and Alphachannel
Box command and Alphachannel
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | ☆★ All my links ★☆
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | ☆★ All my links ★☆
- airsoftsoftwair
- Posts: 5871
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Box command and Alphachannel
Hmm, what exactly are you trying to do? Box() will fill the specified rectangular area in the alpha channel with the alpha value specified in SetAlphaIntensity(). The alpha channel will only be "erased" if the alpha intensity is set to 0.
Re: Box command and Alphachannel
Ok, here is an example:
The above code will overwrite completely what's in the background, while the following code:
...preserves the transparency, so I can see what's in the background like it should, seems that the Box() command remove the alphachannel of the brush
Code: Select all
Local b = CreateBrush(Nil, 100, 100, #WHITE, { Alphachannel = True, Clear = True })
SelectBrush(b, #SELMODE_COMBO)
SetFillStyle(#FILLCOLOR)
Box(0, 0, 100, 100, $88FF0000)
EndSelect
DisplayBrush(b, 0, 0)
Code: Select all
Local b = CreateBrush(Nil, 100, 100, #WHITE, { Alphachannel = True, Clear = True })
SelectBrush(b, #SELMODE_COMBO)
For Local i = 0 To 100
Line(0, i, 100, i, $88FF0000)
Next
EndSelect
DisplayBrush(b, 0, 0)
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | ☆★ All my links ★☆
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | ☆★ All my links ★☆
- airsoftsoftwair
- Posts: 5871
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Box command and Alphachannel
Um, yeah, this is a bug then
I'll fix it. Thanks for the report!
Re: Box command and Alphachannel
Great! I was going mad trying to figure out what was the problem 
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | ☆★ All my links ★☆
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | ☆★ All my links ★☆