Class Capture

    Definition

    Namespace:
    Tizen.NUI
    Assembly:
    Tizen.NUI.dll

    Capture snapshots the current scene and save as a file. Applications should follow the example below to create capture :

    Capture capture = new Capture();

    If required, you can also subscribe Finished event :

    capture.Finished += onCaptureFinished;

    At the subcribed event handler, user can know whether capture finish succeeded state.

    private void onCaptureFinished(object sender, CaptureFinishedEventArgs e)
    {
      if(e.Success) { //capture success, do something. }
      else { //capture failure, do something. }
    }

    suppose that we want to capture View 'A'. And, the View 'A' is overlapped by another View 'B' that is not a child of 'A'. in this case, if source is root of scene, the captured image includes a part of View 'B' on the 'A'. however, if source is just View 'A', the result includes only 'A'.

    public class Capture : BaseHandle, IDynamicResourceHandler, INameScope, System.IDisposable
    Inheritance
    object
    BindableObject
    Element
    BaseHandle
    Capture
    Implements
    IDynamicResourceHandler
    INameScope
    System.IDisposable

    Constructors

    View Source

    Capture()

    Create an Capture.

    Declaration
    public Capture()

    Methods

    View Source

    Dispose(DisposeTypes)

    Dispose

    Declaration
    protected override void Dispose(DisposeTypes type)
    Parameters
    Type Name Description
    DisposeTypes type
    Overrides
    BaseHandle.Dispose(DisposeTypes)
    View Source

    GetCapturedBuffer()

    Get Captured buffer.

    Declaration
    public PixelBuffer GetCapturedBuffer()
    Returns
    Type Description
    PixelBuffer

    PixelBuffer of captured buffer

    View Source

    GetNativeImageSource()

    Get NativeImageSource that is saved captured image.

    Declaration
    public NativeImageSource GetNativeImageSource()
    Returns
    Type Description
    NativeImageSource

    NativeImageSource that is saved captured image.

    View Source

    ReleaseSwigCPtr(HandleRef)

    Declaration
    protected override void ReleaseSwigCPtr(HandleRef swigCPtr)
    Parameters
    Type Name Description
    HandleRef swigCPtr
    View Source

    SetImageQuality(uint)

    Set result image quality in case of jpeg.

    Declaration
    public void SetImageQuality(uint quality)
    Parameters
    Type Name Description
    uint quality

    quality The value to control image quality for jpeg file format in the range [1, 100]

    View Source

    Start(Container, Position, Size, string, Color)

    Start capture and save the image as a file.

    Declaration
    public void Start(Container source, Position position, Size size, string path, Color color)
    Parameters
    Type Name Description
    Container source

    source View or Layer to be used for capture. This source must be added on the window in advance.

    Position position

    top-left position of area to be captured. this position is defined in the window.

    Size size

    captured size.

    string path

    image file path to be saved as a file. If path is empty string, the captured result is not be saved as a file.

    Color color

    background color of captured scene.

    View Source

    Start(Container, Size, string, Color, uint)

    Start capture and save the image as a file.

    Declaration
    public void Start(Container source, Size size, string path, Color color, uint quality)
    Parameters
    Type Name Description
    Container source

    source View or Layer to be used for capture. This source must be added on the window in advance.

    Size size

    captured size.

    string path

    image file path to be saved as a file. If path is empty string, the captured result is not be saved as a file.

    Color color

    background color of captured scene.

    uint quality

    The value to control image quality for jpeg file format in the range [1, 100].

    View Source

    Start(Container, Size, string, Color)

    Start capture and save the image as a file.

    Declaration
    public void Start(Container source, Size size, string path, Color color)
    Parameters
    Type Name Description
    Container source

    source View or Layer to be used for capture. This source must be added on the window in advance.

    Size size

    captured size.

    string path

    image file path to be saved as a file. If path is empty string, the captured result is not be saved as a file.

    Color color

    background color of captured scene.

    View Source

    Start(Container, Size, string)

    Start capture and save the image as a file.

    Declaration
    public void Start(Container source, Size size, string path)
    Parameters
    Type Name Description
    Container source

    source View or Layer to be used for capture. This source must be added on the window in advance.

    Size size

    captured size.

    string path

    image file path to be saved as a file. If path is empty string, the captured result is not be saved as a file.

    Remarks

    Background color of captured scene is transparent.

    Events

    View Source

    Finished

    For subscribing Finished event sent by this class.

    Declaration
    public event EventHandler<CaptureFinishedEventArgs> Finished
    Event Type
    Type Description
    EventHandler<><CaptureFinishedEventArgs>

    Implements

    IDynamicResourceHandler
    INameScope
    System.IDisposable

    Extension Methods

    BindableObjectExtensions.SetBinding(BindableObject, BindableProperty, string, BindingMode, IValueConverter, string)
    NameScopeExtensions.FindByName<T>(Element, string)
    EXamlExtensions.LoadFromEXaml<T>(T, string)
    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    EXamlExtensions.LoadFromEXamlPath<TXaml>(TXaml, string)
    EXamlExtensions.LoadFromEXamlPath<T>(T, Type)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX