ImageGear .NET - Updated December 24, 2018
ImGearMosaicCellParams Class
Members  Example 




ImageGear24.Processing.Advanced Assembly > ImageGear.Processing Namespace : ImGearMosaicCellParams Class
Describes cell parameters of the Mosaic operation.
Object Model
ImGearMosaicCellParams Class
Syntax
'Declaration
 
Public Class ImGearMosaicCellParams 
 
'Usage
 
Dim instance As ImGearMosaicCellParams
Example
// Applies a mosaic effect to an image.

// Parameter classes for Mosaic method.
ImGearMosaicFillParams igMosaicFillParams = new ImGearMosaicFillParams();
ImGearMosaicCellParams igMosaicCellParams = new ImGearMosaicCellParams();
ImGearMosaicBorderParams igMosaicBorderParams = new ImGearMosaicBorderParams();
ImGearMosaicShadowParams igMosaicShadowParams = new ImGearMosaicShadowParams();

//Color for fill and border.
ImGearPixel igPixel = new ImGearPixel(igRasterPage.DIB.ChannelCount, igRasterPage.DIB.BitsPerChannel);
//Set the color to a dark gray based on the bits per channel.
for (int i = 0; i < igPixel.ChannelCount; ++i)
    igPixel[i] = (int)Math.Pow(2, igRasterPage.DIB.BitsPerChannel) / 4;

// Cell parameters
igMosaicCellParams.Type = ImGearMosaicType.Cartesian;
igMosaicCellParams.Width = 32;
igMosaicCellParams.Height = 32;
igMosaicCellParams.PolarCenterX = 100;
igMosaicCellParams.PolarCenterY = 100;
// Fill parameters
igMosaicFillParams.Color = igPixel;
igMosaicFillParams.Opacity = (float)0.20;
// Border parameters
igMosaicBorderParams.Width = 0;
igMosaicBorderParams.Height = 0;
igMosaicBorderParams.Color = igPixel;
igMosaicBorderParams.Opacity = (float)0.30;
igMosaicBorderParams.Irregularity = 0;
// Shadow Parameters
igMosaicShadowParams.Enabled = true;
igMosaicShadowParams.Threshold = 0;
igMosaicShadowParams.Direction = ImGearDirection.SouthEast;
igMosaicShadowParams.HighResolution = false;
igMosaicShadowParams.Intensity = (float)1.0;

ImGearEffects.Mosaic(igRasterPage,
    igMosaicFillParams,
    igMosaicCellParams,
    igMosaicBorderParams,
    igMosaicShadowParams);
Inheritance Hierarchy

System.Object
   ImageGear.Processing.ImGearMosaicCellParams

See Also

Reference

ImGearMosaicCellParams Members
ImageGear.Processing Namespace
Mosaic Method