In This Topic ▼

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

noflag.gif

FadedMaskCommandFlags.FadeWhiteToBlack

whttoblk.gif

FadedMaskCommandFlags.FillWithDumpColor

dump.gif

FadedMaskCommandFlags.FillWithDumpColor | FadedMaskCommandFlags.FadeWhiteToBlack

dump-wtb.gif

FadedMaskCommandFlags.FillWithDumpColor | FadedMaskCommandFlags.DumpColorStart

dump-fillcolor.gif

FadedMaskCommandFlags.FillWithDumpColor | FadedMaskCommandFlags.DumpColorStart | FadedMaskCommandFlags.FadeWhiteToBlack

dump-fillcolor-wtb.gif

FadedMaskCommandFlags.FillWithDumpColor | FadedMaskCommandFlags.NoTransparencyFill

dump-notrans.gif

FadedMaskCommandFlags.FillWithDumpColor | FadedMaskCommandFlags.NoTransparencyFill | FadedMaskCommandFlags.TransparencyAsDump

dump-notrans-dumpcolor.gif

plus many other possibilities

Second

Using FadedMaskCommandFlags.FadeOutsideRegion:

Region type

Rounded rectangle smaller than the above region, Inflate = 60

FadedMaskCommandFlags.FadeOutsideRegion

notrans-outer.gif

FadedMaskCommandFlags.FadeOutsideRegion | FadedMaskCommandFlags.FadeWhiteToBlack

wtb-outer.gif

FadedMaskCommandFlags.FadeOutsideRegion | FadedMaskCommandFlags.FillWithDumpColor

dump-outer.gif

FadedMaskCommandFlags.FadeOutsideRegion | FadedMaskCommandFlags.FillWithDumpColor | FadedMaskCommandFlags.FadeWhiteToBlack

dump-wtb-outer.gif

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

dump-wtb-notrans-outer.gif

and so on...

Help Version 23.0.2024.8.27
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Imaging, Medical, and Document
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.