Class Shape

    Definition

    Namespace:
    Tizen.NUI.BaseComponents.VectorGraphics
    Assembly:
    Tizen.NUI.dll

    Shape is a command list for drawing one shape groups It has own path data and properties for sync/asynchronous drawing

    public class Shape : Drawable, INotifyPropertyChanged, IDisposable
    Inheritance
    object
    BindableObject
    Tizen.NUI.Binding.Element
    BaseHandle
    Drawable
    Shape
    Implements
    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable

    Constructors

    View Source

    Shape()

    Creates an initialized Shape. This constructor initializes a new instance of the Shape class.

    Declaration
    public Shape()

    Properties

    View Source

    FillColor

    The color to use for filling the path.

    Declaration
    public Color FillColor { get; set; }
    Property Value
    Type Description
    Color
    View Source

    FillGradient

    The gradient to use for filling the path. Even if FillColor is set, Gradient setting takes precedence.

    Declaration
    public Gradient FillGradient { get; set; }
    Property Value
    Type Description
    Gradient
    View Source

    FillRule

    Gets or sets the fill rule type for the shape. The fill rule type which determines how the interior of a shape is determined.

    Declaration
    public FillRuleType FillRule { get; set; }
    Property Value
    Type Description
    FillRuleType
    View Source

    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
    public StrokeCapType StrokeCap { get; set; }
    Property Value
    Type Description
    StrokeCapType
    View Source

    StrokeColor

    The color to use for stroking the path.

    Declaration
    public Color StrokeColor { get; set; }
    Property Value
    Type Description
    Color
    View Source

    StrokeDash

    The stroke dash pattern. The dash pattern is specified dash pattern.

    Declaration
    public ReadOnlyCollection<float> StrokeDash { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ReadOnlyCollection<T><float>
    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when value is null.

    View Source

    StrokeGradient

    The gradient to use for stroking the path. Even if StrokeColor is set, Gradient setting takes precedence.

    Declaration
    public Gradient StrokeGradient { get; set; }
    Property Value
    Type Description
    Gradient
    View Source

    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
    public StrokeJoinType StrokeJoin { get; set; }
    Property Value
    Type Description
    StrokeJoinType
    View Source

    StrokeWidth

    The stroke width to use for stroking the path.

    Declaration
    public float StrokeWidth { get; set; }
    Property Value
    Type Description
    float

    Methods

    View Source

    AddArc(float, float, float, float, float, bool)

    Append the arcs.

    Declaration
    public bool AddArc(float x, float y, float radius, float startAngle, float sweep, bool pie)
    Parameters
    Type Name Description
    float x

    X co-ordinate of end point of the arc.

    float y

    Y co-ordinate of end point of the arc.

    float radius

    Radius of arc

    float startAngle

    Start angle (in degrees) where the arc begins.

    float sweep

    The Angle measures how long the arc will be drawn.

    bool 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
    bool

    True when it's successful. False otherwise.

    View Source

    AddCircle(float, float, float, float)

    Append a circle with given center and x,y-axis radius

    Declaration
    public bool AddCircle(float x, float y, float radiusX, float radiusY)
    Parameters
    Type Name Description
    float x

    X co-ordinate of the center of the circle.

    float y

    Y co-ordinate of the center of the circle.

    float radiusX

    X axis radius.

    float radiusY

    Y axis radius.

    Returns
    Type Description
    bool

    True when it's successful. False otherwise.

    View Source

    AddCubicTo(float, float, float, float, float, float)

    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
    public bool AddCubicTo(float controlPoint1X, float controlPoint1Y, float controlPoint2X, float controlPoint2Y, float endPointX, float endPointY)
    Parameters
    Type Name Description
    float controlPoint1X

    X co-ordinate of 1st control point.

    float controlPoint1Y

    Y co-ordinate of 1st control point.

    float controlPoint2X

    X co-ordinate of 2nd control point.

    float controlPoint2Y

    Y co-ordinate of 2nd control point.

    float endPointX

    X co-ordinate of end point of the line.

    float endPointY

    Y co-ordinate of end point of the line.

    Returns
    Type Description
    bool

    True when it's successful. False otherwise.

    View Source

    AddLineTo(float, float)

    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
    public bool AddLineTo(float x, float y)
    Parameters
    Type Name Description
    float x

    X co-ordinate of end point of the line.

    float y

    Y co-ordinate of end point of the line.

    Returns
    Type Description
    bool

    True when it's successful. False otherwise.

    View Source

    AddMoveTo(float, float)

    Add a point that sets the given point as the current point, implicitly starting a new subpath and closing the previous one.

    Declaration
    public bool AddMoveTo(float x, float y)
    Parameters
    Type Name Description
    float x

    X co-ordinate of the current point.

    float y

    Y co-ordinate of the current point.

    Returns
    Type Description
    bool

    True when it's successful. False otherwise.

    View Source

    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
    public 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.

    View Source

    AddRect(float, float, float, float, float, float)

    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
    public bool AddRect(float x, float y, float width, float height, float roundedCornerX, float roundedCornerY)
    Parameters
    Type Name Description
    float x

    X co-ordinate of the rectangle.

    float y

    Y co-ordinate of the rectangle.

    float width

    Width of the rectangle.

    float height

    Height of the rectangle.

    float roundedCornerX

    The x radius of the rounded corner and should be in range [ 0 to w/2 ].

    float roundedCornerY

    The y radius of the rounded corner and should be in range [ 0 to w/2 ].

    Returns
    Type Description
    bool

    True when it's successful. False otherwise.

    View Source

    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
    public bool Close()
    Returns
    Type Description
    bool

    True when it's successful. False otherwise.

    View Source

    ResetPath()

    Reset the added path(rect, circle, path, etc...) information. Color and Stroke information are keeped.

    Declaration
    public bool ResetPath()
    Returns
    Type Description
    bool

    True when it's successful. False otherwise.

    Implements

    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX