Class Shape
Definition
- Namespace:
- Tizen.NUI.BaseComponents.VectorGraphics
- Assembly:
- Tizen.NUI.dll
- API Level:
- 9
Shape is a command list for drawing one shape groups It has own path data and properties for sync/asynchronous drawing
C#Copypublic class Shape : Drawable, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IDisposable
- Inheritance
- Implements
-
System.ComponentModel.INotifyPropertyChangedSystem.IDisposable
Constructors
Declaration
C#Copypublic Shape()
API Level: 9
Properties
Declaration
C#Copypublic Color FillColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
API Level: 9
FillGradient
The gradient to use for filling the path. Even if FillColor is set, Gradient setting takes precedence.
Declaration
C#Copypublic Gradient FillGradient { get; set; }
Property Value
Type | Description |
---|---|
Gradient |
API Level: 9
Declaration
C#Copypublic FillRuleType FillRule { get; set; }
Property Value
Type | Description |
---|---|
FillRuleType |
API Level: 9
StrokeCap
The cap style to use for stroking the path. The cap will be used for capping the end point of a open subpath.
Declaration
C#Copypublic StrokeCapType StrokeCap { get; set; }
Property Value
Type | Description |
---|---|
StrokeCapType |
API Level: 9
Declaration
C#Copypublic Color StrokeColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
API Level: 9
Declaration
C#Copypublic ReadOnlyCollection<float> StrokeDash { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<System.Single> |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when value is null. |
API Level: 9
StrokeGradient
The gradient to use for stroking the path. Even if StrokeColor is set, Gradient setting takes precedence.
Declaration
C#Copypublic Gradient StrokeGradient { get; set; }
Property Value
Type | Description |
---|---|
Gradient |
API Level: 9
StrokeJoin
The join style to use for stroking the path. The join style will be used for joining the two line segment while stroking the path.
Declaration
C#Copypublic StrokeJoinType StrokeJoin { get; set; }
Property Value
Type | Description |
---|---|
StrokeJoinType |
API Level: 9
Declaration
C#Copypublic float StrokeWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
API Level: 9
Methods
Declaration
C#Copypublic bool AddArc(float x, float y, float radius, float startAngle, float sweep, bool pie)
Parameters
Type | Name | Description |
---|---|---|
System.Single | x | X co-ordinate of end point of the arc. |
System.Single | y | Y co-ordinate of end point of the arc. |
System.Single | radius | Radius of arc |
System.Single | startAngle | Start angle (in degrees) where the arc begins. |
System.Single | sweep | The Angle measures how long the arc will be drawn. |
Boolean | pie | If True, the area is created by connecting start angle point and sweep angle point of the drawn arc. If false, it doesn't. |
Returns
Type | Description |
---|---|
Boolean | True when it's successful. False otherwise. |
API Level: 9
AddCircle(Single, Single, Single, Single)
Append a circle with given center and x,y-axis radius
Declaration
C#Copypublic bool AddCircle(float x, float y, float radiusX, float radiusY)
Parameters
Type | Name | Description |
---|---|---|
System.Single | x | X co-ordinate of the center of the circle. |
System.Single | y | Y co-ordinate of the center of the circle. |
System.Single | radiusX | X axis radius. |
System.Single | radiusY | Y axis radius. |
Returns
Type | Description |
---|---|
Boolean | True when it's successful. False otherwise. |
API Level: 9
AddCubicTo(Single, Single, Single, Single, Single, Single)
Adds a cubic Bezier curve between the current position and the given end point (lineEndPoint) using the control points specified by (controlPoint1), and (controlPoint2). After the path is drawn, the current position is updated to be at the end point of the path.
Declaration
C#Copypublic bool AddCubicTo(float controlPoint1X, float controlPoint1Y, float controlPoint2X, float controlPoint2Y, float endPointX, float endPointY)
Parameters
Type | Name | Description |
---|---|---|
System.Single | controlPoint1X | X co-ordinate of 1st control point. |
System.Single | controlPoint1Y | Y co-ordinate of 1st control point. |
System.Single | controlPoint2X | X co-ordinate of 2nd control point. |
System.Single | controlPoint2Y | Y co-ordinate of 2nd control point. |
System.Single | endPointX | X co-ordinate of end point of the line. |
System.Single | endPointY | Y co-ordinate of end point of the line. |
Returns
Type | Description |
---|---|
Boolean | True when it's successful. False otherwise. |
API Level: 9
AddLineTo(Single, Single)
Adds a straight line from the current position to the given end point. After the line is drawn, the current position is updated to be at the end point of the line. If no current position present, it draws a line to itself, basically * a point.
Declaration
C#Copypublic bool AddLineTo(float x, float y)
Parameters
Type | Name | Description |
---|---|---|
System.Single | x | X co-ordinate of end point of the line. |
System.Single | y | Y co-ordinate of end point of the line. |
Returns
Type | Description |
---|---|
Boolean | True when it's successful. False otherwise. |
API Level: 9
AddMoveTo(Single, Single)
Add a point that sets the given point as the current point, implicitly starting a new subpath and closing the previous one.
Declaration
C#Copypublic bool AddMoveTo(float x, float y)
Parameters
Type | Name | Description |
---|---|---|
System.Single | x | X co-ordinate of the current point. |
System.Single | y | Y co-ordinate of the current point. |
Returns
Type | Description |
---|---|
Boolean | True when it's successful. False otherwise. |
API Level: 9
AddPath(PathCommands)
Appends a given sub-path to the path. The current point value is set to the last point from the sub-path. @note The interface is designed for optimal path setting if the caller has a completed path commands already.
Declaration
C#Copypublic void AddPath(PathCommands pathCommands)
Parameters
Type | Name | Description |
---|---|---|
PathCommands | pathCommands | The command object that contain sub-path information. (This command information is copied internally.) |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when pathCommands is null. |
API Level: 9
AddRect(Single, Single, Single, Single, Single, Single)
Append the given rectangle with rounded corner to the path. The roundedCorner arguments specify the radii of the ellipses defining the corners of the rounded rectangle.
roundedCorner are specified in terms of width and height respectively.
If roundedCorner's values are 0, then it will draw a rectangle without rounded corner.
Declaration
C#Copypublic bool AddRect(float x, float y, float width, float height, float roundedCornerX, float roundedCornerY)
Parameters
Type | Name | Description |
---|---|---|
System.Single | x | X co-ordinate of the rectangle. |
System.Single | y | Y co-ordinate of the rectangle. |
System.Single | width | Width of the rectangle. |
System.Single | height | Height of the rectangle. |
System.Single | roundedCornerX | The x radius of the rounded corner and should be in range [ 0 to w/2 ]. |
System.Single | roundedCornerY | The y radius of the rounded corner and should be in range [ 0 to w/2 ]. |
Returns
Type | Description |
---|---|
Boolean | True when it's successful. False otherwise. |
API Level: 9
Close()
Closes the current subpath by drawing a line to the beginning of the subpath, automatically starting a new path. The current point of the new path is (0, 0). If the subpath does not contain any points, this function does nothing.
Declaration
C#Copypublic bool Close()
Returns
Type | Description |
---|---|
Boolean | True when it's successful. False otherwise. |
API Level: 9
ResetPath()
Reset the added path(rect, circle, path, etc...) information. Color and Stroke information are keeped.
Declaration
C#Copypublic bool ResetPath()
Returns
Type | Description |
---|---|
Boolean | True when it's successful. False otherwise. |