06-14-2023, 04:38 AM
I think you're mixing up the behavior of
When you
Alternatively, like mnrvovrfc mentioned using _PrintMode is generally an easier way to do this, it allows you to just simply turn off the background color of
_SetAlphawith
Color.
_SetAlphais a command that changes the Current contents of an image at the time you run the command, it does not change anything about what happens to the image after that point, and each pixel of the image has its own alpha value. Thus doing
_SetAlpha 100, 0, S2only changes the current black pixels to have 100 alpha, it has no impact on any black pixels created after that point (such as the ones from
When you
Colorsetting, so any existing alpha value for those pixels will be overridden by those RGBA colors. If you try the below code that adds a
Colorline, I believe you get the behavior you're looking for:
Code: (Select All)
Dim Shared S1 As Long, S2 As Long
S1 = _NewImage(1200, 900, 32)
S2 = _NewImage(1200, 300, 32)
_SetAlpha 100, 0, S2
Screen S1
Paint (1, 1), _RGBA32(0, 100, 100, 256)
_Delay 1
_Dest S2
Color , _RGBA32(0, 0, 0, 100) ' Make the background color black with 100 alpha
Print "If you see color back to this text all is ok"
_PutImage (1, 600), S2, S1
Alternatively, like mnrvovrfc mentioned using _PrintMode is generally an easier way to do this, it allows you to just simply turn off the background color of
_SetAlphawill work like you were expecting because
_SetAlpha.