Nevron .NET Vision Documentation
Glow Image Filter

The glow image filter is a variation of the blur image filter allowing you to add blurred edges with controlled color to the shape borders.

Creating a Glow Image Filter

You create a glow filter by creating an instance of the NGlowImageFilter class and adding it to the Filters collection of the NImageFiltersStyle object:

C#
Copy Code
NGlowImageFilter glowImageFilter = new NGlowImageFilter();
someFillStyle.ImageFiltersStyle.Filters.Add(glowImageFilter);
Visual Basic
Copy Code
Dim glowImageFilter As NGlowImageFilter =  New NGlowImageFilter()
someFillStyle.ImageFiltersStyle.Filters.Add(glowImageFilter)
Tuning the Glow Image Filter

There are two types of glow - inner and outer. The inner glow applies blurred glow color contribution on the borders of the image from the inner side whereas the outer glow does the same but on the outer side.

To change the glow type you must modify the GlowType property of the NGlowImageFilter object, which accepts values from the GlowType enumeration:

C#
Copy Code
glowImageFilter.GlowType = GlowType.Inner;
Visual Basic
Copy Code
glowImageFilter.GlowType = GlowType.Inner

To modify the glow color you must use the Color property for example:  

C#
Copy Code
glowImageFilter.Color = Color.Green;
Visual Basic
Copy Code
glowImageFilter.Color = Color.Green

The Depth and BlurType properties control the blur applied on the glow color before combined with the original image:

C#
Copy Code
glowImageFilter.Depth = new NLength(10, NGraphicsUnit.Pixel); // glow depth in pixels
glowImageFilter.BlurType = BlurType.Linear; // linear color distribution
Visual Basic
Copy Code
glowImageFilter.Depth = new NLength(10, NGraphicsUnit.Pixel) ' glow depth in pixels
glowImageFilter.BlurType = BlurType.Linear ' linear color distribution

Finally you can also control the opacity of the original image with the help of the OriginalOpacity property accepting values in the range [0, 100]. A value of 0 for this property means complete transparency for the original image, whereas a value of 100 stands for complete opacity.

The following picture shows the glow image filter in action:

The first three bubbles use outer glow image filter with yellow glow color. The blue bubble uses an inner glow image filter with blue color.

See Also

 

 


©2017. Nevron Software LLC.

Send Feedback