Picture.Transparent

From Real Software Documentation

Jump to: navigation, search
Property (As Integer)
aPicture.Transparent = newIntegerValue
or
IntegerValue = aPicture.Transparent

Controls the transparency of the white 'layer' of the picture.

It can take on either of the following values:

0 - Not transparent.

1 - White is transparent.


In version 2011r4, Real Studio introduced support for transparency via the alpha channel. If you need transparency, use the new constructor that takes advantage of this feature. For old pictures, you can add an alpha channel via the ModernizePicture function that is presented in the Notes section.

Example

This example turns on transparency (for older Picture files).

dim width as integer = 2000
dim height as integer = 2000

// 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)
pic.Transparent=1
ImageWell1.Image=pic
end if
Personal tools