[]
        
(Showing Draft Content)

GrapeCity.Documents.Imaging.GaussianBlurEffect

Class GaussianBlurEffect

Namespace
GrapeCity.Documents.Imaging
Assembly
GcDocs.Imaging.dll

In-place effect that applies a Gaussian blur to the image.

public class GaussianBlurEffect : BaseInplaceEffect
Inheritance
object
GaussianBlurEffect
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

BorderColor

Gets or sets the color used to blend with the edge pixels of the image.

The default is transparent black.

.
public Color BorderColor { get; set; }

Property Value

System.Drawing.Color

BorderModeX

Gets or sets the mapping mode for the pixels outside of the border, in X direction.

public GaussianBlurBorderMode BorderModeX { get; set; }

Property Value

GaussianBlurBorderMode

BorderModeY

Gets or sets the mapping mode for the pixels outside of the border, in Y direction.

public GaussianBlurBorderMode BorderModeY { get; set; }

Property Value

GaussianBlurBorderMode

Multithreaded

Gets or sets a value indicating whether the effect should be applied in multiple threads to boost performance.

The multi-threaded mode requires 3-4 times more memory for internal operations.

public bool Multithreaded { get; set; }

Property Value

bool

Radius

Gets or sets the radius of the blur, in pixels.

public int Radius { get; set; }

Property Value

int

SupportsPremultiplied

Gets a value indicating whether the effect can be applied to an image with premultiplied alpha channel.

public override bool SupportsPremultiplied { get; }

Property Value

bool

Methods

Apply(GcBitmap, int, int, int, int)

Applies the Gaussian blur effect to a part of the specified GcBitmap.

protected override void Apply(GcBitmap bitmap, int x, int y, int width, int height)

Parameters

bitmap GcBitmap

The target GcBitmap.

x int

The x-coordinate of the target rectangle, in pixels.

y int

The y-coordinate of the target rectangle, in pixels.

width int

The width of the target rectangle, in pixels.

height int

The height of the target rectangle, in pixels.

Apply(GcBitmap)

Applies the Gaussian blur effect to the specified GcBitmap.

protected override void Apply(GcBitmap bitmap)

Parameters

bitmap GcBitmap

The target GcBitmap.

Get(Color, int, GaussianBlurBorderMode)

Returns an instance of the GaussianBlurEffect class.

public static GaussianBlurEffect Get(Color borderColor, int radius = 9, GaussianBlurBorderMode borderMode = GaussianBlurBorderMode.Default)

Parameters

borderColor System.Drawing.Color

The color used to blend with the edge pixels of the image.

radius int

The radius of the blur, in pixels.

borderMode GaussianBlurBorderMode

The mapping mode for the pixels outside of the border.

Returns

GaussianBlurEffect

Get(int, GaussianBlurBorderMode)

Returns an instance of the GaussianBlurEffect class.

public static GaussianBlurEffect Get(int radius = 9, GaussianBlurBorderMode borderMode = GaussianBlurBorderMode.Default)

Parameters

radius int

The radius of the blur, in pixels.

borderMode GaussianBlurBorderMode

The mapping mode for the pixels outside of the border.

Returns

GaussianBlurEffect