LEADTOOLS For .NET Class Library Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.28
Using the FadedMask Method

When using the FadedMaskCommand class, the general process is as follows:

  1. Open any bitmap.

  2. Select any region.

  3. Create a Fade Mask. The images below show various fade masks resulting from the use of various flags. For these images, the following values were also used:

Region type: rounded rectangle.

Length = 50;

FadeRate = 15;

StepSize = 3;

MaxGray = 255;

Transparent = RGB(255, 0, 0);

First: without using FadedMaskCommandFlags.FadeOutsideRegion

FadedMaskCommandFlags.None

transparency

FadedMaskCommandFlags.FadeWhiteToBlack

FadedMaskCommandFlags.FillWithDumpColor

FadedMaskCommandFlags.FillWithDumpColor | FadedMaskCommandFlags.FadeWhiteToBlack

FadedMaskCommandFlags.FillWithDumpColor | FadedMaskCommandFlags.DumpColorStart

FadedMaskCommandFlags.FillWithDumpColor | FadedMaskCommandFlags.DumpColorStart | FadedMaskCommandFlags.FadeWhiteToBlack

FadedMaskCommandFlags.FillWithDumpColor | FadedMaskCommandFlags.NoTransparencyFill

FadedMaskCommandFlags.FillWithDumpColor | FadedMaskCommandFlags.NoTransparencyFill | FadedMaskCommandFlags.TransparencyAsDump

plus many other possibilities

Second: using FadedMaskCommandFlags.FadeOutsideRegion:

Region type:

rounded rectangle smaller than the above region, Inflate = 60

FadedMaskCommandFlags.FadeOutsideRegion

FadedMaskCommandFlags.FadeOutsideRegion | FadedMaskCommandFlags.FadeWhiteToBlack

FadedMaskCommandFlags.FadeOutsideRegion | FadedMaskCommandFlags.FillWithDumpColor

FadedMaskCommandFlags.FadeOutsideRegion | FadedMaskCommandFlags.FillWithDumpColor | FadedMaskCommandFlags.FadeWhiteToBlackstrong>

FadedMaskCommandFlags.FadeOutsideRegion | FadedMaskCommandFlags.FillWithDumpColor | FadedMaskCommandFlags.FadeWhiteToBlack|FadedMaskCommandFlags.NoTransparencyFill

and so on………..