AddBmpMasked Method (IMAGELIST)
PLBCMP GUI Only
The AddBmpMasked method inserts a bitmap image to an IMAGELIST object using a mask. The method uses the following format:
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. An IMAGELIST object to which the image is added.
return
Optional. A Numeric Variable that returns the zero-based index of the new image.
bmp
Required. A Character String Variable or Numeric Variable that specifies the file name or resource number of the new image.
Flags Affected: EOS, OVER, ZERO
Note the following:
If the method is successful, the zero-based index of the new image is returned. If the method is not successful, {return} will contain a -1.
If the bitmap image is smaller than the IMAGESIZEH or IMAGESIZEV property, the image is not added and {return} will contain a negative one.
If the bitmap image is wider than the IMAGESIZEH property setting, it is segmented and added as multiple images.
The MASKCOLOR property of the IMAGELIST object defines the mask. Each pixel of the MASKCOLOR bitmap is changed to black and the corresponding bit in the mask is set to one.
When a masked image is drawn, the specified {mask} is combined with the image to produce transparent areas in the bitmap allowing the background color to show.
If the value returned is zero, the ZERO Condition Flag is set.
If {return} is too small to contain the new image index, the OVER Condition Flag is set.
The EOS Condition Flag is always cleared.
A {bmp} resource number value of zero causes the imagelist picture to be loaded from the clipboard.
For improved performance in the Application Server environment, do not specify the optional return value unless needed.
This method is not supported by the PL/B Web Server.
See Also: Method Syntax, IMAGELIST Methods
![]() |