SetImageMask
Description
Sets the mask for the selected image. This can be used to make parts of an image transparent when it is drawn with the DrawImage or DrawScaledImage functions. The color range specified will become transparent. This works best with BMP or TIFF images. JPEG images use a lossy compression, so the image mask may cause halo effects. The values of the color parameters range from 0 to 1, with 0 indicating 0% and 1 indicating 100% of the color.
Syntax
Delphi
function TQuickPDF0813.SetImageMask(FromRed, FromGreen, FromBlue, ToRed, ToGreen,
ToBlue: Double): Integer;
ActiveX
Function QuickPDF0813.PDFLibrary::SetImageMask(FromRed As Double,
FromGreen As Double, FromBlue As Double, ToRed As Double,
ToGreen As Double, ToBlue As Double) As Long
DLL
int QuickPDFSetImageMask(int InstanceID, double FromRed, double FromGreen,
double FromBlue, double ToRed, double ToGreen, double ToBlue)
Parameters
| FromRed | The red component of the starting color for the mask |
| FromGreen | The green component of the starting color for the mask |
| FromBlue | The blue component of the starting color for the mask |
| ToRed | The red component of the ending color for the mask |
| ToGreen | The green component of the ending color for the mask |
| ToBlue | The blue component of the ending color for the mask |
Return values
| 0 | No image was selected |
| 1 | The image mask was set successfully |