Class Drawable
Definition
- Namespace:
- Tizen.NUI.BaseComponents.VectorGraphics
- Assembly:
- Tizen.NUI.dll
Drawable is a object class for drawing a vector primitive.
public class Drawable : BaseHandle, INotifyPropertyChanged, IDisposable
- Inheritance
- Derived
- Implements
-
System.ComponentModel.INotifyPropertyChangedSystem.IDisposable
Properties
View SourceBoundingBox
The bounding box of the drawable object to which no transformation has been applied.
Declaration
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.
Opacity
The transparency level [0 ~ 1.0], 0 means totally transparent, while 1 means opaque.
Declaration
public float Opacity { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
View SourceClipPath(Drawable)
The intersection with clip drawable is determined and only the resulting pixels from own drawable are rendered.
Declaration
public void ClipPath(Drawable clip)
Parameters
Type | Name | Description |
---|---|---|
Drawable | clip | The clip drawable object. |
Exceptions
Type | Condition |
---|---|
System.Exception | Drawable clpping failed. |
System.ArgumentNullException | Thrown when drawable is null. |
Mask(Drawable, MaskType)
The pixels of mask drawable and own drawable are blended according to MaskType.
Declaration
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 |
---|---|
System.Exception | Drawable masking failed. |
System.ArgumentNullException | Thrown when drawable is null. |
Rotate(float)
Set the angle of rotation transformation.
Declaration
public bool Rotate(float degree)
Parameters
Type | Name | Description |
---|---|---|
float | degree | The degree value of angle. |
Returns
Type | Description |
---|---|
bool | True when it's successful. False otherwise. |
Scale(float)
Set the scale value of scale transformation.
Declaration
public bool Scale(float factor)
Parameters
Type | Name | Description |
---|---|---|
float | factor | The scale factor value. |
Returns
Type | Description |
---|---|
bool | True when it's successful. False otherwise. |
Transform(float[])
Set the matrix value for affine transform.
Declaration
public bool Transform(float[] matrix)
Parameters
Type | Name | Description |
---|---|---|
float[] | matrix | The float type array of 3x3 matrix. |
Returns
Type | Description |
---|---|
bool | 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. |
Translate(float, float)
Set the x, y movement value of translate transformation.
Declaration
public bool Translate(float x, float y)
Parameters
Type | Name | Description |
---|---|---|
float | x | The x-axis movement value. |
float | y | The y-axis movement value. |
Returns
Type | Description |
---|---|
bool | True when it's successful. False otherwise. |