Picture.HasAlphaChannel

From Real Software Documentation

Jump to: navigation, search
Property (As Boolean)
aPicture.HasAlphaChannel = newBooleanValue
or
BooleanValue = aPicture.HasAlphaChannel

True if the Picture has an alpha channel.

Notes

A Picture that is created with the constructor that omits the Depth parameter has an alpha channel and old pictures can be converted to this format with the following code:

Function ModernizePicture(input As Picture) As Picture
If input.HasAlphaChannel Then Return input

Dim result As New Picture( input.Width, input.Height )
result.Graphics.DrawPicture( input, 0, 0 )
Return result
End Function

For pictures using masks, HasAlphaChannel returns False.

Personal tools