Class Picture
Definition
- Namespace:
- Tizen.NUI.BaseComponents.VectorGraphics
- Assembly:
- Tizen.NUI.dll
- API Level:
- 9
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.
C#Copypublic class Picture : Drawable, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IDisposable
- Inheritance
- Implements
-
System.ComponentModel.INotifyPropertyChangedSystem.IDisposable
Constructors
Declaration
C#Copypublic Picture()
API Level: 9
Methods
Declaration
C#Copypublic Size2D GetSize()
Returns
Type | Description |
---|---|
Size2D | The size of the image in pixels. |
API Level: 9
Declaration
C#Copypublic void Load(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | A path to the picture file. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when url is null. |
Exception | Thrown when image load fail. |
API Level: 9
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
C#Copypublic 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. |
API Level: 9
Implements
System.ComponentModel.INotifyPropertyChanged
System.IDisposable