drawPolygon(points:colors:uvs:texture:)

    Draws a solid polygon of any number of points, convex or concave. Unlike drawColoredPolygon(points:color:uvs:texture:), each point’s color can be changed individually. See also drawPolyline(points:color:width:antialiased:) and drawPolylineColors(points:colors:width:antialiased:). If you need more flexibility (such as being able to use bones), use canvasItemAddTriangleArray(item:indices:points:colors:uvs:bones:weights:texture:count:) instead.

    CanvasItem.swift:1699
    final func drawPolygon(points: PackedVector2Array, colors: PackedColorArray, uvs: PackedVector2Array = PackedVector2Array(), texture: Texture2D? = nil)

    Other members in extension

    Types

    Type members

    Instance members

    Show implementation details (1)

    Hide implementation details