Class Path | UIWidgets | 1.5.4-preview.12
docs.unity3d.com
    Show / Hide Table of Contents

    Class Path

    Inheritance
    Object
    Path
    Namespace: Unity.UIWidgets.ui
    Syntax
    public class Path

    Constructors

    Path(Int32)

    Declaration
    public Path(int capacity = 128)
    Parameters
    Type Name Description
    Int32 capacity

    Properties

    commands

    Declaration
    public List<float> commands { get; }
    Property Value
    Type Description
    List<Single>

    isNaiveRRect

    Declaration
    public bool isNaiveRRect { get; }
    Property Value
    Type Description
    Boolean

    pathKey

    Declaration
    public uint pathKey { get; }
    Property Value
    Type Description
    UInt32

    rRectCorner

    Declaration
    public float rRectCorner { get; }
    Property Value
    Type Description
    Single

    shapeHint

    Declaration
    public PathShapeHint shapeHint { get; }
    Property Value
    Type Description
    PathShapeHint

    Methods

    addArc(Single, Single, Single, Single, Single, PathWinding, Boolean)

    Declaration
    public void addArc(float cx, float cy, float r, float a0, float a1, PathWinding dir, bool forceMoveTo = true)
    Parameters
    Type Name Description
    Single cx
    Single cy
    Single r
    Single a0
    Single a1
    PathWinding dir
    Boolean forceMoveTo

    addArc(Rect, Single, Single)

    Declaration
    public void addArc(Rect rect, float startAngle, float sweepAngle)
    Parameters
    Type Name Description
    Rect rect
    Single startAngle
    Single sweepAngle

    addCircle(Single, Single, Single)

    Declaration
    public void addCircle(float cx, float cy, float r)
    Parameters
    Type Name Description
    Single cx
    Single cy
    Single r

    addEllipse(Single, Single, Single, Single)

    Declaration
    public void addEllipse(float cx, float cy, float rx, float ry)
    Parameters
    Type Name Description
    Single cx
    Single cy
    Single rx
    Single ry

    addOval(Rect)

    Declaration
    public void addOval(Rect oval)
    Parameters
    Type Name Description
    Rect oval

    addPath(Path, Matrix3)

    Declaration
    public void addPath(Path path, Matrix3 transform = null)
    Parameters
    Type Name Description
    Path path
    Matrix3 transform

    addPath(Path, Offset)

    Declaration
    public void addPath(Path path, Offset offset)
    Parameters
    Type Name Description
    Path path
    Offset offset

    addPolygon(IList<Offset>, Boolean)

    Declaration
    public void addPolygon(IList<Offset> points, bool close)
    Parameters
    Type Name Description
    IList<Offset> points
    Boolean close

    addRect(Rect)

    Declaration
    public void addRect(Rect rect)
    Parameters
    Type Name Description
    Rect rect

    addRRect(RRect)

    Declaration
    public void addRRect(RRect rrect)
    Parameters
    Type Name Description
    RRect rrect

    arcTo(Single, Single, Single, Single, Single)

    Declaration
    public void arcTo(float x1, float y1, float x2, float y2, float radius)
    Parameters
    Type Name Description
    Single x1
    Single y1
    Single x2
    Single y2
    Single radius

    arcTo(Rect, Single, Single, Boolean)

    Declaration
    public void arcTo(Rect rect, float startAngle, float sweepAngle, bool forceMoveTo = true)
    Parameters
    Type Name Description
    Rect rect
    Single startAngle
    Single sweepAngle
    Boolean forceMoveTo

    arcToPoint(Offset, Radius, Single, Boolean, Boolean)

    Declaration
    public void arcToPoint(Offset arcEnd, Radius radius = null, float rotation = 0F, bool largeArc = false, bool clockwise = false)
    Parameters
    Type Name Description
    Offset arcEnd
    Radius radius
    Single rotation
    Boolean largeArc
    Boolean clockwise

    close()

    Declaration
    public void close()

    combine(PathOperation, Path, Path)

    Declaration
    public static Path combine(PathOperation operation, Path path1, Path path2)
    Parameters
    Type Name Description
    PathOperation operation
    Path path1
    Path path2
    Returns
    Type Description
    Path

    computeMetrics(Boolean)

    Declaration
    public PathMetrics computeMetrics(bool forceClosed = false)
    Parameters
    Type Name Description
    Boolean forceClosed
    Returns
    Type Description
    PathMetrics

    conicTo(Single, Single, Single, Single, Single)

    Declaration
    public void conicTo(float x1, float y1, float x2, float y2, float w)
    Parameters
    Type Name Description
    Single x1
    Single y1
    Single x2
    Single y2
    Single w

    contains(Offset)

    Declaration
    public bool contains(Offset point)
    Parameters
    Type Name Description
    Offset point
    Returns
    Type Description
    Boolean

    cubicTo(Single, Single, Single, Single, Single, Single)

    Declaration
    public void cubicTo(float c1x, float c1y, float c2x, float c2y, float x, float y)
    Parameters
    Type Name Description
    Single c1x
    Single c1y
    Single c2x
    Single c2y
    Single x
    Single y

    getBounds()

    Declaration
    public Rect getBounds()
    Returns
    Type Description
    Rect

    getBoundsWithMargin(Single)

    Declaration
    public Rect getBoundsWithMargin(float margin)
    Parameters
    Type Name Description
    Single margin
    Returns
    Type Description
    Rect

    lineTo(Single, Single)

    Declaration
    public void lineTo(float x, float y)
    Parameters
    Type Name Description
    Single x
    Single y

    moveTo(Single, Single)

    Declaration
    public void moveTo(float x, float y)
    Parameters
    Type Name Description
    Single x
    Single y

    quadraticBezierTo(Single, Single, Single, Single)

    Declaration
    public void quadraticBezierTo(float cx, float cy, float x, float y)
    Parameters
    Type Name Description
    Single cx
    Single cy
    Single x
    Single y

    relativeConicTo(Single, Single, Single, Single, Single)

    Declaration
    public void relativeConicTo(float x1, float y1, float x2, float y2, float w)
    Parameters
    Type Name Description
    Single x1
    Single y1
    Single x2
    Single y2
    Single w

    relativeCubicTo(Single, Single, Single, Single, Single, Single)

    Declaration
    public void relativeCubicTo(float c1x, float c1y, float c2x, float c2y, float x, float y)
    Parameters
    Type Name Description
    Single c1x
    Single c1y
    Single c2x
    Single c2y
    Single x
    Single y

    relativeLineTo(Single, Single)

    Declaration
    public void relativeLineTo(float x, float y)
    Parameters
    Type Name Description
    Single x
    Single y

    relativeMoveTo(Single, Single)

    Declaration
    public void relativeMoveTo(float x, float y)
    Parameters
    Type Name Description
    Single x
    Single y

    relativeQuadraticBezierTo(Single, Single, Single, Single)

    Declaration
    public void relativeQuadraticBezierTo(float cx, float cy, float x, float y)
    Parameters
    Type Name Description
    Single cx
    Single cy
    Single x
    Single y

    resetAll()

    Declaration
    public void resetAll()

    shift(Offset)

    Declaration
    public Path shift(Offset offset)
    Parameters
    Type Name Description
    Offset offset
    Returns
    Type Description
    Path

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()

    transform(Matrix3)

    Declaration
    public Path transform(Matrix3 mat)
    Parameters
    Type Name Description
    Matrix3 mat
    Returns
    Type Description
    Path

    winding(PathWinding)

    Declaration
    public void winding(PathWinding dir)
    Parameters
    Type Name Description
    PathWinding dir
    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