Class Drawable

Definition

Namespace:
Tizen.NUI.BaseComponents.VectorGraphics
Assembly:
Tizen.NUI.dll
API Level:
9

Drawable is a object class for drawing a vector primitive.

C#
Copy
public class Drawable : BaseHandle, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IDisposable
Inheritance
System.Object
Tizen.NUI.Binding.Element
Drawable
Derived
Implements
System.ComponentModel.INotifyPropertyChanged
System.IDisposable

Properties

View Source

BoundingBox

The bounding box of the drawable object to which no transformation has been applied.

Declaration
C#
Copy
public Vector4 BoundingBox { get; }
Property Value
Type Description
Vector4
Remarks

The bounding box doesn't indicate the rendering region in the result but primitive region of the object.

API Level: 9
View Source

Opacity

The transparency level [0 ~ 1.0], 0 means totally transparent, while 1 means opaque.

Declaration
C#
Copy
public float Opacity { get; set; }
Property Value
Type Description
System.Single
API Level: 9

Methods

View Source

ClipPath(Drawable)

The intersection with clip drawable is determined and only the resulting pixels from own drawable are rendered.

Declaration
C#
Copy
public void ClipPath(Drawable clip)
Parameters
Type Name Description
Drawable clip

The clip drawable object.

Exceptions
Type Condition
Exception

Drawable clpping failed.

System.ArgumentNullException

Thrown when drawable is null.

API Level: 9
View Source

Mask(Drawable, MaskType)

The pixels of mask drawable and own drawable are blended according to MaskType.

Declaration
C#
Copy
public void Mask(Drawable mask, MaskType type)
Parameters
Type Name Description
Drawable mask

The mask drawable object.

MaskType type

The masking type.

Exceptions
Type Condition
Exception

Drawable masking failed.

System.ArgumentNullException

Thrown when drawable is null.

API Level: 9
View Source

Rotate(Single)

Set the angle of rotation transformation.

Declaration
C#
Copy
public bool Rotate(float degree)
Parameters
Type Name Description
System.Single degree

The degree value of angle.

Returns
Type Description
Boolean

True when it's successful. False otherwise.

API Level: 9
View Source

Scale(Single)

Set the scale value of scale transformation.

Declaration
C#
Copy
public bool Scale(float factor)
Parameters
Type Name Description
System.Single factor

The scale factor value.

Returns
Type Description
Boolean

True when it's successful. False otherwise.

API Level: 9
View Source

Transform(Single[])

Set the matrix value for affine transform.

Declaration
C#
Copy
public bool Transform(float[] matrix)
Parameters
Type Name Description
System.Single[] matrix

The float type array of 3x3 matrix.

Returns
Type Description
Boolean

True when it's successful. False otherwise.

Exceptions
Type Condition
System.ArgumentNullException

Thrown when matrix is null.

System.ArgumentException

Thrown when matrix array length is not 9.

API Level: 9
View Source

Translate(Single, Single)

Set the x, y movement value of translate transformation.

Declaration
C#
Copy
public bool Translate(float x, float y)
Parameters
Type Name Description
System.Single x

The x-axis movement value.

System.Single y

The y-axis movement value.

Returns
Type Description
Boolean

True when it's successful. False otherwise.

API Level: 9

Implements

System.ComponentModel.INotifyPropertyChanged
System.IDisposable