ImageGear .NET - Updated
Vignette(ImGearRasterPage,IImGearShape,Int32,Double,ImGearPixel,Boolean) Method




ImageGear23.Processing.Advanced Assembly > ImageGear.Processing Namespace > ImGearEffects Class : Vignette(ImGearRasterPage,IImGearShape,Int32,Double,ImGearPixel,Boolean) Method
Page to add vignette to.
Specifies vignette shape and position. Supported shape types are ImageGear.Core.ImGearRect structure, ImageGear.Core.ImGearEllipse structure, and ImageGear.Core.ImGearRoundedRectangle structure.
Specifies width of the smothing area. Smoothing area is located outside of the shape.
Specifies the shape of the smoothing curve. The value of 0.5 corresponds to linear transition, smaller values result in smother transition at the transparent edge of the vignette, greater values result in stronger transition at the transparent edge of the vignette. The valid range is 0...1.
If the image does not contain an Alpha channel, specifies fill color for the vignette. Otherwise, the Alpha value of fillColor specifies maximum opacity value for the vignette. Must correspond to the colorspace of the source image.
Set to false to fill outside area of the shape (best for applying a colored vignette). Set to true to fill inside area of the shape (best for creating a vignette from an image).
This method draws a shape on the image and fills interior or exterior of the shape with a specified color, using a smooth gradient at the edge of the shape.
Syntax
'Declaration
 
Public Shared Sub Vignette( _
   ByVal page As ImGearRasterPage, _
   ByVal shape As IImGearShape, _
   ByVal smoothWidth As Integer, _
   ByVal smoothFactor As Double, _
   ByVal fillColor As ImGearPixel, _
   ByVal fillInside As Boolean _
) 
'Usage
 
Dim page As ImGearRasterPage
Dim shape As IImGearShape
Dim smoothWidth As Integer
Dim smoothFactor As Double
Dim fillColor As ImGearPixel
Dim fillInside As Boolean
 
ImGearEffects.Vignette(page, shape, smoothWidth, smoothFactor, fillColor, fillInside)
public static void Vignette( 
   ImGearRasterPage page,
   IImGearShape shape,
   int smoothWidth,
   double smoothFactor,
   ImGearPixel fillColor,
   bool fillInside
)
public: static void Vignette( 
   ImGearRasterPage* page,
   IImGearShape* shape,
   int smoothWidth,
   double smoothFactor,
   ImGearPixel* fillColor,
   bool fillInside
) 
public:
static void Vignette( 
   ImGearRasterPage^ page,
   IImGearShape^ shape,
   int smoothWidth,
   double smoothFactor,
   ImGearPixel^ fillColor,
   bool fillInside
) 

Parameters

page
Page to add vignette to.
shape
Specifies vignette shape and position. Supported shape types are ImageGear.Core.ImGearRect structure, ImageGear.Core.ImGearEllipse structure, and ImageGear.Core.ImGearRoundedRectangle structure.
smoothWidth
Specifies width of the smothing area. Smoothing area is located outside of the shape.
smoothFactor
Specifies the shape of the smoothing curve. The value of 0.5 corresponds to linear transition, smaller values result in smother transition at the transparent edge of the vignette, greater values result in stronger transition at the transparent edge of the vignette. The valid range is 0...1.
fillColor
If the image does not contain an Alpha channel, specifies fill color for the vignette. Otherwise, the Alpha value of fillColor specifies maximum opacity value for the vignette. Must correspond to the colorspace of the source image.
fillInside
Set to false to fill outside area of the shape (best for applying a colored vignette). Set to true to fill inside area of the shape (best for creating a vignette from an image).
Remarks
This method draws a shape on the image and fills the interior or exterior of the shape with a specified color, using a smooth gradient at the edge of the shape.

The behavior of this method depends on whether the image has an Alpha channel or not.

If the image does not have an Alpha channel, the method uses specified color to fill the shape. Use this mode to add a colored vignette to an image. In this mode, you will most likely set the fillInside parameter to false, to fill the borders of the image.

If the source image has an Alpha channel, the method only modifies the contents of the Alpha channel, and leaves color channels unchanged. It uses the alpha value of fillColor as the maximum opacity value for filling. Use this mode to create a semi-transparent vignette that can then be applied to other images. In this mode, you will most likely set the fillInside parameter to true, to make the interior transparent and leave the borders of the vignette opaque.

See Also

Reference

ImGearEffects Class
ImGearEffects Members