Object

Picture Class

A Picture object contains a picture.

Properties
Depth | Mask
Graphics | Objects
Height | RGBSurface
HorizontalResolution | Transparent
ImageCount | VerticalResolution
IndexedImage | Width

# Notes

A Picture object is created by adding a picture to the Project Editor, by calling the OpenAsPicture or OpenAsVectorPicture methods of a FolderItem object, by calling the NewPicture function, or by using the New operator. When you use the New operator, you must pass the same parameters as when using NewPicture: Width as Integer, Height as Integer, and Depth as Integer. Width and Height are in pixels and the values of Depth may be 0, 1, 2, 4, 8, 16, or 32. If you use the New operator but run out of memory, an OutOfMemoryException error will be raised. If you specify a depth of zero REALbasic creates a picture with no pixel map at all, but with a preinitialized Objects property. Use this option for creating vector graphics pictures via the set of Object2D subclasses.

Picture objects have no methods or events.

The Transparent property works only if making the color white transparent produces the desired effect. In many cases, you need to work with the Mask property. For example, if you have a picture, myPicture, and a custom mask, myMask, stored in the Project Editor, the code:

myPicture.Mask. Graphics.DrawPicture myMask,0,0

will assign the custom mask to the Mask property of myPicture.

# See Also

NewPicture function; RGBSurface object; Graphics class.