Class Rectangle | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class Rectangle

    Defines a rectangle shape, which may be rounded.

    Inheritance
    System.Object
    Filled
    Rectangle
    Inherited Members
    Filled.Fill
    Filled.FillTransform
    Filled.PathProps
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Unity.VectorGraphics
    Syntax
    public class Rectangle : Filled, IDrawable

    Properties

    Position

    The position of the rectangle.

    Declaration
    public Vector2 Position { get; set; }
    Property Value
    Type Description
    Vector2
    Remarks

    Rectangles are anchored on their top-left corner, not their center.

    RadiusBL

    The bottom-left radius of the rectangle.

    Declaration
    public Vector2 RadiusBL { get; set; }
    Property Value
    Type Description
    Vector2

    RadiusBR

    The bottom-right radius of the rectangle.

    Declaration
    public Vector2 RadiusBR { get; set; }
    Property Value
    Type Description
    Vector2

    RadiusTL

    The top-left radius of the rectangle.

    Declaration
    public Vector2 RadiusTL { get; set; }
    Property Value
    Type Description
    Vector2

    RadiusTR

    The top-right radius of the rectangle.

    Declaration
    public Vector2 RadiusTR { get; set; }
    Property Value
    Type Description
    Vector2

    Size

    The size of the rectangle.

    Declaration
    public Vector2 Size { get; set; }
    Property Value
    Type Description
    Vector2
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023