API reference
Preparing search index…

ImGui.ImDrawList_AddPolyline

  • Add a polyline to the draw list.

    Parameters

    self

    ImDrawList handle on which this method operates.

    points
    Float32Array

    Float32Array of consecutive [x,y] points in screen coordinates; provide at least 2 * num_points elements. Filled polygons require clockwise order. Pass Float32Array storage, not a JS scalar; native access uses the supplied backing memory.

    num_points
    number

    Number of coordinate pairs to read from points.

    col
    number

    Packed ImU32 RGBA color; alpha controls opacity.

    flags
    number

    ImDrawFlags options controlling this operation; combine compatible flag bits with |.

    thickness
    number

    Stroke thickness in screen pixels.

    Returns

    void
    • Only simple polygons are supported by filling functions (no self-intersections, no holes).

    • Concave polygon fill is more expensive than convex one: it has O(N^2) complexity. Provided as a convenience for the user but not used by the main library.

    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0