Picture.Constructor(width as Integer, height as Integer)

From Xojo Documentation

Constructor
Picture.Constructor(width as Integer, height as Integer)

A Picture created with this constructor supports an alpha channel directly instead of requiring the use of masks.

Notes

This constructor creates a Picture instance with alpha channel support using the passed width and height parameters. Both Width and Height must be in the range 1 - 32767, otherwise an OutOfBoundsException will be raised. Width and Height specify the size of the picture and are in pixels.

When this constructor is used, the Picture defaults to translucent and can be returned to that state using ClearRect.

A picture created with a bit depth defaults to having a white, opaque background. Calling ClearRect on it returns it to that state.

Pictures created with an alpha channel do not use a mask. The Mask property will be Nil. Use the CopyMask and ApplyMask methods if you need to work with masks.

Example

This example declares a new Picture with an alpha channel:

Dim pic As New Picture(2000, 2000)