CreateFadedMask method (Main Control)
Builder Syntax |
int __fastcall CreateFadedMask(LEADTyp::TBitmapHandle Bitmap, int iLength, int iFadeRate, int iStepSize, int iInflate, int iFlag, int iMaxGray, unsigned crTransparent); |
Delphi Syntax |
Function CreateFadedMask(Bitmap: TBitmapHandle; iLength: Integer; iFadeRate: Integer; iStepSize: Integer; iInflate: Integer; iFlag: Integer; iMaxGray: Integer; crTransparent: TColorRef): Integer; |
Overview |
Refer to Combining Images. |
Remarks
(DigitalPaint only) Creates a fade mask bitmap in which the color of each pixel is changed with respect to its position in the bitmap. This change depends on the fade rate. This method is only available in the DigitalPaint toolkits.
This method is concerned with the size and shape of the region, not the bitmap itself. Therefore, any bitmap with a region can be used to create a fade mask bitmap. The fade mask bitmap can be used by the FeatherAlphaBlend method and FeatherAlphaBlendExt method to combine two bitmaps with feathering.
If the FADE_OUTER flag is not set, then the size of the fade mask bitmap is equal to the size of a region and the fade progresses toward the center of the region. If the FADE_OUTER flag is set, the size is equal to the size of region plus the iInflate value and the fade starts at the edge of the region and progresses toward the edge of the fade mask bitmap. (The iInflate parameter is used only with FADE_OUTER flag)
In order to use the fade mask bitmap in the FeatherAlphaBlend method and FeatherAlphaBlendExt method, the fade mask bitmap must contain three portions:
a) |
A portion in which the output (from the blending function) will be the same as the destination bitmap. This is called the Transparency portion of the mask and it’s fill with black. |
b) |
A portion in which the output is a combination of the destination and source bitmap. |
c) |
A portion in which the output comes from the source bitmap. This is called the Dump portion of the mask and it’s fill with white. |
This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.
This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.
See Also
Elements: |
Underlay method, Combine method, FeatherAlphaBlend method, AlphaBlend method, FeatherAlphaBlendExt method |
Topics: |
|
|