Devesprit.ImageProcessor & Devesprit.ImageServer
FadeEffect

Description:

This processor performs fading effect on an Image. Fading effect gradually fades a given area/region of the target Element into the background. Devesprit.ImageProcessor implements a very flexible and powerful Fading effect allowing you to define an area/region represented by a shape on which the fade effect takes place. Given that, you can get fading effects like rectangles, ovals, stars of any number of points, polygons of any number of sides and much more. You can specify whether the area/region for fading should fit the target element's size or be of a fixed size. You can control the area/region location as well if needed.
The fading effect is determined based on how the shape's fill is set up. For example, if you set up the shape's fill to be a solid color, then no fading effect will be produced. However, if you set up the shape's fill to be a gradient colors and one of those colors is transparent or contains some transparency (through out Alpha color channel), then a fading effect will take place.

Method Declaration
Copy Code
public static ImageFactory FadeEffect(this ImageFactory imageFactory, FadeSettings settings)

FadeSettings:

Height

Set the height of the fading shape area/region.

Width Set the width of the fading shape area/region.
X Set the x-coordinate of the left side of the fading shape area/region.
Y Set the y-coordinate of the top side of the fading shape area/region.
PathPoints Set a string containing pairs of point describing the path for fading. Use it for performing Path or RoundedPath fading.
PolygonSides Set the number of sides of the polygon shape used for fading.
Roundness Set the shape roundness used for fading.
Shape

Set the area/region's shape used for fading.

(Devesprit.ImageProcessor.Plugins.AdvancedEffects.FadeShape)

Sizing Set the area/region's size type used for fading. If it is Fit, then the area/region's size will automatically fit to the target Element's size; otherwise, the area/region's size must be specified by Width and Height properties.

(Devesprit.ImageProcessor.Plugins.AdvancedEffects.FadeSizing)

StarInnerRadiusPercentage Set the inner radius percentage of the star shape used for fading.
StarPoints Set the number of points of the star shape used for fading.
Location

Set how the area/region's shape used for fading will be positioned. If it is Center, then the area/region will be centered on the target Element; otherwise, the area/region's location must be specified by X and Y properties.

(Devesprit.ImageProcessor.Plugins.AdvancedEffects.FadeLocation)

ShapeFill The shape's fill used for fading. (see Fill Class)

Assembly:

Devesprit.ImageProcessor.Plugins.AdvancedEffects.dll

Example
Copy Code
new ImageFactory().Load(@"My-Image-Path").FadeEffect(new FadeSettings() {Shape = FadeShape.Oval});

Original

 

 

Result

 

See Also