Class CanvasView
Definition
- Namespace:
- Tizen.NUI.BaseComponents.VectorGraphics
- Assembly:
- Tizen.NUI.dll
CanvasView is a class for displaying vector primitives.
public class CanvasView : View, IDynamicResourceHandler, INameScope, System.IDisposable, IResourcesProvider
- Inheritance
- Implements
-
System.IDisposable
Constructors
View SourceCanvasView()
Creates an initialized CanvasView.
Declaration
public CanvasView()
CanvasView(Size2D)
Creates an initialized CanvasView.
Declaration
public CanvasView(Size2D viewBox)
Parameters
| Type | Name | Description |
|---|---|---|
| Size2D | viewBox | The size of viewbox. |
Fields
View SourceRasterizationRequestManuallyProperty
RasterizationRequestManuallyProperty
Declaration
public static readonly BindableProperty RasterizationRequestManuallyProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
SynchronousLoadingProperty
SynchronousLoadingProperty
Declaration
public static readonly BindableProperty SynchronousLoadingProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
ViewBoxProperty
ViewBoxProperty
Declaration
public static readonly BindableProperty ViewBoxProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
Properties
View SourceRasterizationRequestManually
Whether we rasterize CanvasView manually or not.
Declaration
public bool RasterizationRequestManually { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
If true, need to call RequestRasterization() to rasterize CanvasView. If false, CanvasView will be rasterized automatically even if we don't call RequestRasterization().
SynchronousLoading
Whether we rasterize CanvasView synchronously or not.
Declaration
public bool SynchronousLoading { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
ViewBox
The viewbox of the CanvasView. The viewbox means the size of CanvasView's internal space. If the size of the viewbox is larger than the size of the CanvasView, the shapes are displayed smaller than the specified size. The default value of the viewbox is the same as the size of the canvasview.
Declaration
public Size2D ViewBox { get; set; }
Property Value
| Type | Description |
|---|---|
| Size2D |
Methods
View SourceAddDrawable(Drawable)
Add drawable object to the CanvasView. This method is similar to registration. The added shape is drawn on the inner canvas.
Declaration
public void AddDrawable(Drawable drawable)
Parameters
| Type | Name | Description |
|---|---|---|
| Drawable | drawable | Drawable object |
Dispose(DisposeTypes)
You can override it to clean-up your own resources.
Declaration
protected override void Dispose(DisposeTypes type)
Parameters
| Type | Name | Description |
|---|---|---|
| DisposeTypes | type | DisposeTypes |
Overrides
View SourceReleaseSwigCPtr(HandleRef)
Declaration
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Runtime.InteropServices.HandleRef | swigCPtr |
Overrides
View SourceRemoveAllDrawables()
Remove all drawable objects added to the CanvasView.
Declaration
public void RemoveAllDrawables()
RemoveDrawable(Drawable)
Remove drawable object to the CanvasView. This method is similar to deregistration.
Declaration
public void RemoveDrawable(Drawable drawable)
Parameters
| Type | Name | Description |
|---|---|---|
| Drawable | drawable | Drawable object |
RequestRasterization()
Reqeust rasterization manually to the CanvasView.
Declaration
public void RequestRasterization()