Class Picture

    Definition

    Namespace:
    Tizen.NUI.BaseComponents.VectorGraphics
    Assembly:
    Tizen.NUI.dll

    A class representing an image read in one of the supported formats: raw, svg, png and etc. Besides the methods inherited from the Drawable, it provides methods to load and draw images on the canvas.

    public class Picture : Drawable, INotifyPropertyChanged, IDisposable
    Inheritance
    object
    BindableObject
    Tizen.NUI.Binding.Element
    BaseHandle
    Drawable
    Picture
    Implements
    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable

    Constructors

    View Source

    Picture()

    Creates an initialized Picture. This constructor initializes a new instance of the Picture class.

    Declaration
    public Picture()

    Methods

    View Source

    GetSize()

    Gets the size of the image.

    Declaration
    public Size2D GetSize()
    Returns
    Type Description
    Size2D

    The size of the image in pixels.

    View Source

    Load(string)

    Loads a picture data directly from a file.

    Declaration
    public void Load(string url)
    Parameters
    Type Name Description
    string url

    A path to the picture file.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when url is null.

    System.Exception

    Thrown when image load fail.

    View Source

    SetSize(Size2D)

    Resize the picture content with the given size.

    Resize the picture content while keeping the default size aspect ratio. The scaling factor is established for each of dimensions and the smaller value is applied to both of them.

    Declaration
    public void SetSize(Size2D size)
    Parameters
    Type Name Description
    Size2D size

    A new size of the image in pixels

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when size is null.

    Implements

    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX