Picture.Mask

From Xojo Documentation
Jump to: navigation, search
Property (As Picture)
aPicture.Mask( [Create as Boolean] ) = newPictureValue
or
PictureValue = aPicture.Mask([Create as Boolean])

Allows you to access a mask that controls the transparency of the picture. By default, the optional Create parameter is True. When Create is True, the mask is created automatically; otherwise the mask is returned, whether or not one exists.


Example

This example opens a jpeg file and creates a mask.

dim width as integer = 2000
dim height as integer = 2000
dim p2 as new picture(width,height,32)
// creates new picture
dim pic as new Picture(width, height, 32)
dim f as FolderItem
f=GetOpenFolderItem("image/jpeg")
if f<> Nil then
pic=Picture.Open(f)
p2=pic.Mask(True)
end if
Personal tools
Namespaces

Variants
Actions
Main
Documentation
Community
Toolbox
Help