Class GaussianBlurView

Definition

Namespace:
Tizen.NUI
Assembly:
Tizen.NUI.dll
API Level:
6

GaussianBlurView is a class for applying a render process that blurs an image.

C#
Copy
public class GaussianBlurView : View, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable, IResourcesProvider
Inheritance
Implements

Constructors

View Source

GaussianBlurView()

Constructor

Declaration
C#
Copy
public GaussianBlurView()
View Source

GaussianBlurView(UInt32, Single, PixelFormat, Single, Single, Boolean)

Constructor with parameters.

Declaration
C#
Copy
public GaussianBlurView(uint numSamples, float blurBellCurveWidth, PixelFormat renderTargetPixelFormat, float downsampleWidthScale, float downsampleHeightScale, bool blurUserImage)
Parameters
Type Name Description
UInt32 numSamples

The size of the Gaussian blur kernel (number of samples in horizontal / vertical blur directions)

Single blurBellCurveWidth

The constant controlling the Gaussian function, must be > 0.0. Controls the width of the bell curve, i.e. the look of the blur and also indirectly the amount of blurriness Smaller numbers for a tighter curve. Useful values in the range [0.5..3.0] - near the bottom of that range the curve is weighted heavily towards the centre pixel of the kernel (so there won't be much blur), near the top of that range the pixels have nearly equal weighting (closely approximating a box filter therefore). Values close to zero result in the bell curve lying almost entirely within a single pixel, in other words there will be basically no blur as neighbouring pixels have close to zero weights.

PixelFormat renderTargetPixelFormat

The pixel format of the render targets we are using to perform the blur.

Single downsampleWidthScale

width scale factor applied during the blur process, scaling the size of the source image to the size of the final blurred image output. Useful for downsampling - trades visual quality for processing speed. A value of 1.0f results in no scaling applied.

Single downsampleHeightScale

The height scale factor applied during the blur process, scaling the size of the source image to the size of the final blurred image output. Useful for downsampling - trades visual quality for processing speed. A value of 1.0f results in no scaling applied.

Boolean blurUserImage

If this is set to true, the GaussianBlurView object will operate in a special mode that allows the user to blur an image of their choice. See SetUserImageAndOutputRenderTarget().

API Level: 6
View Source

GaussianBlurView(GaussianBlurView)

Copy constructor

Declaration
C#
Copy
public GaussianBlurView(GaussianBlurView handle)
Parameters
Type Name Description
GaussianBlurView handle
API Level: 6

Fields

View Source

BlurStrengthProperty

Declaration
C#
Copy
public static readonly BindableProperty BlurStrengthProperty
Field Value
Type Description
BindableProperty

Properties

View Source

BlurStrength

The BlurStrength property. A value of 0.0 is zero blur and 1.0 is full blur. Default is 1.0. if you set the blur to 0.0, the result will be no blur BUT the internal rendering will still be happening. If you wish to turn the blur off, you should remove the GaussianBlurView object from the window also.

Declaration
C#
Copy
public float BlurStrength { get; set; }
Property Value
Type Description
Single
API Level: 6

Methods

View Source

Activate()

Start rendering the GaussianBlurView. Must be called after you Add() it to the window.

Declaration
C#
Copy
public void Activate()
API Level: 6
View Source

ActivateOnce()

Render the GaussianBlurView once. Must be called after you Add() it to the window. Listen to the Finished signal to determine when the rendering has completed.

Declaration
C#
Copy
public void ActivateOnce()
API Level: 6
View Source

Deactivate()

Stop rendering the GaussianBlurView. Must be called after you Remove() it from the window.

Declaration
C#
Copy
public void Deactivate()
API Level: 6
View Source

Dispose(DisposeTypes)

Dispose GaussianBlurView and all children on it.

Declaration
C#
Copy
protected override void Dispose(DisposeTypes type)
Parameters
Type Name Description
DisposeTypes type

Dispose type.

Overrides
API Level: 6
View Source

ReleaseSwigCPtr(Runtime.InteropServices.HandleRef)

Declaration
C#
Copy
protected override void ReleaseSwigCPtr(Runtime.InteropServices.HandleRef swigCPtr)
Parameters
Type Name Description
Tizen.System.Runtime.InteropServices.HandleRef swigCPtr
Overrides

Events

View Source

Finished

If ActivateOnce has been called, then connect to this signal to be notified when the target actor has been rendered.

Declaration
C#
Copy
public event DaliEventHandler<object, EventArgs> Finished
Event Type
Type Description
DaliEventHandler<Object, EventArgs>
API Level: 6

Implements

Extension Methods